Sunarker / Collaborative-Learning-for-Weakly-Supervised-Object-Detection

MIT License
50 stars 13 forks source link

question about training on VOC07 #5

Open CCC-123 opened 5 years ago

CCC-123 commented 5 years ago

Hi, thanks for the sharing work. I trained the model with ./experiments/scripts/train.sh 0 pascal_voc vgg16 wsddnpath and I found in vgg16.yml it needs selective search. I tried to modified it into gt and I got

  File "./tools/trainval_net.py", line 114, in <module>
    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 77, in get_roidb
    roidb = get_training_roidb(imdb)
  File "/home/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/tools/../lib/model/train_val.py", line 320, in get_training_roidb
    imdb.append_flipped_images()
  File "/home/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/tools/../lib/datasets/imdb.py", line 126, in append_flipped_images
    boxes = self.roidb[i]['boxes'].copy()
KeyError: 'boxes'

the roidb object only has label key and no other key. I 'm confused about the data processing. Can you give me some suggestions, thank you

ShawnLiu1011 commented 5 years ago

@CCC-123 In fact, that's because you only changed PROPOSAL_METHOD but ignore codes here:

https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/4bd0df739b8bc3c50cc8cdfed905caaae0b12b06/lib/datasets/pascal_voc.py#L113-L114

which only detect labels to begin a WSD rather than boxes for gt.

You must use SelectiveSearchCodeIJCV to generate boxes for weak-supervised detection and save as .mat files , you can find relative files in FAST-rcnn.

alexshaodong commented 5 years ago

Have you solved this problem? Can you teach me?Thankyou!

weilaizhe666 commented 5 years ago

i have this problem too,and can‘t solve it 。

alexshaodong commented 5 years ago

Hi, thanks for the sharing work. I trained the model with ./experiments/scripts/train.sh 0 pascal_voc vgg16 wsddnpath and I found in vgg16.yml it needs selective search. I tried to modified it into gt and I got

  File "./tools/trainval_net.py", line 114, in <module>
    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 77, in get_roidb
    roidb = get_training_roidb(imdb)
  File "/home/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/tools/../lib/model/train_val.py", line 320, in get_training_roidb
    imdb.append_flipped_images()
  File "/home/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/tools/../lib/datasets/imdb.py", line 126, in append_flipped_images
    boxes = self.roidb[i]['boxes'].copy()
KeyError: 'boxes'

the roidb object only has label key and no other key. I 'm confused about the data processing. Can you give me some suggestions, thank you

Have you solved this problem? Can you teach me?Thankyou!

alexshaodong commented 5 years ago

@CCC-123 In fact, that's because you only changed PROPOSAL_METHOD but ignore codes here:

https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/4bd0df739b8bc3c50cc8cdfed905caaae0b12b06/lib/datasets/pascal_voc.py#L113-L114

which only detect labels to begin a WSD rather than boxes for gt.

You must use SelectiveSearchCodeIJCV to generate boxes for weak-supervised detection and save as .mat files , you can find relative files in FAST-rcnn.

Could you teach me how to change it?

alexshaodong commented 5 years ago

i have this problem too,and can‘t solve it 。

Have you solved this problem? Can you teach me?Thankyou!

ShawnLiu1011 commented 5 years ago

i have this problem too,and can‘t solve it 。

Have you solved this problem? Can you teach me?Thankyou!

Sry for reply late! The MAIN REASON is the experiment need selectivesearch functions but there isn't code in it. Firstly, you can find the option in config.py,keep the PROPOSAL_METHOD "selectivesearch"

https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/7910361eecbcc0ff044ac1e32a769ba2781a46e0/lib/model/config.py#L117

and keep the cfgs PROPOSAL_METHOD as well , for vgg16, it is

https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/7910361eecbcc0ff044ac1e32a769ba2781a46e0/experiments/cfgs/vgg16.yml#L8

And, you need generate .mat files for the weak detection. You can download .mat files for voc dataset from fast-rcnn project. For your own data, you have to write some codes to use functions in SelectiveSearchCodeIJCV to generate new .mat files. https://github.com/ZhangXinNan/SelectiveSearchCodeIJCV

You'd better read pascal_voc.py to know how two detections works. Such as https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/4bd0df739b8bc3c50cc8cdfed905caaae0b12b06/lib/datasets/pascal_voc.py#L216-L229

Best wishes.

alexshaodong commented 5 years ago

i have this problem too,and can‘t solve it 。

Have you solved this problem? Can you teach me?Thankyou!

Sry for reply late! The MAIN REASON is the experiment need selectivesearch functions but there isn't code in it. Firstly, you can find the option in config.py,keep the PROPOSAL_METHOD "selectivesearch"

https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/7910361eecbcc0ff044ac1e32a769ba2781a46e0/lib/model/config.py#L117

and keep the cfgs PROPOSAL_METHOD as well , for vgg16, it is

https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/7910361eecbcc0ff044ac1e32a769ba2781a46e0/experiments/cfgs/vgg16.yml#L8

And, you need generate .mat files for the weak detection. You can download .mat files for voc dataset from fast-rcnn project. For your own data, you have to write some codes to use functions in SelectiveSearchCodeIJCV to generate new .mat files. https://github.com/ZhangXinNan/SelectiveSearchCodeIJCV

You'd better read pascal_voc.py to know how two detections works. Such as https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/4bd0df739b8bc3c50cc8cdfed905caaae0b12b06/lib/datasets/pascal_voc.py#L216-L229

