Giter Club home page Giter Club logo

object-detection-dataset-generator's Introduction

object detection dataset generator

This tool uses a deep learning tracker to generate bounding box annotations for detection datasets (COCO format).

Prerequisites

This tool requires pysot and the siammask_e add-on for pysot. Steps for installation are below.

  1. Install requirements
    $ pip install -r requirements.txt
  2. Clone pysot repo and follow instructions in the pysot INSTALL.md. The pip requirements above should cover everything needed for pysot so only the extension building step should be needed.
  3. Clone SiamMask_E and run the install.sh script.
  4. Download the siammask_r50_l3 .pth file from PySOT Model Zoo and place it in /path/to/pysot/experiments/siammaske_r50_l3/model.pth.
  5. Export environment variables necessary for finding pysot:
    $ export PYTHONPATH=/path/to/pysot:$PYTHONPATH
    $ export PYSOTPATH=/path/to/pysot
    

Some usage examples

Generate bounding boxes for a video file. Set the dataset name and the class for the selected object. Images and a COCO json file will be saved in the results/ directory:

$ python coco_dataset_generator.py --video example_data/train/VID_20200730_151459.mp4 --dataset uticnice --class uticnica

Generate boxes for all videos in the selected directory and discard blurry frames:

$ python coco_dataset_generator.py --dir example_data/train/ --dataset uticnice --class uticnica --discard_blurry_frames

Manually select bounding boxes for all images in a directory:

$ python coco_dataset_generator.py --manual --dir example_data/valid/ --dataset uticnice_valid --class uticnica

If the selected bounding box was incorrect press 'c' to cancel and select it again. Tracking can be paused by pressing 'p'. Pressing 'r' during tracking resets the tracker - user selects a bbox for the current frame so the tracker can continue. Pressing 'n' ends the current video.

This project was tested with Python 3.7.6 and package versions found in requirements.txt

object-detection-dataset-generator's People

Contributors

dbarac avatar

Stargazers

 avatar

Watchers

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