@@ -17,19 +17,21 @@ It also has out-of-box support for retraining on Google Open Images dataset.
17
17
5 . Pandas
18
18
6 . Boto3 if you want to train models on the Google OpenImages Dataset.
19
19
20
+ ## Download models
21
+
22
+ ** Please download the models and put them into the folder "./models". The following sections will need them.** URL: https://drive.google.com/drive/folders/1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing
23
+
20
24
## Run the demo
21
25
### Run the live MobilenetV1 SSD demo
22
26
23
27
``` bash
24
- wget -P models https://storage.googleapis.com/models-hao/mobilenet-v1-ssd-mp-0_675.pth
25
- wget -P models https://storage.googleapis.com/models-hao/voc-model-labels.txt
28
+ # If you haven't downloaded the models, please download from https://drive.google.com/drive/folders/1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing.
26
29
python run_ssd_live_demo.py mb1-ssd models/mobilenet-v1-ssd-mp-0_675.pth models/voc-model-labels.txt
27
30
```
28
31
### Run the live demo in Caffe2
29
32
30
33
``` bash
31
- wget -P models https://storage.googleapis.com/models-hao/mobilenet_v1_ssd_caffe2/mobilenet-v1-ssd_init_net.pb
32
- wget -P models https://storage.googleapis.com/models-hao/mobilenet_v1_ssd_caffe2/mobilenet-v1-ssd_predict_net.pb
34
+ # If you haven't downloaded the models, please download from https://drive.google.com/drive/folders/1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing.
33
35
python run_ssd_live_caffe2.py models/mobilenet-v1-ssd_init_net.pb models/mobilenet-v1-ssd_predict_net.pb models/voc-model-labels.txt
34
36
```
35
37
@@ -38,8 +40,7 @@ You can see a decent speed boost by using Caffe2.
38
40
### Run the live MobileNetV2 SSD Lite demo
39
41
40
42
``` bash
41
- wget -P models https://storage.googleapis.com/models-hao/mb2-ssd-lite-mp-0_686.pth
42
- wget -P models https://storage.googleapis.com/models-hao/voc-model-labels.txt
43
+ # If you haven't downloaded the models, please download from https://drive.google.com/drive/folders/1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing.
43
44
python run_ssd_live_demo.py mb2-ssd-lite models/mb2-ssd-lite-mp-0_686.pth models/voc-model-labels.txt
44
45
```
45
46
@@ -53,7 +54,9 @@ You may notice MobileNetV2 SSD/SSD-Lite is slower than MobileNetV1 SSD/Lite on P
53
54
54
55
### Mobilenet V1 SSD
55
56
56
- URL: https://storage.googleapis.com/models-hao/mobilenet-v1-ssd-mp-0_675.pth
57
+ If you haven't downloaded the models, please download from https://drive.google.com/drive/folders/1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing .
58
+
59
+ Model: mobilenet-v1-ssd-mp-0_675.pth
57
60
58
61
```
59
62
Average Precision Per-class:
@@ -83,7 +86,9 @@ Average Precision Across All Classes:0.6755
83
86
84
87
### MobileNetV2 SSD-Lite
85
88
86
- URL: https://storage.googleapis.com/models-hao/mb2-ssd-lite-mp-0_686.pth
89
+ If you haven't downloaded the models, please download from https://drive.google.com/drive/folders/1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing .
90
+
91
+ Model: mb2-ssd-lite-mp-0_686.pth
87
92
88
93
```
89
94
Average Precision Per-class:
@@ -113,13 +118,13 @@ Average Precision Across All Classes:0.6860690100560214
113
118
The code to re-produce the model:
114
119
115
120
``` bash
116
- wget -P models https://storage.googleapis .com/models-hao/mb2-imagenet-71_8.pth
121
+ # If you haven't downloaded the models, please download from https://drive.google .com/drive/folders/1pKn-RifvJGWiOx0ZCRLtCXM5GT5lAluu?usp=sharing.
117
122
python train_ssd.py --dataset_type voc --datasets ~ /data/VOC0712/VOC2007 ~ /data/VOC0712/VOC2012 --validation_dataset ~ /data/VOC0712/test/VOC2007/ --net mb2-ssd-lite --base_net models/mb2-imagenet-71_8.pth --scheduler cosine --lr 0.01 --t_max 200 --validation_epochs 5 --num_epochs 200
118
123
```
119
124
120
125
### VGG SSD
121
126
122
- URL: https://storage.googleapis.com/models-hao/ vgg16-ssd-mp-0_7726.pth
127
+ Model: vgg16-ssd-mp-0_7726.pth
123
128
124
129
125
130
```
@@ -156,7 +161,6 @@ python train_ssd.py --datasets ~/data/VOC0712/VOC2007/ ~/data/VOC0712/VOC2012/ -
156
161
# # Training
157
162
158
163
` ` ` bash
159
- wget -P models https://storage.googleapis.com/models-hao/mobilenet_v1_with_relu_69_5.pth
160
164
python train_ssd.py --datasets ~/data/VOC0712/VOC2007/ ~/data/VOC0712/VOC2012/ --validation_dataset ~/data/VOC0712/test/VOC2007/ --net mb1-ssd --base_net models/mobilenet_v1_with_relu_69_5.pth --batch_size 24 --num_epochs 200 --scheduler cosine --lr 0.01 --t_max 200
161
165
` ` `
162
166
@@ -185,8 +189,6 @@ Let's we are building a model to detect guns for security purpose.
185
189
Before you start you can try the demo.
186
190
187
191
```bash
188
- wget -P models https://storage.googleapis.com/models-hao/gun_model_2.21.pth
189
- wget -P models https://storage.googleapis.com/models-hao/open-images-model-labels.txt
190
192
python run_ssd_example.py mb1-ssd models/gun_model_2.21.pth models/open-images-model-labels.txt ~/Downloads/big.JPG
191
193
```
192
194
0 commit comments