Hey Xavi cool that you find this helpful.
Dat Tran

Hi Dat, thanks for the quick response. For sure retraining would be the optimal solution, but I was looking for something faster just to see the results, I really think that can be interesting for anybody to control whatever they want to detect. I finally came up with a dirty/quick solution like this:

_, not_person_elements = np.where(classes != 1)
for i in not_person_elements:
scores_np[i] = 0.01

The where function returns the a size two tuple, where the first element is an array of 100 zeros and the second (not_person_elements) are the positions of the detected classes that are not “Person” (that’s the reason of the [1] in the loop). After that I give the corresponding element in the score array a small value in order to not display it. Not elegant but seems to work.

Thanks again and keep going with your great articles, I’ll look for them for sure.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.