Add script to download COCO val2017
Signed-off-by: xavier <micaelaverucchi@gmail.com>
This commit is contained in:
@@ -118,7 +118,12 @@ this will genereate resnet101_cnet.rt and dla34_cnet.rt file that can be used fo
|
||||
## mAP demo
|
||||
To compute mAP, precision, recall and f1score, run the map_demo.
|
||||
|
||||
The following parameters are needed:
|
||||
A validation set is needed. To download COCO_val2017 run (form the root folder):
|
||||
```
|
||||
bash download_validation.sh
|
||||
```
|
||||
|
||||
To compute the map, the following parameters are needed:
|
||||
```
|
||||
./map_demo <network rt> <network type [y|c]> <labels file path> <config file path>
|
||||
```
|
||||
@@ -131,5 +136,6 @@ where
|
||||
Example:
|
||||
|
||||
```
|
||||
./map_demo dla34_cnet.rt c path/to/labelsCOCO_val2017.txt ../demo/config.yaml
|
||||
cd build
|
||||
./map_demo dla34_cnet.rt c ../demo/COCO_val2017/all_labels.txt ../demo/config.yaml
|
||||
```
|
||||
+2
-2
@@ -31,7 +31,7 @@ int main(int argc, char *argv[])
|
||||
char ntype = 'y';
|
||||
char *config_filename = "../demo/config.yaml";
|
||||
char * net = "yolo3.rt";
|
||||
char * labels_path = "/media/887E650E7E64F67A/val2017/all_labels2017.txt";
|
||||
char * labels_path = "../demo/COCO_val2017/all_labels.txt";
|
||||
bool show = false;
|
||||
bool write_dets = false;
|
||||
int n_images = 1000;
|
||||
@@ -42,7 +42,7 @@ int main(int argc, char *argv[])
|
||||
ntype = argv[2][0];
|
||||
if(argc > 3)
|
||||
labels_path = argv[3];
|
||||
if(argc > 3)
|
||||
if(argc > 4)
|
||||
config_filename = argv[4];
|
||||
|
||||
tk::dnn::Yolo3Detection yolo;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd demo
|
||||
wget https://cloud.hipert.unimore.it/s/LNxBDk4wzqXPL8c/download -O COCO_val2017.zip
|
||||
unzip -d COCO_val2017 COCO_val2017.zip
|
||||
rm COCO_val2017.zip
|
||||
cd COCO_val2017/
|
||||
realpath labels/* > all_labels.txt
|
||||
Reference in New Issue
Block a user