yolact icon indicating copy to clipboard operation
yolact copied to clipboard

Training on COCO-Person dataset

Open QCHighing opened this issue 5 years ago • 13 comments

Hi, Thanks for the advance work you have done! This model helped me a lot. I would also like to retrain the model for one class(coco-person), and I have browsed many related issues, but I encountered some doubts.

  1. Why the score is getting lower and lower?Looks like it finally converged to around 0.08.
    【0】 10 || B: 1.702 | C: 3.531 | M: 2.854 | S: 0.607 | T: 8.694 || ETA: 7:15:17 || timer: 0.633 【0】100 || B: 1.460 | C: 2.346 | M: 2.624 | S: 0.353 | T: 6.784 || ETA: 7:07:40 || timer: 0.606 【0】300 || B: 1.438 | C: 1.732 | M: 2.513 | S: 0.169 | T: 5.852 || ETA: 7:07:18 || timer: 0.638 【0】800 || B: 1.522 | C: 1.586 | M: 2.468 | S: 0.106 | T: 5.682 || ETA: 7:02:46 || timer: 0.679 【0】2550 || B: 1.486 | C: 1.518 | M: 2.430 | S: 0.087 | T: 5.520 || ETA: 6:45:35 || timer: 0.672

  2. How to set lr in this case? I just need to retrain on Person class.

Looking forward to your reply,Thanks a lot!


My config is:

yolact_coco_person_config = yolact_base_config.copy({
    'name': 'yolact_coco_person',
    'dataset': coco2017_dataset_person,
    'num_classes': len(coco2017_dataset_person.class_names) + 1,
    # Training params
    'max_iter': 40000,
    'lr': 1e-4,
    'momentum': 0.9,
    'decay': 5e-4,
    'gamma': 0.1,
    'lr_steps': (.35 * 40000, .75 * 40000, .88 * 40000, .93 * 40000),
})

I have removed other annotations and categories in the COCO dataset.
This is my dataset:

coco2017_dataset_person = dataset_base.copy({
    'name': 'COCO 2017 Person',
    'train_images': '../datasets/COCO2017/train2017',
    'train_info': '../datasets/COCO2017/annotations/instances_train2017_person.json',
    'valid_images': '../datasets/COCO2017/val2017',
    'valid_info': '../datasets/COCO2017/annotations/instances_val2017_person.json',
    'has_gt': True,
    'class_names': ('person',),
    'label_map': None,
})

Train command is: python train.py --config=yolact_coco_person_config --resume=weights/yolact_base_54_800000.pth --start_iter=0

QCHighing avatar Jan 06 '20 04:01 QCHighing

@QCHighing are you training only person data? what is the intention of doing this ? is it to obtain high accuracy for person dataset since the total mAP for yolact 29.8 and yolact_plus 34.6 will be get high accruacy for only person

abhigoku10 avatar Jan 06 '20 04:01 abhigoku10

@abhigoku10 Yeah, thanks for your Timely reply. I only need to detect the person, as same as Issue #65 . It would be better if I could get higher accuracy. If my environment can be configured, I will also try yolact_plus, but not. Can you give me some suggestions on model training for this issue? Why the score is getting lower and lower?What went wrong with my configuration? Thanks again!

QCHighing avatar Jan 06 '20 04:01 QCHighing

S is not score but an extra semantic segmentation loss. That going down is perfectly normal (and is what should be happening).

As for lr, I think what you have is fine? Make sure you're loading the pretrained weights with --resume and have applied the fine-tuning change in #36.

dbolya avatar Jan 24 '20 01:01 dbolya

Thanks a lot.

QCHighing avatar Feb 25 '20 10:02 QCHighing

@QCHighing did you figure out how to improve person mAP? I tried retraining with your settings but person mAP gets worst than the pretrained model on the whole 80 classes.

Maxinho96 avatar Mar 13 '20 13:03 Maxinho96

@Maxinho96 i increased the person data and then used yolact++ architecture i was able to get good improvement

abhigoku10 avatar Mar 21 '20 13:03 abhigoku10

@Maxinho96 i increased the person data and then used yolact++ architecture i was able to get good improvement

Did you use a custom dataset or another online person dataset? I have found Open Images and Cityscapes but I am not sure if they can give an improvement.

Maxinho96 avatar Mar 21 '20 14:03 Maxinho96

@Maxinho96 I have stopped this job. I can reopen the issue.

QCHighing avatar Mar 22 '20 06:03 QCHighing

@Maxinho96 i have used pedestrian dataset since my applications required pedestrains scenes

abhigoku10 avatar Mar 22 '20 06:03 abhigoku10

@Maxinho96 i have used pedestrian dataset since my applications required pedestrains scenes

You used Cityscapes maybe? Or you built your dataset? Building an instance segmentation dataset is expensive, so Cityscapes would save a lot of time.

Maxinho96 avatar Mar 22 '20 14:03 Maxinho96

@QCHighing did you figure out how to improve person mAP? I tried retraining with your settings but person mAP gets worst than the pretrained model on the whole 80 classes.

I have the same problem... @dbolya Do you have any good solutions instead of adding new dataset? Thank you very much!!!

JiaCheng-Lin avatar Jan 02 '21 12:01 JiaCheng-Lin

@QCHighing Hi, did you managed to retain using COCO-person?

sam1006 avatar Oct 24 '22 19:10 sam1006

@QCHighing May I request for pre-trained model only for COCO-person class?

sam1006 avatar Oct 24 '22 19:10 sam1006