Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

train your custom dataset #228

Open
songyangsun opened this issue May 12, 2022 · 1 comment
Open

train your custom dataset #228

songyangsun opened this issue May 12, 2022 · 1 comment

Comments

@songyangsun
Copy link

songyangsun commented May 12, 2022

you can follow :
https://yuanwenjie.blog.csdn.net/article/details/123592452
and
https://blog.csdn.net/qq_37134388/article/details/115625744

I wanna share two things:
1.in train.py, for example, solov2_r50_fpn_8gpu_3x.py
model->pretrained and load_from are different, model->pretrained is the pretrained weights of backbone, for example, resnet.
url path: torchvision://resnet50.
load_from is pretrained weights of SOLO, for example, SOLOv2_R50_3x.pth which can be downloaded at SOLO readme.

2.Label error. mistake is :
if your class is ('A', 'B', 'C'), when you use test_ins_vis.py to get the result, you find you can get 'B' instead of 'A'(but the real label is 'A').
get 'C' instead of 'B'(but the real label is 'B'), but 'C' can't be predicted.

I use

微信截图_20220512161814

and

微信截图_20220512161854

as labels. then i get the good performance.(bbox_head->num_class=5 in train.py)
if you meet this problem, you can try this.

@hiiro0420
Copy link

if you get this label error, your train data may not have 'background'.
you may use CLASSES = ('A','B','C') or you add 'background' class in train data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants