akshaykadam771 / Suspicious-Activity-Detection-Using-Pose-Estimation

24 stars 10 forks source link

:movie_camera: :running: :running: Suspicious-Activity-Detection-Using-Pose-Estimation

ezgif com-optimize

📝 Description

🎯 Inference demo

im1_HSP img2_HSP

🏽‍ Download Object Detection Model

🏽‍ For Pose Tracking, Download the object tracking model

🏽‍ Download Fast.res50.pt file

:desktop_computer: Installation

:hammer_and_wrench: Requirements

:gear: Setup on Colab

  1. Install PyTorch :-
    
    $ !pip3 install torch==1.1.0 torchvision==0.3.0

2. Git Clone :-
```bash
$ !git clone https://github.com/akshaykadam771/Suspicious-Activity-Detection-Using-Pose-Estimation.git 
  1. Install :-
    
    $ !export PATH=/usr/local/cuda/bin/:$PATH
```bash
$ !export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:$LD_LIBRARY_PATH
$ !pip install cython
$ !sudo apt-get install libyaml-dev
$ !python setup.py build develop --user
$ !python -m pip install Pillow==6.2.1
$ !pip install -U PyYAML

🎯 Inference

  1. Testing with Images ( Put test images in AlphaPose/examples/demo/ ) :-
    
    $ !python scripts/demo_inference.py --cfg configs/coco/resnet/256x192_res50_lr1e-3_1x.yaml --checkpoint pretrained_models/fast_res50_256x192.pth --indir examples/demo/ --save_img
2. Output Images & json file will save in bydefault **AlphaPose/examples/res** folder.

3. Testing with **Videos**  :-
```bash
$ !python scripts/demo_inference.py --cfg configs/coco/resnet/256x192_res50_lr1e-3_1x.yaml --checkpoint pretrained_models/fast_res50_256x192.pth --video examples/video/demo5.mp4 --outdir examples/res --save_video --gpus 0
  1. If it is giving memory error during Videos testing you can add --sp argument in command which enable Single processing :-
    
    $ !python scripts/demo_inference.py --cfg configs/coco/resnet/256x192_res50_lr1e-3_1x.yaml --checkpoint pretrained_models/fast_res50_256x192.pth --video examples/video/demo5.mp4 --outdir examples/res --save_video --gpus 0 --sp

## :open_file_folder: Json Dataset for training your own custom ML model :wrench: :nut_and_bolt: :hammer:   

- **Drive Link** :- https://drive.google.com/file/d/1sTJkWBmuE6iBi_mCAs1DJ-KR6MnoZD7-/view?usp=sharing
- This CSV file contaning 17 keypoints (Total 17x2=34 ) of Human body part as columns for each individual person while performing this 2 activities :-                **1) Climbing  2)Standing**
- **Action** :- 0 = Climbing & 1 = Standing