amdegroot/ssd.pytorch hiện có 5.2k sao trên GitHub, viết chủ yếu bằng Python. A PyTorch Implementation of Single Shot MultiBox Detector
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
SSD: Single Shot MultiBox Object Detector, in PyTorch
A PyTorch implementation of Single Shot MultiBox Detector from the 2016 paper by Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang, and Alexander C. Berg. The official and original Caffe code can be found here.
Table of Contents
Installation
Datasets
Train
Evaluate
Performance
Demos
Future Work
Reference
Installation
Install PyTorch by selecting your environment on the website and running the appropriate command.
Clone this repository.
Note: We currently only support Python 3+.
Then download the dataset by following the instructions below.
We now support Visdom for real-time loss visualization during training!
To use Visdom in the browser:
# First install Python server and client
pip install visdom
# Start the server (probably in a screen or tmux)
python -m visdom.server
Then (during training) navigate to http://localhost:8097/ (see the Train section below for training details).
Note: For training, we currently support VOC and COCO, and aim to add ImageNet 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.
COCO
Microsoft COCO: Common Objects in Context
Download COCO 2014
# 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
# specify a directory for dataset to be downloaded into, else default is ~/data/
sh data/scripts/VOC2007.sh # <directory>
Download VOC2012 trainval
# specify a directory for dataset to be downloaded into, else default is ~/data/
sh data/scripts/VOC2012.sh # <directory>
Training SSD
First download the fc-reduced VGG-16 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 ssd.pytorch/weights dir:
mkdir weights
cd weights
wget https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth
To train SSD using the train script simply specify the parameters listed in train.py as a flag or manually change them.
python train.py
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.py for options)
Evaluation
To evaluate a trained network:
python eval.py
You can specify the parameters listed in the eval.py file by flagging them or manually changing them.
Performance
VOC2007 Test
mAP
Original
Converted weiliu89 weights
From scratch w/o data aug
From scratch w/ data aug
77.2 %
77.26 %
58.12%
77.43 %
FPS
GTX 1060: ~45.45 FPS
Demos
Use a pre-trained SSD network for detection
Download a pre-trained network
We are trying to provide PyTorch state_dicts (dict of weight tensors) of the latest SSD model definitions trained on different datasets.
Currently, we provide the following PyTorch models:
SSD300 trained on VOC0712 (newest PyTorch weights)
Our goal is to reproduce this table from the original paper
Try the demo notebook
Make sure you have jupyter notebook installed.
Two alternatives for installing jupyter notebook:
If you installed PyTorch with conda (recommended), then you should already have it. (Just navigate to the ssd.pytorch cloned repo and run):
jupyter notebook
If using pip:
# make sure pip is upgraded
pip3 install --upgrade pip
# install jupyter notebook
pip install jupyter
# Run this inside ssd.pytorch
jupyter notebook
Now navigate to demo/demo.ipynb at http://localhost:8888 (by default) and have at it!
Try the webcam demo
Works on CPU (may have to tweak cv2.waitkey for optimal fps) or on an NVIDIA GPU
This demo currently requires opencv2+ w/ python bindings and an onboard webcam
You can change the default webcam in demo/live.py
Install the imutils package to leverage multi-threading on CPU:
pip install imutils
Running python -m demo.live opens the webcam and begins detecting!
TODO
We have accumulated the following to-do list, which we hope to complete in the near future
Still to come:
Support for the MS COCO dataset
Support for SSD512 training and testing
Support for training on custom datasets
Authors
Max deGroot
Ellis Brown
Note: Unfortunately, this is just a hobby of ours and not a full-time job, so we'll do our best to keep things up to date, but no guarantees. That being said, thanks to everyone for your continued help and feedback as it is really appreciated. We will try to address everything as soon as possible.
References
Wei Liu, et al. "SSD: Single Shot MultiBox Detector." ECCV2016.
Original Implementation (CAFFE)
A huge thank you to Alex Koltun and his team at Webyclip for their help in finishing the data augmentation portion.
A list of other great SSD ports that were sources of inspiration (especially the Chainer repo):
Có — amdegroot/ssd.pytorch phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/amdegroot/ssd.pytorch.
amdegroot/ssd.pytorch là gì?
amdegroot/ssd.pytorch (amdegroot/ssd.pytorch) là dự án Python trên GitHub. Theo mô tả gốc: A PyTorch Implementation of Single Shot MultiBox Detector
amdegroot/ssd.pytorch so với các dự án AI Tools khác thế nào?
amdegroot/ssd.pytorch được TopGit xếp vào nhóm AI Tools, với 5.2k sao GitHub và viết bằng Python. Xem trang chủ đề AI Tools trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
Cùng nhóm AI Tools còn repo nào?
amdegroot/ssd.pytorch thuộc nhóm AI Tools trên TopGit, cùng 8 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về amdegroot/ssd.pytorch ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/amdegroot/ssd.pytorch là nguồn chính thức.
Vì sao amdegroot/ssd.pytorch được xếp vào nhóm AI Tools?
TopGit xếp amdegroot/ssd.pytorch vào nhóm AI Tools dựa trên GitHub topics và mô tả của repo (gắn thẻ: "computer-vision", "deep-learning", "image-recognition"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về ssd.pytorch?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về ssd.pytorch.