PRM icon indicating copy to clipboard operation
PRM copied to clipboard

about the "pre-computed object proposals"

Open ghost opened this issue 5 years ago • 31 comments

hi,@ZhouYanzhao,I am confused that How to prepare the "pre-computed object proposals". Hope to receive your reply!Tks

ghost avatar Aug 30 '18 09:08 ghost

HI @842430478 , The peak response mapping module expects a list of binary masks (numpy ndarray, shape of Image Height x Image Width) as the proposal input. You can convert the output of any proposal method you like to this format to make it compatible with the retrieval algorithm. Please check the demo notebook and the paper for more details.

ZhouYanzhao avatar Aug 30 '18 17:08 ZhouYanzhao

@ZhouYanzhao thank you for your reply.I check the demo and your paper ,I find the "pre-computed object proposals" is prepared from mcg and the number of the binary masks is 200.But I find the mcg code to generate the mask about 1000+.Could you tell me how you select the 200 masks from 1000+? hope to receive your reply!Tks

ghost avatar Aug 31 '18 06:08 ghost

@842430478 Hi, I have the same problem as yours. Do you find any solution to sovle it?

FzuLJ avatar Sep 05 '18 08:09 FzuLJ

Hi, @ZhouYanzhao. Thank you for your code. I ran the SPN code which is your another work related to object localization before. And recently I notice your new work, PRM. And I got some problem, hope you can give some suggestions. In the demo, every sample image has a json file which contains some candidate proposals. I want to know how can I transform the result of mcg proposals to json file?

FzuLJ avatar Sep 05 '18 09:09 FzuLJ

@FzuLJ @842430478 I have this problem too. Have you solved this problem? Hope I can get some advice.

vtddggg avatar Sep 06 '18 07:09 vtddggg

@842430478 @FzuLJ Which proposals method do you use? Is this https://github.com/jponttuset/mcg the mcg which you refer?

vtddggg avatar Sep 06 '18 07:09 vtddggg

@vtddggg Yes, I use this proposals method. https://github.com/jponttuset/mcg

FzuLJ avatar Sep 06 '18 07:09 FzuLJ

@FzuLJ @vtddggg I am still confused.I think the "pre-computed object proposals" is very import for this paper to obtain the mask.

ghost avatar Sep 08 '18 09:09 ghost

@842430478 I think maybe you can select the top 200 ranked candidates from mcg as the "pre-computed object proposals". But my problem is how to convert these proposals to json format?

FzuLJ avatar Sep 10 '18 04:09 FzuLJ

@FzuLJ I'm still learning it, but it seems the proposals are in RLE (Run-Length Encoding), an efficient format for storing binary masks. And the author has provided code for encoding and decoding. Hope this help!

Yby-Bob avatar Sep 10 '18 06:09 Yby-Bob

@Yby-Bob Thank you for your advice. I succeeded getting the masks from mcg, and also converted them to json format. But my result is not as good as the paper proposed. sample0 sample2_mcg These are my result of samle0 and sample2. I just select candidates_mcg.masks(:,:,1:200) from mcg as pre-proposals. I am not sure the selection is correct or not. @ZhouYanzhao Could you please give me some advice about how to select proposals?

FzuLJ avatar Sep 10 '18 13:09 FzuLJ

Sorry for missing your reply, we are swamped with some project deadlines for the time being. If you need to discuss or want me to help diagnose your code, please feel free to ping me at [email protected].

ZhouYanzhao avatar Sep 11 '18 17:09 ZhouYanzhao

@FzuLJ how did you convert them to json format? thanks! hope you reply!

anoo6504 avatar Oct 25 '18 09:10 anoo6504

@anoo6504 According to the project COB, I first saved these proposals in .mat format, then converted mat to json format.

FzuLJ avatar Oct 25 '18 09:10 FzuLJ

@FzuLJ can I use COB for new dataset!? I am unable to run this for my dataset. Please help

anooshaseelm avatar Oct 25 '18 10:10 anooshaseelm

@anoo6527 Yes, you can use COB for your dataset. I extracted my dataset proposals using COB successfully.

FzuLJ avatar Oct 26 '18 06:10 FzuLJ

@FzuLJ Hello, I have the same problem in convert these proposals to json format, can you tell me what project COB is?Can you send me a link to this project?thanks! hope you reply.

llyfzu avatar Nov 06 '18 02:11 llyfzu

@llyfzu This is the link of COB: https://github.com/kmaninis/COB

FzuLJ avatar Nov 06 '18 02:11 FzuLJ

