fanq15 / FewX

FewX is an open-source toolbox on top of Detectron2 for data-limited instance-level recognition tasks.
https://github.com/fanq15/FewX
MIT License
346 stars 48 forks source link

confused about `dataset_dict` in `FewX/fewx/data/dataset_mapper.py` #58

Closed Wei-i closed 3 years ago

Wei-i commented 3 years ago

Hi, thanks for your great paper and source code! I am sorry that I am confused about the dataset_dict in FewX/fewx/data/dataset_mapper.py. I found that the value of dataset_dict['annotations'] only have one category-id( it may be some objects but also belong to one category-id). In my view, I thought the dataloader is related to the json file FewX/datasets/coco/new_annotations/final_split_non_voc_instances_train2017.json, however when I observed the FewX/datasets/coco/1_split_filter.py, I thought the file just removes novel classes's annotations. Is it right?

But I am still confused that why the dataset_dict['annotations'] can not have more category_id? It is different from the common setting of detectron2 dataset_mapper after I debug it. Could anyone give me some help?

Wei-i commented 3 years ago

ok I get it ! split image-based annotations to instance-based annotations for few-shot learning https://github.com/fanq15/FewX/blob/cfa6033142a5315a0a0855b3b35c9d4f777a8eca/fewx/data/build.py#L59