engineer1109 / TensorFlow-R-FCN-for-primary-students

R-FCN Tensorflow version for primary students
MIT License
13 stars 2 forks source link

how to compute mAP in this code #2

Open summerrr opened 6 years ago

engineer1109 commented 6 years ago

merge the code with https://github.com/engineer1109/tf-faster-rcnn

summerrr commented 6 years ago

我不懂,为什么要合并这俩,那要怎么训练怎么测试呢

summerrr commented 6 years ago

sorry, I don‘t know how to merge, and how to run and test,this code can‘t run directly?

engineer1109 commented 6 years ago

@summerrr Saulty fish, I have updated my demo code. demo2.py in tools . You can " sh run " to demo. You need to change some configs. For train and eval , you "sh train". For the pretrained weights and data ,you can refer to https://github.com/engineer1109/tf-faster-rcnn. Same format pascal voc. Create Dir 'mkdir ./data' Test images can be put on 'data/demo'. Pretrained weights can be put on 'data/imagenet_weights'. Pascal Voc can be put on 'data/VOCdevkit2007'

summerrr commented 6 years ago

I put the data on data/VOCdevkit2007/VOC2007 ,and write the txt file to train test trainval and val, but it looks like it can't find the data,so what is the correct the position for train and test data?whether these put on the same dir? / File "/home/user10/notebook/TensorFlow-R-FCN-for-primary-students/tools/../lib/datasets/pascal_voc.py", line 70, in image_path_from_index 'Path does not exist: {}'.format(image_path) AssertionError: Path does not exist: /home/user10/notebook/TensorFlow-R-FCN-for-primary-students/data/VOCdevkit2007/VOC2007/JPEGImages/crop_field_200_5_msrgb

engineer1109 commented 6 years ago

@summerrr do you change the pascal_voc.py -- classes name? like person and plane image format is jpg. print your train.txt and your location of txt

summerrr commented 6 years ago

yes,I changed classes name and class num, and my txt is like this tim 20180929205819 /data/VOCdevkit2007/VOC2007/ImageSets/Main/train.txt and this is location

summerrr commented 6 years ago

I find it will regard it as a one jpg,and it can't split

engineer1109 commented 6 years ago

@summerrr Don't use windows txt edit it. Use Notepad++ or Notepadqq on Ubuntu. It should be: 00001 00002 00003 00004

summerrr commented 6 years ago

I tried and occurs another problem, Preparing training data... Traceback (most recent call last): File "./tools/trainval_net.py", line 109, in imdb, roidb = combined_roidb(args.imdb_name) File "./tools/trainval_net.py", line 80, in combined_roidb roidbs = [get_roidb(s) for s in imdb_names.split('+')] File "./tools/trainval_net.py", line 80, in roidbs = [get_roidb(s) for s in imdb_names.split('+')] File "./tools/trainval_net.py", line 77, in get_roidb roidb = get_training_roidb(imdb) File "/home/user10/notebook/TensorFlow-R-FCN-for-primary-students/tools/../lib/model/train_val.py", line 297, in get_training_roidb rdl_roidb.prepare_roidb(imdb) File "/home/user10/notebook/TensorFlow-R-FCN-for-primary-students/tools/../lib/roi_data_layer/roidb.py", line 31, in prepare_roidb roidb[i]['image'] = imdb.image_path_at(i) IndexError: list index out of range