1ovebibi / Style-Transfer-for-Object-Detection-on-Historical-Artworks

Apache License 2.0
0 stars 0 forks source link

classes error #1

Open 1ovebibi opened 2 years ago

1ovebibi commented 2 years ago

AssertionError: The num_classes (345) in Shared2FCBBoxHead of MMDataParallel does not matches the length of CLASSES 80) in CocoDataset

The training set patch0 has 345 classes in total. The parameter "num_classes" (in configs/swin/obj365-frcnn.py) was set to 345. All classes were written in the file configs/base/datasets/obj365_instence.py. All parameter info find in train-obj365.o503859

mathiaszinnen commented 2 years ago

One thing you could quickly try is changing the number of classes in the basemodel here: https://github.com/1ovebibi/Style-Transfer-for-Object-Detection-on-Historical-Artworks/blob/01deac4436d6113615a57d52e73f205931399b4b/configs/_base_/models/mask_rcnn_r50_fpn_unmasked.py#L47

And adapting the classes here: https://github.com/1ovebibi/Style-Transfer-for-Object-Detection-on-Historical-Artworks/blob/01deac4436d6113615a57d52e73f205931399b4b/configs/_base_/datasets/obj365_instance.py#L4

Although it should actually be overwritten by the inherited config file

1ovebibi commented 2 years ago

Sorry I tried but it is not working