-
Make sure Python >= 3.7 and Git are pre-installed.
-
Clone this repository.
$ git clone [email protected]:liberaliscomputing/video-object-detection.git
$ cd video-object-detection
- Create and activate a virtual environment. Install dependencies.
$ python3 -m venv venv && source venv/bin/activate
(venv) $ pip install --upgrade pip && pip install -r requirements.txt
- Download the PointRend model.
(venv) $ wget --quiet https://github.com/ayoolaolafenwa/PixelLib/releases/download/0.2.0/pointrend_resnet50.pkl
- This script requires two arguments.
(venv) $ python detect.py -h
SOURCE: A path to source videoOUTPUT: A path to output video
The following optional arguments can be passed in as well:
--model: A model with pre-trained weights, defaults to"pointrend_resnet50.pkl"--frames_per_second: A Parameter that sets the number of frames per second for the output video, defaults to3
- Run the following command with arguments.
(venv) $ python detect.py source.mov output.mov [--frame_per_second 10]