Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to compute mAP in this code #2

Open
summerrr opened this issue Sep 27, 2018 · 10 comments
Open

how to compute mAP in this code #2

summerrr opened this issue Sep 27, 2018 · 10 comments

Comments

@summerrr
Copy link

No description provided.

@engineer1109
Copy link
Owner

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

@summerrr
Copy link
Author

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

@summerrr
Copy link
Author

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

@engineer1109
Copy link
Owner

@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
Copy link
Author

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
Copy link
Owner

@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
Copy link
Author

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
Copy link
Author

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

@engineer1109
Copy link
Owner

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

@summerrr
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants