Retraining the bear classifier using multi-label classification

@jimmiemunyi

Using Pipeline and RegexLabeller worked for me. I just got the path for one of my images and went to https://regex101.com/ to find a regex that would extract the label from the path. If you’re using a Windows machine don’t forget to change the back slashes to forward slashes.

You might also want to check out this thread, which specifically talks about formatting labels for MultiCategoryBlock. MultiCategoryBlock needs the labels to be in lists, which is why I used the function def multi_l(l): return [l] within the Pipeline.

I actually haven’t worked on this project for over a month, so I’m having difficulties remembering exactly what I did. But my bet is that you just need to use a regex.

3 Likes