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

training on my own dataset #28

Open
liuliu66 opened this issue Jan 14, 2018 · 14 comments
Open

training on my own dataset #28

liuliu66 opened this issue Jan 14, 2018 · 14 comments

Comments

@liuliu66
Copy link

liuliu66 commented Jan 14, 2018

@unsky Hi, unsky. I really appreciate the code for FPN. But when I used it I got very bad mAP for my single object detection task on my own dataset. I have changed the parameters in train.prototxt and train_mergercnn.prototxt with changing 21 to 2 (object + background) and 84 to 8. The code could run well and loss also looks fine. So could you please tell me are there other places I need to change parameters to for training on my dataset?

qq 20180114130425

@unsky
Copy link
Owner

unsky commented Jan 14, 2018

you have bug in test code,
i think you havenot restore the rois.
i do this in

if cfg.TRAIN.BBOX_NORMALIZE_TARGETS_PRECOMPUTED:

rgb's faster rcnn do this in:
https://github.com/rbgirshick/py-faster-rcnn/blob/4e199d792f625cf712ca9b9a16278bafe0806201/lib/fast_rcnn/train.py#L65

@liuliu66
Copy link
Author

@unsky Solved! Amazing result! Thanks for your help!

@TongYoungG
Copy link

@liuliu66 Hello, I got a problem same as you. Can you show me the detail that you solved the problem? I still don't know how to fix it. Thanks!

@liuliu66
Copy link
Author

@gk616828144 Hello, my problem is duo to run a wrong sh file so I just check the test.sh and change the model path to my trained model path and the problem is solved. I think if you could run the code on your dataset and got seemly correct loss you could get correct caffemodel file. You can check test.sh and test_mergercnn.sh carefully to solve it.

@lixiangamy
Copy link

I have changed the parameters in train.prototxt with changing 21 to 3 (object + background) and 84 to 12.
cls_score_concat :Top shape:4 3(12)?
error:Creating layer loss_cls
F0118 13:55:03.960583 15560 loss_layer.cpp:19] Check failed: bottom[0]->num() == bottom[1]->num() (4 vs. 1) The data and label should have the same number.

@unsky
Copy link
Owner

unsky commented Jan 18, 2018

@lixiangamy use fpn-caffe!

@lixiangamy
Copy link

lixiangamy commented Jan 18, 2018

What are the differences between fpn-caffe and caffe-fast-rcnn?I used caffe-fast-rcnn

@unsky
Copy link
Owner

unsky commented Jan 18, 2018

Duplicate of #21 #21

@TongYoungG
Copy link

TongYoungG commented Jan 19, 2018

@unsky hello,how to restore the rois? I still don't what to do.When I test imgs,the rois is all the same. I don't know where the error is.

@foralliance
Copy link

@unsky
虽然@liuliu66的问题是由于file文件导致的,但您指出 "i think you havenot restore the rois."这该如何理解呢?

@unsky
Copy link
Owner

unsky commented Jul 3, 2018

FPN属于faster rcnn框架发展而来,保留了faster rcnn对于rois的设置,faster rcnn 有一个trick就是对第二阶段的rcnn的rois做了白化处理,这种策略可以加速收敛,当然也需要我们在测试阶段进行一次反白化。

@foralliance
Copy link

foralliance commented Jul 9, 2018

@unsky HI
在FPN的test.py中,在im_detect函数中,对最终的结果确实多了一个normalize操作,这个操作在py-faster-rcnn中是没有的.
在py-faster-rcnn中的trian.py中,也多了一个normalize操作,这个操作在FPN中是没有的.

这2者之间有关系吗?一个是训练的,一个是测试的.而且,您所谓的反白话又是什么意思??

@mantou22
Copy link

作者您好, 请问训练集像素大小为100100, 目标大小为4040 ,请问 训练时如何设置anchor大小??
谢谢作者啦

@mantou22
Copy link

您好,请问为什么我训练自己的模型会怎么慢速度?
前面几百次迭代,每20次只需要 34S 左右, 到了2000次左右时, 每20次需要 5-6分钟 为什么会那么慢????? 我的显卡是 GPU 1080Ti 的 12G运行内存

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

6 participants