Best wishes.

Thank you very much! Because I am a novice, just touched this content. I still don't know how to change the code. When I use vgg16, there is no problem. But these problems have arisen recently when res101 is used. I would like to ask you to give me some guidance. In addition, I would like to ask you if you have any code to generate. mat files. I may not be able to write it myself.

ShawnLiu1011 commented 5 years ago

i have this problem too,and can‘t solve it 。

Have you solved this problem? Can you teach me?Thankyou!

Sry for reply late! The MAIN REASON is the experiment need selectivesearch functions but there isn't code in it. Firstly, you can find the option in config.py,keep the PROPOSAL_METHOD "selectivesearch" https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/7910361eecbcc0ff044ac1e32a769ba2781a46e0/lib/model/config.py#L117

and keep the cfgs PROPOSAL_METHOD as well , for vgg16, it is https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/7910361eecbcc0ff044ac1e32a769ba2781a46e0/experiments/cfgs/vgg16.yml#L8

And, you need generate .mat files for the weak detection. You can download .mat files for voc dataset from fast-rcnn project. For your own data, you have to write some codes to use functions in SelectiveSearchCodeIJCV to generate new .mat files. https://github.com/ZhangXinNan/SelectiveSearchCodeIJCV You'd better read pascal_voc.py to know how two detections works. Such as https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/4bd0df739b8bc3c50cc8cdfed905caaae0b12b06/lib/datasets/pascal_voc.py#L216-L229

Best wishes.

Thank you very much! Because I am a novice, just touched this content. I still don't know how to change the code. I would like to ask you to give me some guidance. In addition, I would like to ask you if you have any code to generate. mat files. I may not be able to write it myself.

Sry, That's all I can help. I 'm working with another project so I don't have other guidance any more. The codes to generate .mat files are easy and can find on internet. Maybe you can read codes times to grow up quickly. Trust yourself.

alexshaodong commented 5 years ago

i have this problem too,and can‘t solve it 。

Have you solved this problem? Can you teach me?Thankyou!

Sry for reply late! The MAIN REASON is the experiment need selectivesearch functions but there isn't code in it. Firstly, you can find the option in config.py,keep the PROPOSAL_METHOD "selectivesearch" https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/7910361eecbcc0ff044ac1e32a769ba2781a46e0/lib/model/config.py#L117

and keep the cfgs PROPOSAL_METHOD as well , for vgg16, it is https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/7910361eecbcc0ff044ac1e32a769ba2781a46e0/experiments/cfgs/vgg16.yml#L8

And, you need generate .mat files for the weak detection. You can download .mat files for voc dataset from fast-rcnn project. For your own data, you have to write some codes to use functions in SelectiveSearchCodeIJCV to generate new .mat files. https://github.com/ZhangXinNan/SelectiveSearchCodeIJCV You'd better read pascal_voc.py to know how two detections works. Such as https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/4bd0df739b8bc3c50cc8cdfed905caaae0b12b06/lib/datasets/pascal_voc.py#L216-L229

Best wishes.

Thank you very much! Because I am a novice, just touched this content. I still don't know how to change the code. I would like to ask you to give me some guidance. In addition, I would like to ask you if you have any code to generate. mat files. I may not be able to write it myself.

Sry, That's all I can help. I 'm working with another project so I don't have other guidance any more. The codes to generate .mat files are easy and can find on internet. Maybe you can read codes times to grow up quickly. Trust yourself.

Thank you!Best wishes!

alexshaodong commented 5 years ago

i have this problem too,and can‘t solve it 。

Have you solved this problem? Can you teach me?Thankyou!

Sry for reply late! The MAIN REASON is the experiment need selectivesearch functions but there isn't code in it. Firstly, you can find the option in config.py,keep the PROPOSAL_METHOD "selectivesearch" https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/7910361eecbcc0ff044ac1e32a769ba2781a46e0/lib/model/config.py#L117

and keep the cfgs PROPOSAL_METHOD as well , for vgg16, it is https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/7910361eecbcc0ff044ac1e32a769ba2781a46e0/experiments/cfgs/vgg16.yml#L8

And, you need generate .mat files for the weak detection. You can download .mat files for voc dataset from fast-rcnn project. For your own data, you have to write some codes to use functions in SelectiveSearchCodeIJCV to generate new .mat files. https://github.com/ZhangXinNan/SelectiveSearchCodeIJCV You'd better read pascal_voc.py to know how two detections works. Such as https://github.com/Sunarker/Collaborative-Learning-for-Weakly-Supervised-Object-Detection/blob/4bd0df739b8bc3c50cc8cdfed905caaae0b12b06/lib/datasets/pascal_voc.py#L216-L229

Best wishes.

Thank you very much! Because I am a novice, just touched this content. I still don't know how to change the code. I would like to ask you to give me some guidance. In addition, I would like to ask you if you have any code to generate. mat files. I may not be able to write it myself.

Sry, That's all I can help. I 'm working with another project so I don't have other guidance any more. The codes to generate .mat files are easy and can find on internet. Maybe you can read codes times to grow up quickly. Trust yourself.

Hello! I have two questions to ask you.

  1. If I want to train with my own data set, does WSDDN, a weak supervisory model, need to be retrained by myself? Because I need to make the mat file of edgeboxes by myself, I can't find the code. How do you do it?

  2. In addition, when making your own data set, do you need to do the mat file of selective search of the data set by yourself?