ShuangXieIrene / ssds.pytorch

Repository for Single Shot MultiBox Detector and its variants, implemented with pytorch, python3.
MIT License
571 stars 167 forks source link
darknet fssd mobilenet pytorch rfb ssd vgg yolo

ssds.pytorch

Repository for Single Shot MultiBox Detector and its variants, implemented with pytorch, python3. This repo is easy to setup and has plenty of visualization methods. We hope this repo can help people have a better understanding for ssd-like model and help people train and deploy the ssds model easily.

Currently, it contains these features:

This repo is depended on the work of ODTK, Detectron and Tensorflow Object Detection API. Thanks for their works.

Notice The pretrain model for the current version does not finished yet, please check the previous version for enrich pretrain models.

Table of Contents

Installation

requirements

Docker

git clone https://github.com/ShuangXieIrene/ssds.pytorch.git
docker build -t ssds:local ./ssds.pytorch/
docker run --gpus all -it --rm -v /data:/data ssds:local

Usage

0. Check the config file by Visualization

Defined the network in a config file and tweak the config file based on the visualized anchor boxes

python -m ssds.utils.visualize -cfg experiments/cfgs/tests/test.yml

1. Training

# basic training
python -m ssds.utils.train -cfg experiments/cfgs/tests/test.yml
# parallel training
python -m torch.distributed.launch --nproc_per_node={num_gpus} -m ssds.utils.train_ddp -cfg experiments/cfgs/tests/test.yml

2. Evaluation

python -m ssds.utils.train -cfg experiments/cfgs/tests/test.yml -e

3. Export to ONNX or TRT model

python -m ssds.utils.export -cfg experiments/cfgs/tests/test.yml -c best_mAP.pth -h

Performance

Visualization