Category filtering

Hello again,

I have read the tutorial about the database. In the sixth section, the method nusc.list_categories() lists all the categories inside the loaded split of the database. I want to filter all the scenes which contains a specific category (e.g. human). Is there any method available?

Thank you in advance.

Hi, we don’t have such a method, but it should take you about 3-5 lines to implement it.
You can loop through the scenes, then get the samples, sample_annotations, instances and finally the categories (follow the schema).
More elegant/efficient may actually be to loop through the instances and see which scenes they are in.

Good luck!

Ok, thank you that was my other option so I will proceed with it.