Cats Recognition with Pipeless
This example contains a Pipeless stage to recognize cats.
Requirements
-
Pipeless: Check the installation guide.
-
Python OpenCV package. Install it by running:
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 - https://github.com/pipeless-ai/pipeless/archive/main.tar.gz | tar -xz --strip=2 "pipeless-main/examples/cats"
Update the XML file path inside init.py
Update the line highlighted below to the actual path in your system (use an absolute path):
init.py
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 "https://pipeless-public.s3.eu-west-3.amazonaws.com/cats.mp4" --output-uri "screen" --frame-path "cats"