1.how to have a folder of wwb ?you can download from Ross Girshick:https://github.com/rbgirshick/py-faster-rcnn. and next is cd wwb/lib/datasets,to new a file named contain_lorry.py.this is to recognize ROI region from the origin image ,so the classes are two:background and num,and new another file named lorry_roi_regions.py to recognize digit from ROI image after annotation,so the classes are 11,ie,background,0,1,2,3,4,5,6,7,8,9,modify any needed.
keep an eye on the format of image.bmp of jpg.
2.cd wwb/lib/datasets,add your train part in factory.py,like this :
from datasets.container_lorry import container_lorry
from datasets.lorry_roi_regions import lorry_roi_regions
train container lorry
lorry_devkit_path = ‘data/containerLorry’
for split in [‘train’, ‘test’]:
name = ‘{}_{}’.format(‘lorry’, split)
__sets[name] = (lambda split=split: container_lorry(split, lorry_devkit_path))
train container lorry ROI regions
lorry_roi_devkit_path = ‘data/LorryROIRegions’
for split in [‘train’, ‘test’]:
name = ‘{}_{}’.format(‘lorry_roi’, split)
__sets[name] = (lambda split=split: lorry_roi_regions(split, lorry_roi_devkit_path))
3.cd wwb/experiments/cfgs,new a container_lorry.yml and file named container_lorry_roi.yml,like this :
EXP_DIR: container_lorry
MODELS_DIR: models/container_lorry
TRAIN:
BG_THRESH_LO: 0.0
TEST:
HAS_RPN: True
4.
cd wwb/models,new a folder named container_lorry for ROI detect and lorry_roi_regions for object detect in ROI Image.the container_lorry contains ZF folder,modefy the folder named :faster_rcnn_alt_opt,refer to the link to adapt network model(ZF):https://github.com/deboc/py-faster-rcnn/blob/master/help/Readme.md.