Loading
2017. 6. 28. 22:46 - leee.sangwon

SSD coco dataset 설정


https://github.com/weiliu89/caffe/tree/ssd/data/coco


1. Download Images and Annotations from MSCOCO. By default, we assume the data is stored in $HOME/data/coco

1. annotations 다운로드

MSCOCO 사이트에서 다운로드

instances_train-val2014.zip: instances_train2014.json, instances_val2014.json

image_info_test2014.zip: image_info_test2014.json

image_info_test2015.zip: image_info_test2015.json, image_info_test-dev2015.json

https://github.com/rbgirshick/py-faster-rcnn/tree/master/data 여기서 다운로드

https://dl.dropboxusercontent.com/s/s3tw5zcg7395368/instances_valminusminival2014.json.zip?dl=0 : instances_valminusminval2014.json.zip

https://dl.dropboxusercontent.com/s/o43o90bna78omob/instances_minival2014.json.zip?dl=0 : instances_minval2014.json.zip


2. image 다운로드

2014 Training images [80k/13GB]

2014 Val. images [40k/6.2GB]

2014 Testing images [40k/6.2GB]

2015 Testing images [80k/12.4G]


3. 디렉토리 설정

$HOME/data/coco 디렉토리 생성

~/coco/annotations 디렉토리 생성 + annotations 파일 옮기기

~/coco/images 디렉토리 생성 + images 파일 옮기기


2. Get the coco code. We will call the directory that you cloned coco into $COCO_ROOT

git clone https://github.com/weiliu89/coco.git
cd coco
git checkout dev


3. Build the coco code.

cd PythonAPI
python setup.py build_ext --inplace



4. Split the annotation to many files per image and get the image size info.

# Check scripts/batch_split_annotation.py and change settings accordingly.
python scripts/batch_split_annotation.py
# Create the minival2014_name_size.txt and test-dev2015_name_size.txt in $CAFFE_ROOT/data/coco
python scripts/batch_get_image_size.py

batch_get_image_size.py 파일에 $CAFFE_ROOT가 $HOME/projects/caffe로 되어있어서 새로 폴더를 만들어서 결과물을 여기에 저장함

자신의 caffe 경로로 옮겨줄것




5. Create the LMDB file.

cd $CAFFE_ROOT
# Create the minival.txt, testdev.txt, test.txt, train.txt in data/coco/
python data/coco/create_list.py
# You can modify the parameters in create_data.sh if needed.
# It will create lmdb files for minival, testdev, test, and train with encoded original image:
#   - $HOME/data/coco/lmdb/coco_minival_lmdb
#   - $HOME/data/coco/lmdb/coco_testdev_lmdb
#   - $HOME/data/coco/lmdb/coco_test_lmdb
#   - $HOME/data/coco/lmdb/coco_train_lmdb
# and make soft links at examples/coco/
./data/coco/create_data.sh



6. python examples/ssd/ssd_coco.py

gpu 수 알맞게 고치기 (line 334)

ex) gpus="0,1,2,3" -> gpus="0"

'' 카테고리의 다른 글

파이썬 모르는거 모음  (0) 2018.03.22
windows 10 startup folder location  (0) 2017.12.08
SSD 설치시 오류  (0) 2017.06.28
Image Watch Visual Studio 2017에서 사용하기  (0) 2017.06.14
Synergy 1.8.8 Ubuntu 16.04 시작프로그램 등록  (0) 2017.06.13