arthurdouillard / CVPR2021_PLOP

Official code of CVPR 2021's PLOP: Learning without Forgetting for Continual Semantic Segmentation
https://arxiv.org/abs/2011.11390
MIT License
143 stars 23 forks source link

Filtering images #4

Closed prabhuteja12 closed 3 years ago

prabhuteja12 commented 3 years ago

Hi,

I'm looking at your code to filter_images in utils.py. I see that the arguments to the lambda function are not used at all.

fil = lambda c: any(x in labels for x in cls)

and I think the filtering codes can be simplified to np.intersect1d, right?

Is this correct?

arthurdouillard commented 3 years ago

Hey,

This is snippet is from the code of https://github.com/fcdl94/MiB.

Yes, the lambda argument is not used, but because of late binding of the lambda the code still works. Sure intersect can probably work too.

You can do that and check that the generated indexes are the same :)

prabhuteja12 commented 3 years ago

Cool. Thanks!