sudo apt install cmake
sudo apt install \
furiosa-libhal-warboy=0.9.0-2+nightly-220810 \
libonnxruntime=1.11.1-2 \
furiosa-libnux=0.8.0-2+nightly-220810 \
furiosa-libcompiler=0.8.0-2+nightly-220803
conda env create -n "cctv" python=3.8
conda activate cctv
conda install cython
conda env update --file environment.yml
bash build.sh
- Download CrowdHuman from here and extract to "data/CrowdHuman/"
- Download PRW from here and extract to "data/"
- Download WIDERFACE from here and extract to "data/"
- Download MSM1-RetinaFace from here and extract to "data/"
- market1501 dataset will be downloaded automatically at progam execution
- Download video and move to "data/tom_cruise_test.mp4"
- Download query and move to "data/tom_cruise_profile1.jpeg"
- Download reid checkpoint from here and move to weights/
- Download remaining checkpoints from here and extract to weights/
smart-cctv-demo$ tree -L 2 data weights
data
├── CrowdHuman
│ └── Images
├── PRW-v16.04.20
│ ├── ID_test.mat
│ ├── ID_train.mat
│ ├── annotations
│ ├── frame_test.mat
│ ├── frame_train.mat
│ ├── frames
│ ├── generate_query.m
│ ├── query_box
│ ├── query_info.txt
│ └── readme.txt
├── WIDER_val
│ └── images
├── market1501
│ ├── Market-1501-v15.09.15
│ └── Market-1501-v15.09.15.zip
├── ms1m-retinaface-t1
│ ├── agedb_30.bin
│ ├── cfp_fp.bin
│ ├── lfw.bin
│ ├── property
│ ├── train.idx
│ ├── train.lst
│ └── train.rec
├── tom_cruise_profile1.jpeg
└── tom_cruise_test.mp4
weights
├── ms1mv3_r50_leakyrelu_1.pt
├── resnet50_market_xent.pth.tar
├── yolov5_face_relu.pt
└── yolov5m_warboy.pt
# Optionally clear cache
rm *.onnx # f32 model cache
rm *.dfg # i8 model cache
rm -rf galleries/* # gallery cache
rm -rf results/* # delete previous results
# Face recognition (results will be written to "results/face")
cd insightface
python recognition/arcface_torch/query_video.py \
--gallery ../data/tom_cruise_test.mp4 \
--query ../data/tom_cruise_profile1.jpeg \
--device furiosa
# ReId (results will be written to "results/reid")
cd torchreid
python query_video.py \
--gallery ../data/PRW-v16.04.20/frames \
--query ../data/PRW-v16.04.20/query_box/479_c1s3_016471.jpg \
--device furiosa
-
Local inference
python demo.py
-
Server inference
Add to ~/.ssh/config
Host vis HostName 210.109.63.237 User ubuntu IdentityFile ~/.ssh/vision-intelligence.pem IdentitiesOnly yes
Run
python demo.py --server cfg/server_vis.yaml