Skip to content

tiamo405/trash-dumping

Repository files navigation

YOWOv2: A Stronger yet Efficient Multi-level Detection Framework for Real-time Spatio-temporal Action Detection

Tiamo405

Overview of YOWOv2

image

Requirements

  • We recommend you to use Anaconda to create a conda environment:
conda create -n trash python=3.9
  • Then, activate the environment:
conda activate trash
  • Requirements:
pip install -r requirements.txt 

Visualization

image image

Dataset

trash   __videos        __ Walking        __video1.mp4
        |               |                |__video2.mp4  
        |               |                |__.....
        |               |__ trashDumping  __video1.mp4
        |                                |__video2.mp4  
        |                                |__.....   
        |__label        __ Walking       __video1  __ frame11.txt
        |               |               |         |__ frame12.txt
        |               |               |         |__ .....        
        |               |               |__video2   __ frame11.txt
        |               |               |          |__ frame12.txt
        |               |               |          |__ .....
        |               |               |__ .....
        |               |__ trashDumping __video1 __ frame21.txt
        |                               |         |__ frame22.txt
        |                               |         |__ .....        
        |                               |__video2   __ frame21.txt
        |                               |          |__ frame22.txt
        |                               |          |__ .....
        |                               |__ .....    
        |__rgb-images    __ Walking     __video1   __ frame1.jpg
        |               |               |         |__ frame2.jpg
        |               |               |         |__ .....        
        |               |               |__video2   __ frame1.jpg
        |               |               |          |__ frame2.jpg
        |               |               |          |__ .....
        |               |               |__ .....
        |               |__ trashDumping __video1  __ frame1.jpg
        |                                |         |__ frame2.jpg
        |                                |         |__ .....        
        |                                |__video2   __ frame1.jpg
        |                                |          |__ frame2.jpg
        |                                |          |__ .....
        |                                |__ .....    
        |__testlist.txt
        |__trainlist.txt                

Trash Dumping

You can download Trash Dumping from the following links:

GDrive

Custom data

  • Create folder labels, rgb-images
python extract_frame/video2frame.py --folder_videos trash/videos/Walking --label Walking
python extract_frame/video2frame.py --folder_videos trash/videos/trashDumping --label trashDumping
  • Create testlist.txt, trainlist.txt
python trash/build_split.py

Experiment

  • Trash Dumping
Model weight
YOWOv2-Nano ckpt - chua co
YOWOv2-Tiny ckpt - chua co
YOWOv2-medium ckpt

Train YOWOv2

  • Trash Dumping

For example:

python train.py --cuda -d trash --root . -v yowo_v2_nano --num_workers 2 --num_classes 2 --eval_epoch 1 --max_epoch 8 --lr_epoch 2 3 4 5 -lr 0.0001 -ldr 0.5 -bs 8 -accu 16 -K 16

or you can just run the script:

sh train_trash.sh

Colab

Colab

Demo

# run demo
python demo.py --cuda \
                -v yowo_v2_medium \
                --num_classes 2 \
                -size 224 \
                --weight checkpoints/trash/yowo_v2_medium/yowo_v2_medium_epoch_50.pth \
                --video video_test/v_Basketball_g01_c02.mp4 \
                --vis_thresh 0.5 \
                -d trash \

or you can just run the script:

bash demo_trash.sh

Note

Author  : Tran Phuong Nam
Contact : [email protected]
Mentor  : Cong Tran
Lab     : Naver

References

Github YOWO2

@article{yang2023yowov2,
  title={YOWOv2: A Stronger yet Efficient Multi-level Detection Framework for Real-time Spatio-temporal Action Detection},
  author={Yang, Jianhua and Kun, Dai},
  journal={arXiv preprint arXiv:2302.06848},
  year={2023}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published