JosephKJ / iOD

(TPAMI 2021) iOD: Incremental Object Detection via Meta-Learning

Home Page:https://josephkj.in

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The problem of maximum of classes

chen-yi-hao opened this issue · comments

Thank you for this great work!
I have some questions about configs and datasets:
I add my own data on the basis of VOC. Finally, there are 23 classes. Here are my settings:

For learning the base (20 classes) use:

NUM_CLASSES: 50
NUM_BASE_CLASSES: 20
NUM_NOVEL_CLASSES: 30
TRAIN_ON_BASE_CLASSES: True

For an incremental step with 3 class:

NUM_CLASSES: 50
NUM_BASE_CLASSES: 20
NUM_NOVEL_CLASSES: 3
TRAIN_ON_BASE_CLASSES: False

But when I reached the second stage of training, the program made the following mistakes:

Traceback (most recent call last):
File "tools/train_net.py", line 161, in
args=(args,),
File "/home/yff/Desktop/iOD/detectron2/engine/launch.py", line 52, in launch
main_func(*args)
File "tools/train_net.py", line 149, in main
return trainer.train()
File "/home/yff/Desktop/iOD/detectron2/engine/defaults.py", line 407, in train
super().train(self.start_iter, self.max_iter)
File "/home/yff/Desktop/iOD/detectron2/engine/train_loop.py", line 152, in train
self.run_step()
File "/home/yff/Desktop/iOD/detectron2/engine/train_loop.py", line 294, in run_step
self.update_image_store(data)
File "/home/yff/Desktop/iOD/detectron2/engine/train_loop.py", line 235, in update_image_store
self.image_store.add((image,), (cls,))
File "/home/yff/Desktop/iOD/detectron2/utils/store.py", line 16, in add
self.store[class_id].append(items[idx])
IndexError: list index out of range

Can I do more than 20 classes of incremental training?