baidu-research/NCRF

how to do 'hard negative mining'?

Closed this issue · 7 comments

how to do 'hard negative mining'? can you share the process detail?thank you very much

yil8 commented

@swy0915 This is the tricky part. Usually it includes two steps. The first random sampling step is easier, it starts with obtaining the tissue mask of each tumor slide. Then I randomly sample coordinates based on the tumor tissue mask and determine it's label based on the annotation. The code for the second hard negative mining part is messy, and it involves training a first model, obtain false tumor regions with high probability, and save them as coordinates.

What do I need to do after i save false tumor regions coordinates? @yil8

yil8 commented

@swy0915 I just combined those coordinates with the randomly sampled ones

@yil8 combined those coordinates with the randomly sampled ones,and retrain model again .and repeating this process? the randomly sample is the first step's sample or another randomly sample

yil8 commented

@swy0915 I only do it once, but in theory repeatedly online hard negative mining is a better solution, which I'm actually thinking about working on it next. I combined the randomly sampled coordinates from the first step with the hard negative coordinates.

@yil8 thank you very much, I will try ...

yil8 commented

@swy0915 if you don't have any further questions on this topic, do you mind close the issue? Thanks