Our dataset, annotation instructions, dataset documentation and intended uses are published and you can download our dataset from here
- download the dataset from here
- unzip the dataset and put it in the
dataset
folder - run
python train.py
to train the model with the default parameters defined in train.py. the usage is as same as original yolov5 method's usage. you can also change the parameters by yourself.
- create a file named
test.txt
, and put the path of the test videos in it - run
python test.py --val test.txt
and our pre-trained weight can be downloaded from Google Drive or Baidu Yun. - the results will be saved in the
video
folder
CPU: Intel(R) Xeon(R) Gold 5117 CPU @ 2.00GHz GPU: GeForce RTX 3090
source code: BSUV-NET-2.0
- python: 3.8.8
- pytorch: 1.8.1
- opencv: 4.0.1
- network: unetvgg16
- inp_size: 600
- empty_bg: manual
- recent_bg: None
- seg_ch: None
- lr: 0.0001
- weight_decay: 0.01
- opt: adam
- aug_ioa: None
source code: MOBILE-VOD
- python: 3.8.12
- pytorch: 1.11.0
- opencv-python: 4.5.5.64
- network: mvod_lstm1
- lr: 0.003
- momentum: 0.9
- weight_decay: 0.0005
- gamma: 0.1
Run python precision_recall_tro.py --algo <k>
for <k> = MOG2, KNN, ...
to compute the results for each fold. This code will save the results to result.txt
.
- python: 3.8.8
- opencv-contrib-python: 4.5.5.64
opencv::createBackgroundSubtractorMOG2()
- history: 300
- varThreshold: 100
- detectShadow: false
opencv::createBackgroundSubtractorKNN()
- history: 300
- varThreshold: 100
- detectShadow: false
opencv::bgsegm::createBackgroundSubtractorMOG()
- default
opencv::bgsegm::createBackgroundSubtractorCNT()
- setIsParallel
- setUseHistory
- setMinPixelStability(1)
- setMaxPixelStability(4)
cv::bgsegm::BackgroundSubtractorGMG
- setNumFrames(5)
- setUpdateBackgroundModel(True)
cv::bgsegm::BackgroundSubtractorGSOC
- history: 300
- varThreshold: 100
cv::bgsegm::BackgroundSubtractorLSBP
- default
Run python vibe.py
to compute the results for each fold. This code will save the results to result.txt
.
- num_sam: 20
- min_match: 2
- radiu: 20
- rand_sa: 16