GithubHelp home page GithubHelp logo

oi-deepscribe / deepscribe-detectron Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 59.35 MB

Experiments with sign detection using the Detectron2 library

Jupyter Notebook 97.12% Python 2.81% Shell 0.07%

deepscribe-detectron's Introduction

Deepscribe - Sign Detection

Repo containing config files and training scripts for a sign detector based on a Faster-RCNN object detector.

data

Unpack the data archive into this directory. The archive contains:

data/
+-- hotspots
|   +-- train
|   |   +-- UUID_index_class.jpg
|   +-- test
|   +-- val
+-- images_annotated
|   +-- UUID.jpg
+-- images_cropped
|   +-- UUID.jpg
+-- hotspots_all.json
+-- hotspots_test_coco.json
+-- hotspots_test.json
+-- hotspots_train_coco.json
+-- hotspots_train.json
+-- hotspots_val_coco.json
+-- hotspots_val.json
+-- signs.txt

This archive must be in the current working directory for the data set registration functions in dsdetectron/pfa.py to work properly.

config files

The config files in configs are standard Detectron2 train/test configuration files. More information here: https://detectron2.readthedocs.io/tutorials/configs.html

Of particular interest are the test NMS and score threshold parameters - feel free to play with those to change results at inference time.

training

The script train.sh contains an example using the script dsdetectron/train.py, a modification of the default Detectron2 training script.

example inference scripts

The scripts dsdetectron/visualize.py and dsdetectron/groundtruth.py contain examples of using trained models in inference. dsdetectron/visualize.py takes a tablet as input and returns an annotated image with predicted boxes drawn and a .npz archive containing confidence scores and individual hotspot images.

dsdetectron/groundtruth.py contains an example of producing predicted hotspots as well as approximate ground-truth labels using the complete sign list. This script loads a single example from the complete validation data, runs inference from a trained model, then extracts hotspot images as well as predicted ground-truth labels from the ground-truth hotspots. This script uses functions defined in dsdetectron/inferenceutils.py to align the predicted boxes with ground-truth boxes. If a box cannot be aligned, its predicted label will be "-1".

deepscribe-detectron's People

Stargazers

 avatar

Watchers

 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.