Skip to content

david-svitov/AmphibianDetector

Repository files navigation

AmphibianDetector

logo

This repository contains the official implementation of the article: "AmphibianDetector: adaptive computation for moving objects detection"

The proposed approach allows effectively detect moving objects of the target class in a video. It increases mean average precision by filtering out false-positive detections of static objects and reduces the average frame processing time due to adaptive computation - the detector partially process a frame if it does not contain moving target objects.
The proposed approach is modification of the CNN already trained for object detection task. This method can be used to improve the accuracy of an existing system by applying minor changes to the existing algorithm. The efficiency of the proposed approach was demonstrated on the open dataset "CDNet2014 pedestrian".

logo

Project structure

  • data_prepare - data preparation, translation of CDNet2014 labels into MS COCO format, augmentation of video frames;
  • models - pretrained models for detection in OD API format. models are downloaded separately from TF1 detection zoo;
  • gridsearch_params.sh & process_cdnet.sh - reproduction of the experiments presented in the article;
  • amphibiandetector_ssd.py - AmphibianDetector method implementation;
  • amphibiandetector_baseline.py - baseline method implementation for the experiments;
  • process_video.py - process one video from the CDNet2014 with the AmphibianDetector;
  • test_stream.py - testing the AmphibianDetector algorithm on a video stream.

How to run

SSD + MovileNetV2
To run AmphibianDetector on a video stream:

  1. Download ssd_mobilenet_v2_coco.pb from TF1 detection zoo and put it in the "models" folder;
  2. Run test_stream.py:
$ python3 test_stream.py 0
$ python3 test_stream.py ./video.avi

Other models
To run AmphibianDetector for your model:

  1. Download [CDNet2014 pedestrian] (http://jacarini.dinf.usherbrooke.ca/dataset2014/).
  2. Prepare and augment the dataset using ./data_prepare/cdnet_prepare.sh, ./data_prepare/cdnet_robot_insert.sh and ./data_prepare/cdnet_augment.sh
  3. Using the script ./gridsearch_params.sh find the optimal parameters for your model.

About

Acceleration of the detector of moving objects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published