megvii-research / AnchorDETR

An official implementation of the Anchor DETR.
Other
333 stars 35 forks source link

How to train one's own dataset #48

Closed LL-XSJ closed 9 months ago

LL-XSJ commented 11 months ago

How to train one's own dataset

tangjiuqi097 commented 11 months ago

Hi, you should prepare your own dataset in COCO dataset format, then modified the path in these lines.

LL-XSJ commented 11 months ago

Thank you for your reply. I did exactly that, but the training result has always been 0. I don't know why. Could you please reply to me

------------------ 原始邮件 ------------------ 发件人: "megvii-research/AnchorDETR" @.>; 发送时间: 2023年10月9日(星期一) 中午1:07 @.>; @.**@.>; 主题: Re: [megvii-research/AnchorDETR] How to train one's own dataset (Issue #48)

Hi, you should prepare your own dataset in COCO dataset format, then modified the path in these lines.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

tangjiuqi097 commented 11 months ago

Your data may be not right. You may try to use this script to check it.

LL-XSJ commented 11 months ago

My format is correct, I found anchor in the models folder After modifying the number of categories in detr.py, the results were all 0 after 50 rounds of training. Of course, I did not load the pre training weights, but I tested it and found that it is not related to whether to load the pre training weights. After I load the pre training weights, the training result is still 0. I guess it may be related to my modification of the number of categories. May I ask the author if I want to modify the anchor after changing the dataset What is the number of classes in detr. py?

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年10月9日(星期一) 下午3:12 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [megvii-research/AnchorDETR] How to train one's own dataset (Issue #48)

Your data may be not right. You may try to use this script to check it.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

LL-XSJ commented 11 months ago

How many rounds of training do I need to train my own dataset to converge without using the pre training weights given on the official website?

LL-XSJ commented 11 months ago

Excuse me, is the pre training weight you provided on the official website the pre training weight for the entire anchor delta

LL-XSJ commented 11 months ago

Hello, may I know how to modify the final category number of the model if I need to

tangjiuqi097 commented 11 months ago

Hi, the final number of categories should be greater than the largest category index. But if the training result is always 0, in most cases the problem should be caused by the data format. Maybe you can try to use your data to train other detectors to check if the data is correct.