https://github.com/jianzhnie/refinedet_pytorch
RefineDet in Pytorch
https://github.com/jianzhnie/refinedet_pytorch
object-detection refinedet ssd
Last synced: 6 months ago
JSON representation
RefineDet in Pytorch
- Host: GitHub
- URL: https://github.com/jianzhnie/refinedet_pytorch
- Owner: jianzhnie
- Created: 2019-11-29T10:15:40.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-29T10:24:20.000Z (almost 6 years ago)
- Last Synced: 2025-02-14T11:53:05.070Z (8 months ago)
- Topics: object-detection, refinedet, ssd
- Language: Python
- Size: 3.74 MB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Single-Shot Refinement Neural Network for Object Detection #
A higher performance [PyTorch](http://pytorch.org/) implementation of [Single-Shot Refinement Neural Network for Object Detection](https://arxiv.org/abs/1711.06897 ). The official and original Caffe code can be found [here](https://github.com/sfzhang15/RefineDet).
### Table of Contents
- Performance
- Installation
- Datasets
- Train
- Evaluate
- Future Work
- Reference
## Performance
#### VOC2007 Test
##### mAP (*Single Scale Test*)
| Arch | Paper | Caffe Version | Our PyTorch Version |
|:-:|:-:|:-:|:-:|
| RefineDet320 | 80.0% | 79.52% | 79.81% |
| RefineDet512 | 81.8% | 81.85% | 80.50% |## Installation
- Install [PyTorch](http://pytorch.org/) by selecting your environment on the website and running the appropriate command.
* Note: You should use at least PyTorch0.4.0
- Clone this repository.
* Note: We currently only support Python 3+.
- Then download the dataset by following the [instructions](#datasets) below.
- Note: For training, we currently support [VOC](http://host.robots.ox.ac.uk/pascal/VOC/) and [COCO](http://mscoco.org/), and aim to add [ImageNet](http://www.image-net.org/) support soon.## Datasets
To make things easy, we provide bash scripts to handle the dataset downloads and setup for you. We also provide simple dataset loaders that inherit `torch.utils.data.Dataset`, making them fully compatible with the `torchvision.datasets` [API](http://pytorch.org/docs/torchvision/datasets.html).### COCO
Microsoft COCO: Common Objects in Context##### Download COCO 2014
```Shell
# specify a directory for dataset to be downloaded into, else default is ~/data/
sh data/scripts/COCO2014.sh
```### VOC Dataset
PASCAL VOC: Visual Object Classes##### Download VOC2007 trainval & test
```Shell
# specify a directory for dataset to be downloaded into, else default is ~/data/
sh data/scripts/VOC2007.sh #
```##### Download VOC2012 trainval
```Shell
# specify a directory for dataset to be downloaded into, else default is ~/data/
sh data/scripts/VOC2012.sh #
```## Training RefineDet
- First download the fc-reduced [VGG-16](https://arxiv.org/abs/1409.1556) PyTorch base network weights at: https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth
- By default, we assume you have downloaded the file in the `RefineDet.PyTorch/weights` dir:- To train RefineDet320 or RefineDet512 using the train scripts `train_refinedet320.sh` and `train_refinedet512.sh`. You can manually change them as you want.
```Shell
./train_refinedet320.sh #./train_refinedet512.sh
```- Note:
* For training, an NVIDIA GPU is strongly recommended for speed.
* For instructions on Visdom usage/installation, see the Installation section.
* You can pick-up training from a checkpoint by specifying the path as one of the training parameters (again, see `train_refinedet.py` for options)## Evaluation
To evaluate a trained network:```Shell
./eval_refinedet.sh
```You can specify the parameters listed in the `eval_refinedet.py` file by flagging them or manually changing them.
## References
- [Original Implementation (CAFFE)](https://github.com/sfzhang15/RefineDet)
- A list of other great SSD ports that were sources of inspiration:
* [amdegroot/ssd.pytorch](https://github.com/amdegroot/ssd.pytorch)
* [lzx1413/PytorchSSD](https://github.com/lzx1413/PytorchSSD)