Detecting Cats on a Video

Cats Recognition with Pipeless

This example contains a Pipeless stage to recognize cats.


pip install opencv-python

Run the example

Create an empty Pipeless project

pipeless init my-project --template empty # Using the empty template we avoid the interactive shell
cd my-project

Feel free to change my-project by any name you want.

Download the stage folder

wget -O - | tar -xz --strip=2 "pipeless-main/examples/cats"

Update the XML file path inside

Update the line highlighted below to the actual path in your system (use an absolute path):
def init():
    return {
        'model': cv2.CascadeClassifier('/home/path/my-project/cats/cats.xml')

Start Pipeless

The following command leaves Pipeless running on the current terminal

pipeless start --stages-dir .

Provide a stream

Open a new terminal and run:

pipeless add stream --input-uri "" --output-uri "screen" --frame-path "cats"