dvlab-research/PFENet

n way setting

Closed this issue · 7 comments

hello, thanks for your excellent work. I didn't find any parameter setting number of way, is the batch size of support image actually define the n_way? thanks

@tymatfd

Hi,

Like most of the other papers, we did not evaluate our work in the n-way setting (n >= 2).

As the current setting of few-shot segmentation requires the support images to contain the target class appearing in the query images, it is hard to provide the support and query images with exactly the same multiple classes. If you want to evaluate the model in the 2-way setting, you can refer to http://bmvc2018.org/contents/papers/0255.pdf for details to accordingly modify our code.

Thank you.

@tymatfd

Sorry, I forgot to answer your question. QAQ.

In our code, each query-support pair is an independent task, and therefore the batch size is equal to the number of tasks, rather than the number of ways (classes).

Thank you.

@tymatfd

Sorry, I forgot to answer your question. QAQ.

In our code, each query-support pair is an independent task, and therefore the batch size is equal to the number of tasks, rather than the number of ways (classes).

Thank you.

thanks for your reply.i found that when batch_size = 4, the input query img's size is (2,3,473,473) under default setting, so exactly speaking, batch_size is equal to twice the number of tasks ?

@tymatfd Hmmm, actually it should be (4,3,473,473) with batch_size = 4. All models on Pascal-5i are supposed to be trained with a single GPU. Were you using 2 GPUs to train the model? You need to specify the GPU numbers as the query-support pairs will be evenly split to different GPUs.

@tymatfd Sorry for my late reply. Has your problem been solved?

@tymatfd Sorry for my late reply. Has your problem been solved?
sorry for late reply. my problem has been resolved. thank you very much for your kindly reply

@tymatfd were you able to extend the model to the N-way case?