SoftTeacher
SoftTeacher copied to clipboard
stop at 4000 iter
2021-12-30 00:46:57,415 - mmdet.ssod - INFO - Iter [3900/180000] lr: 1.000e-03, eta: 1 day, 20:54:50, time: 0.893, data_time: 0.012, memory: 5544, ema_momentum: 0.9990, unsup_loss_rpn_cls: 0.0676, unsup_loss_rpn_bbox: 0.7972, unsup_loss_cls: 0.7338, unsup_acc: 88.3301, unsup_loss_bbox: 0.0259, loss: 1.6245
2021-12-30 00:47:42,376 - mmdet.ssod - INFO - Iter [3950/180000] lr: 1.000e-03, eta: 1 day, 20:53:22, time: 0.899, data_time: 0.013, memory: 5544, ema_momentum: 0.9990, unsup_loss_rpn_cls: 0.0594, unsup_loss_rpn_bbox: 0.8052, unsup_loss_cls: 0.8364, unsup_acc: 88.0898, unsup_loss_bbox: 0.0237, loss: 1.7246
2021-12-30 00:48:26,592 - mmdet.ssod - INFO - Saving checkpoint at 4000 iterations
2021-12-30 00:48:31,781 - mmdet.ssod - INFO - Exp name: soft_teacher_faster_rcnn_r50_caffe_fpn_coco_180k.py
2021-12-30 00:48:31,782 - mmdet.ssod - INFO - Iter [4000/180000] lr: 1.000e-03, eta: 1 day, 20:55:20, time: 0.992, data_time: 0.012, memory: 5544, ema_momentum: 0.9990, unsup_loss_rpn_cls: 0.0693, unsup_loss_rpn_bbox: 0.8008, unsup_loss_cls: 0.6988, unsup_acc: 88.7949, unsup_loss_bbox: 0.0464, loss: 1.6153
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 3071/3071, 8.7 task/s, elapsed: 355s, ETA: 0sTraceback (most recent call last):
File "tools/train.py", line 198, in
IndexError: list index out of range
Do you add classes=...
to all items in the data
?
For example, you have 3 classes ['a','b','c']
. And you have to change the config like below:
data=dict(
train=dict(
...
classes= ['a','b','c']
),
val=dict(
...
classes= ['a','b','c']
),
test=dict(
...
classes= ['a','b','c']
)
)
Thank you very much for your reply. I have made changes as you said, but the training results seem to be abnormal. I have 10 class Can you develop a tutorial that runs on new data? For example, list the configuration parameters that need to be modified. Thank you!
Take this config file for example. When you add a new dataset, make sure you have changed two things:
- the path of images and annotations.
- the class names of your dataset.
Concretely, you have to modify the
data
dictionary like below:
- Original designed for MS COCO:
data = dict(
samples_per_gpu=5,
workers_per_gpu=5,
train=dict(
sup=dict(
type="CocoDataset",
ann_file="data/coco/annotations/semi_supervised/instances_train2017.${fold}@${percent}.json",
img_prefix="data/coco/train2017/",
),
unsup=dict(
type="CocoDataset",
ann_file="data/coco/annotations/semi_supervised/instances_train2017.${fold}@${percent}-unlabeled.json",
img_prefix="data/coco/train2017/",
),
),
sampler=dict(
train=dict(
sample_ratio=[1, 4],
)
),
)
- Changed for your new dataset:
data = dict(
samples_per_gpu=5,
workers_per_gpu=5,
train=dict(
sup=dict(
type="CocoDataset",
ann_file="[YOUR_ANNOTATION_FILE]",
img_prefix="[YOUR_ANNOTATED_IMAGE_PATH]",
classes=[YOUR_CLASS_DEFINITIONS],
),
unsup=dict(
type="CocoDataset",
ann_file="[YOUR_ANNOTATION_FILE_FOR_UNLABELED_DATA]",
img_prefix="[YOUR_IMAGE_PATH_FOR_UNLABELED_DATA]",
classes=[YOUR_CLASS_DEFINITIONS],
),
),
val=dict(
ann_file="[YOUR_ANNOTATION_FILE_FOR_VALIDATION]",
img_prefix="[YOUR_ANNOTATED_IMAGE_PATH_FOR_VALIDATION]",
classes=[YOUR_CLASS_DEFINITIONS],
)
sampler=dict(
train=dict(
sample_ratio=[1, 4],
)
),
)
I have followed your tutorial to train on my own data set. No errors were reported during the training process.
I used two data sets, but it seems that the target detection is not good after training. A large number of useless boxes are generated, and these boxes often correspond to a fixed category, and there are no boxes of other categories.
Is it because the number of my categories is much smaller than coco's 80, so some parameters need to be adjusted?
This is the result in another data set. This data set contains 10 types of construction machinery and contains a total of 10,000 pictures. I followed your tutorial for 180k training, and the results are shown in the figure.
This is the result of training on the coco standard data set for 2 hours, and it seems correct.
But with my own data set, the above results appeared.
I Follow the tutorial you provided exactly.
I used two data sets to eliminate the problem of the data set itself.
I am not sure whether there are other details I forgot. Could you post your config file here?
)
hello, I change the config as what u send, but there is still the same error“list index out of range”
I am not sure whether there are other details I forgot. Could you post your config file here?
and i meet the same question, there are too many bbox in a image in wandb.