Build flexible object detection pipelines with declarative configuration
You are being provided with the following set of features:
- Supporting latest PyTorch release
- Train SSD or RetinaNet
- Available backbones: torchvision + MobileNet, MobileNetV2
- Data augmentations
- AdamW and SGDW optimizers, some custom learning rate schedulers
- Weight pruning for efficient inference
- Export to ONNX or OpenVINO
- Tensorboard integration
- Training callbacks
Download PASCAL VOC or COCO dataset and start training using one of the provided sample configs:
python3 main.py --config samples/ssd_mb2_voc.py
(don't forget to adjust the path first!)
config
- a path to a config filesave_dir
- a folder where checkpoints are going to be savedcheckpoint_dir
- set this to restore training from a previously created checkpoint. All subsequent checkpoints will saved here instead ofsave_dir
unlessnew_checkpoint
arguments is specifiedphases
- one or multiple runtime phases:train
- run train loopeval
- run eval pass; if is set along withtrain
runs eacheval_every
'th epochtest
- run on a video, drawing annotationsexport
- export to ONNXexport-mo
- export to OpenVINO model formatembed
- (for debug purposes) drop to IPython shell after initialization
video
- a video or a folder (which will be searched recursively) fortest
phasetensorboard
- save tensorboard log to the checkpoint folder
python 3.6
opencv
with python bindingsrequirements.txt
Some places that may be useful to look into:
bf
- provides common reusable parts for building a deep learning pipelinebf.base
- custom backbone network implementation (e.g. MobileNetV2)bf.datasets
- dataset handlingbf.preprocessing
- data augmentations and preprocessingbf.training
- callbacks; custom optimizers and learning rate schedulers; weight prunner- ...
detection
- parts of code which are used to build object detection pipelines on top ofbf
samples
- contains sample configuration files for popular network architecturesmain.py
- the entry point
- Tensorflow Object Detection API (https://github.com/tensorflow/models/tree/master/research/object_detection)
- Gluon CV (https://github.com/dmlc/gluon-cv)