Code Monkey home page Code Monkey logo

Comments (11)

ShawnLiu1011 avatar ShawnLiu1011 commented on July 17, 2024

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

gt_roidb = [self._load_pascal_labels(index)
for index in self.image_index]

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.

from collaborative-learning-for-weakly-supervised-object-detection.

alexshaodong avatar alexshaodong commented on July 17, 2024

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

from collaborative-learning-for-weakly-supervised-object-detection.

weilaizhe666 avatar weilaizhe666 commented on July 17, 2024

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

from collaborative-learning-for-weakly-supervised-object-detection.

alexshaodong avatar alexshaodong commented on July 17, 2024

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!

from collaborative-learning-for-weakly-supervised-object-detection.

alexshaodong avatar alexshaodong commented on July 17, 2024

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

gt_roidb = [self._load_pascal_labels(index)
for index in self.image_index]

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?

from collaborative-learning-for-weakly-supervised-object-detection.

alexshaodong avatar alexshaodong commented on July 17, 2024

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

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

from collaborative-learning-for-weakly-supervised-object-detection.

ShawnLiu1011 avatar ShawnLiu1011 commented on July 17, 2024

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"

__C.TRAIN.PROPOSAL_METHOD = 'selective_search'

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

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

def _load_selective_search_roidb(self, gt_roidb):
filename = os.path.abspath(os.path.join(self.cache_path, '..',
'selective_search_data',
self.name + '.mat'))
assert os.path.exists(filename), \
'Selective search data not found at: {}'.format(filename)
data = sio.loadmat(filename)
raw_data = data['boxes'].ravel()
box_list = []
for i in range(raw_data.shape[0]):
box_list.append(raw_data[i][:, (1, 0, 3, 2)] - 1)
return self.create_roidb_from_box_list(box_list, gt_roidb)

Best wishes.

from collaborative-learning-for-weakly-supervised-object-detection.

alexshaodong avatar alexshaodong commented on July 17, 2024

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"

__C.TRAIN.PROPOSAL_METHOD = 'selective_search'

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

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

def _load_selective_search_roidb(self, gt_roidb):
filename = os.path.abspath(os.path.join(self.cache_path, '..',
'selective_search_data',
self.name + '.mat'))
assert os.path.exists(filename), \
'Selective search data not found at: {}'.format(filename)
data = sio.loadmat(filename)
raw_data = data['boxes'].ravel()
box_list = []
for i in range(raw_data.shape[0]):
box_list.append(raw_data[i][:, (1, 0, 3, 2)] - 1)
return self.create_roidb_from_box_list(box_list, gt_roidb)

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.

from collaborative-learning-for-weakly-supervised-object-detection.

ShawnLiu1011 avatar ShawnLiu1011 commented on July 17, 2024

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"

__C.TRAIN.PROPOSAL_METHOD = 'selective_search'

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

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

def _load_selective_search_roidb(self, gt_roidb):
filename = os.path.abspath(os.path.join(self.cache_path, '..',
'selective_search_data',
self.name + '.mat'))
assert os.path.exists(filename), \
'Selective search data not found at: {}'.format(filename)
data = sio.loadmat(filename)
raw_data = data['boxes'].ravel()
box_list = []
for i in range(raw_data.shape[0]):
box_list.append(raw_data[i][:, (1, 0, 3, 2)] - 1)
return self.create_roidb_from_box_list(box_list, gt_roidb)

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.

from collaborative-learning-for-weakly-supervised-object-detection.

alexshaodong avatar alexshaodong commented on July 17, 2024

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"

__C.TRAIN.PROPOSAL_METHOD = 'selective_search'

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

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

def _load_selective_search_roidb(self, gt_roidb):
filename = os.path.abspath(os.path.join(self.cache_path, '..',
'selective_search_data',
self.name + '.mat'))
assert os.path.exists(filename), \
'Selective search data not found at: {}'.format(filename)
data = sio.loadmat(filename)
raw_data = data['boxes'].ravel()
box_list = []
for i in range(raw_data.shape[0]):
box_list.append(raw_data[i][:, (1, 0, 3, 2)] - 1)
return self.create_roidb_from_box_list(box_list, gt_roidb)

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!

from collaborative-learning-for-weakly-supervised-object-detection.

alexshaodong avatar alexshaodong commented on July 17, 2024

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"

__C.TRAIN.PROPOSAL_METHOD = 'selective_search'

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

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

def _load_selective_search_roidb(self, gt_roidb):
filename = os.path.abspath(os.path.join(self.cache_path, '..',
'selective_search_data',
self.name + '.mat'))
assert os.path.exists(filename), \
'Selective search data not found at: {}'.format(filename)
data = sio.loadmat(filename)
raw_data = data['boxes'].ravel()
box_list = []
for i in range(raw_data.shape[0]):
box_list.append(raw_data[i][:, (1, 0, 3, 2)] - 1)
return self.create_roidb_from_box_list(box_list, gt_roidb)

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?

from collaborative-learning-for-weakly-supervised-object-detection.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.