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 YOLOv3-Tiny-PRN #7

Open
Arcitec opened this issue Oct 22, 2019 · 15 comments
Open

Training YOLOv3-Tiny-PRN #7

Arcitec opened this issue Oct 22, 2019 · 15 comments

Comments

@Arcitec
Copy link

Arcitec commented Oct 22, 2019

Hi!

The PRN models has more layers (shortcut layers). How many layers should we extract from weights when training?

Still 15 layers, like for regular YOLOV3-Tiny? https://github.com/AlexeyAB/darknet#how-to-train-tiny-yolo-to-detect-your-custom-objects (Edit: I see you said 15 layers here AlexeyAB/darknet#4091 (comment) so I guess we extract 15?)

Also, if we want to fix the mask problem (#2) to 0,1,2, is it enough for us to extract X layers from weights, fix the config, and do transfer-learning on our own custom dataset? Or does it need a full re-training on COCO with the new config?

@WongKinYiu
Copy link
Owner

yes, still 15, shortcut layer do not have weights.
if u want to using mask = 0,1,2, i think re-train coco with same setting for transfer learning will be slightly better.

however, for coco dataset, i use same imagenet pre-trained model, mask = 1,2,3 get better than mask = 0,1,2.

@Arcitec
Copy link
Author

Arcitec commented Oct 22, 2019

yes, still 15, shortcut layer do not have weights.

Oh okay, that makes sense. Thank you! I've trained the data now and presented the results! <3 opencv/opencv#15739 (comment)

if u want to using mask = 0,1,2, i think re-train coco with same setting for transfer learning will be slightly better.

Yes probably better.

however, for coco dataset, i use same imagenet pre-trained model, mask = 1,2,3 get better than mask = 0,1,2.

Have you trained COCO 0,1,2 and 1,2,3 weights? Or only trained COCO 1,2,3 weights?

If you have trained COCO weights on both values, I'd love to hear about what you did and what the results were.

@WongKinYiu
Copy link
Owner

yes, i have trained both of 0,1,2 and 1,2,3 on coco.
codalab was dead few month ago, so i lost the results of those models.

@Arcitec
Copy link
Author

Arcitec commented Oct 22, 2019

Aw okay. But thanks for clarifying that you have trained 123 too! I'll reply about this in the mask thread, to not split the conversations.

@Arcitec
Copy link
Author

Arcitec commented Oct 22, 2019

Accuracy and speed results:

opencv/opencv#15739 (comment)
AlexeyAB/darknet#4091 (comment)

Hint for everyone: This PRN network needs more iterations than regular non-PRN versions of YOLO to learn good accuracy. Train train train! If you don't get good mAP, check your amount of training iterations and try more training! For example, YOLOv3-Tiny was at 78% accuracy for a 1-class network after 2000 iterations and 83% after 2500 iterations. YOLOv3-Tiny-PRN was at 73% after 2000 iterations and 80% after 3000 iterations.

@tuongtranngoc
Copy link

@WongKinYiu ,
Can you share pretrained weight of YOLOv3-tiny-PRN?
this weight Link not have!

@WongKinYiu
Copy link
Owner

@NgTuong hello,

u can follow https://github.com/AlexeyAB/darknet#how-to-train-tiny-yolo-to-detect-your-custom-objects to get coco pre-trained model.
i m in iccv now, so if u want to use imagenet pre-trained model, i will put it on the github after iccv.

@tuongtranngoc
Copy link

tuongtranngoc commented Oct 29, 2019

@WongKinYiu thank you but i have a problem when training
it is stopped training and save model now. Wish you help me?
Screenshot_2019-10-29 Google Colaboratory.

@WongKinYiu
Copy link
Owner

i think u r missing --clear flag.

by the way, using yolov3-tiny.weights as pre-trained model is not the best solution for transfer learning.

@tuongtranngoc
Copy link

@WongKinYiu,
In this case, what do i?
Not use pretrained?

@Arcitec
Copy link
Author

Arcitec commented Oct 29, 2019

In this case, what do i?

https://github.com/WongKinYiu/PartialResidualNetworks/tree/master/model

@WongKinYiu
Copy link
Owner

@VideoPlayerCode thanks.

@tuongtranngoc
Copy link

@VideoPlayerCode , @WongKinYiu ,
thanks =)

@tuongtranngoc
Copy link

@WongKinYiu ,
why must use --clear flag?

@WongKinYiu
Copy link
Owner

@NgTuong

becuz there are some logs in the weight file.
for example, trained iterations.
pretrained model recorded the max iteration, for yolov3 case, it is 500200.
however u want to train ur model starts from 0, so u need to use --clear flag.

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

3 participants