@FzuLJ Hi, I saw the COB and configured the needed MatCaffe, do I need to train my own COB caffemodel that fits my own datasets?('cause my datasets is about the guard rail on the road, not the common objects like PASCAL or BSDS500) or can I just use PASCAL caffemodel, how much could the error be? btw, do you have any advice on training my own COB caffemodel if I have to do that?

ylin0022 avatar Jan 11 '19 09:01 ylin0022

@Yby-Bob Thank you for your advice. I succeeded getting the masks from mcg, and also converted them to json format. But my result is not as good as the paper proposed. sample0 sample2_mcg These are my result of samle0 and sample2. I just select candidates_mcg.masks(:,:,1:200) from mcg as pre-proposals. I am not sure the selection is correct or not. @ZhouYanzhao Could you please give me some advice about how to select proposals?

Hi, @FzuLJ , what is the selection strategy of the candidates? Is the top 200 correct? Thanks.

GrassBro avatar Mar 06 '19 08:03 GrassBro

@FzuLJ Hi, I saw the COB and configured the needed MatCaffe, do I need to train my own COB caffemodel that fits my own datasets?('cause my datasets is about the guard rail on the road, not the common objects like PASCAL or BSDS500) or can I just use PASCAL caffemodel, how much could the error be? btw, do you have any advice on training my own COB caffemodel if I have to do that?

@ylin0022 I am sorry I do not try to train the COB caffemodel cause the PASCAL just can satisfied my need. Maybe you can refer the paper of COB to get some advice.

FzuLJ avatar Mar 06 '19 08:03 FzuLJ

@TinyGrass Yes, I just select the top 200 correct candidates.

FzuLJ avatar Mar 06 '19 08:03 FzuLJ

@FzuLJ Thanks :)

GrassBro avatar Mar 06 '19 08:03 GrassBro

Hi, @FzuLJ . I have another question to discuss with you. Are you familiar with the MCG algorithm? Do the pre-trained models of this algorithm need any kinds of annotated data for supervision? E.g. bounding box.

GrassBro avatar Mar 06 '19 08:03 GrassBro

@TinyGrass I'm sorry I don't familiar with that algorithm. I think maybe you can read the paper and the corresponding codes. If they are not be clearly illustrated, maybe you can try to mail the authors for help.

FzuLJ avatar Mar 06 '19 08:03 FzuLJ

@TinyGrass I'm sorry I don't familiar with that algorithm. I think maybe you can read the paper and the corresponding codes. If they are not be clearly illustrated, maybe you can try to mail the authors for help.

Thank you very much. I will try to figure it out as you say.

GrassBro avatar Mar 06 '19 08:03 GrassBro

@ZhouYanzhao @FzuLJ can you please share the code snippet (or detailed instructions) to convert the *.mat files (from MCG/COB) to JSON format?

adityaarun1 avatar Oct 18 '19 08:10 adityaarun1

Did anyone get the code to convert proposals from .mat to .json? @ZhouYanzhao @FzuLJ Please help.

its-mayank avatar Jan 15 '20 05:01 its-mayank

same problem here,

@anoo6504 According to the project COB, I first saved these proposals in .mat format, then converted mat to json format.

Hi, can you explain more on that? actually the ".mat" file is a dict that contains "superpixels", " labels", "scores", how do you generate the json file from these data, did you directly use the "superpixels" and convert it using "rle_encode" function? or are there any further processing steps?

I am looking forward to your reply.

Thanks,

d12306 avatar May 11 '20 02:05 d12306

Could anyone kindly offer the json.format object proposals of the PASCAL VOC 2012 dataset? Many thanks!

BiQiWHU avatar Dec 25 '20 13:12 BiQiWHU

https://github.com/jponttuset/mcg/blob/master/pre-trained/demos/demo_im2mcg.m Hi, I wrote a matlab code for the object proposals. Below code can run on the demo_im2mcg.m file (make sure you run install.m first) This code will create a (H,W,D) array, where D=id=500 is the top D object proposals. And it will save the array into .mat format. Load it into python and is use as proposals_cob

Hope it helps 😀

%%
imagefiles = dir('*.jpg');      
nfiles = length(imagefiles);    % Number of files found
for ii=1:nfiles
   currentfilename = imagefiles(ii).name;
   currentimage = imread(currentfilename);
   [candidates_mcg, ucm2_mcg] = im2mcg(currentimage,'accurate');
   output = [];
   for id = 1:500
    mask1 = ismember(candidates_mcg.superpixels, candidates_mcg.labels{id});
    output = cat(3,output,mask1);
   end
   saveName=strcat(imagefiles(ii).name, '.mat');
   save(saveName, 'output');
end

brianbt avatar Sep 24 '21 11:09 brianbt