GithubHelp home page GithubHelp logo

zwd1993 / container_detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from laurentberder/container_detection

0.0 0.0 0.0 246.65 MB

Computer vision Object Detection Program to detect and count specific objects (shipping containers) from images and/or videos

Python 91.89% R 8.11%

container_detection's Introduction

Computer vision:

Object Detection to detect and count specific objects (shipping containers) from images and/or videos

This project is based on ChainerCV API and Single Shot MultiBox Detector algorithm. The dataset used for training is a mix of COCO dataset and manually labeled images (using yuyu21's tool). The reason for this is that my first attempt, using only my labeled images, was very effective in terms of True Positives, but was also generating lots of False Positives, so I had to enrich the datasets for some negative mining.

Labeling

Labeling is done throug the graphical interface (credit to MIT ) with the command:

python source/flask_app.py --image_dir datasets/train/ --label_names source/label_names_coco_container.yml --file_ext jpg

Training

I have been using a RedHat 7.4 server with a GPU (Tesla) for the training, and have gone through 500K+ iterations, with validation every 1K and decreased learning rate every 100K.

Training is done with the command:

python source/examples/ssd/train.py --train datasets/train/   --lr 0.0001 --step_size 100000  --val datasets/validation   --label source/label_names_coco_container.yml    --out models/ --gpu 0 --loaderjob 10   --iteration 1000000 --val_iteration 1000

Test on images

I created a Shiny app for the application of the model, which calls a python program to display side by side the original image and the result:

shiny_demo

Test on videos

I've also downloaded a few clips of videos and labeled them. Since the model used is not very fast, it can't be used real time (detection takes a couple seconds per images).

So the script captures all the frames, then labels each of them, and reconstructs the video from the label frames:

python Video/label_video.py --video_file "path_to_video(s)_to_labelize"

Results

Result_video

container_detection's People

Contributors

laurentberder 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.