PartialResidualNetworks icon indicating copy to clipboard operation
PartialResidualNetworks copied to clipboard

Training YOLOv3-Tiny-PRN

Open Arcitec opened this issue 5 years ago • 15 comments

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 https://github.com/AlexeyAB/darknet/issues/4091#issuecomment-542513900 so I guess we extract 15?)

Also, if we want to fix the mask problem (https://github.com/WongKinYiu/PartialResidualNetworks/issues/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?

Arcitec avatar Oct 22 '19 00:10 Arcitec

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.

WongKinYiu avatar Oct 22 '19 02:10 WongKinYiu

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 https://github.com/opencv/opencv/pull/15739#issuecomment-544931445

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.

Arcitec avatar Oct 22 '19 12:10 Arcitec

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.

WongKinYiu avatar Oct 22 '19 12:10 WongKinYiu

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 avatar Oct 22 '19 13:10 Arcitec

Accuracy and speed results:

https://github.com/opencv/opencv/pull/15739#issuecomment-544931445 https://github.com/AlexeyAB/darknet/issues/4091#issuecomment-542513900

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.

Arcitec avatar Oct 22 '19 15:10 Arcitec

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

tuongtranngoc avatar Oct 28 '19 14:10 tuongtranngoc

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

WongKinYiu avatar Oct 28 '19 23:10 WongKinYiu

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

tuongtranngoc avatar Oct 29 '19 01:10 tuongtranngoc

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.

WongKinYiu avatar Oct 29 '19 11:10 WongKinYiu

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

tuongtranngoc avatar Oct 29 '19 15:10 tuongtranngoc

In this case, what do i?

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

Arcitec avatar Oct 29 '19 21:10 Arcitec

@VideoPlayerCode thanks.

WongKinYiu avatar Oct 29 '19 21:10 WongKinYiu

@VideoPlayerCode , @WongKinYiu , thanks =)

tuongtranngoc avatar Oct 30 '19 04:10 tuongtranngoc

@WongKinYiu , why must use --clear flag?

tuongtranngoc avatar Oct 30 '19 09:10 tuongtranngoc

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

WongKinYiu avatar Oct 30 '19 11:10 WongKinYiu