dbolya / yolact

A simple, fully convolutional model for real-time instance segmentation.
MIT License
5k stars 1.33k forks source link

Training on COCO-Person dataset #271

Open QCHighing opened 4 years ago

QCHighing commented 4 years ago

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

abhigoku10 commented 4 years ago

@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

QCHighing commented 4 years ago

@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!

dbolya commented 4 years ago

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.

QCHighing commented 4 years ago

Thanks a lot.

Maxinho96 commented 4 years ago

@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.

abhigoku10 commented 4 years ago

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

Maxinho96 commented 4 years ago

@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.

QCHighing commented 4 years ago

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

abhigoku10 commented 4 years ago

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

Maxinho96 commented 4 years ago

@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.

JiaCheng-Lin commented 3 years ago

@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!!!

sam1006 commented 1 year ago

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

sam1006 commented 1 year ago

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