Make sure you have have the pipenv package manager installed
pip3 install pipenvInstall dependencies using pipenv
pipenv shell
pipenv installCommand line usage
- Enter the environment using:
pipenv shell- Preprocess your video files:
- Individally as:
python3 -m dimensionfour.preprocess --input dataset/1.mp4
python3 -m dimensionfour.preprocess --input dataset/2.mp4
...- Or in bulk as:
python3 -m dimensionfour.preprocess --input dataset/*The first time you run dimensionfour.preprocess, it will download a pretrained yolov3 model from dropbox.
Preprocessing will output a file called <filename>.d4artifact.zip into the current directory which contains metadata about your video
- Assemble your
.d4artifact.zipfiles into a final video:
python3 -m dimensionfour.assemble --input *.d4artifact.zip --output summary.aviThis will output a summarized video of all d4artifacts in the current directory as summary.avi
You can filter the summarized video to only include certain object classes using the --filter option:
Default: No Filter
python3 -m dimensionfour.assemble --input *.d4artifact.zip --output summary.avi --filter personYou can set the fps of the output using the --fps option:
Default: 30
python3 -m dimensionfour.assemble --input *.d4artifact.zip --output summary.avi --fps 10