Git Product home page Git Product logo

smart-cctv-demo's Introduction

Setup

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

Datasets

  • 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

Test files (face recognition)

  • Download video and move to "data/tom_cruise_test.mp4"
  • Download query and move to "data/tom_cruise_profile1.jpeg"

Weights

  • Download reid checkpoint from here and move to weights/
  • Download remaining checkpoints from here and extract to weights/

Final directory structure

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

Query demo

# 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

GUI

  • 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

Demo

Face recognition

face recognition

Person recognition

person detection

smart-cctv-demo's People

Contributors

kevingalim avatar

Stargazers

Kyunghoon Kim avatar

Watchers

Jeehoon Kang avatar Kyunghoon Kim avatar  avatar Minjae Kim avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.