3
$\begingroup$

I'm trying to implement YOLO (tiny version, v1) into Keras framework. For the past two days, I've been relentlessly digging through Github and the likes in order to help me in this task, with more or less success.

More precisely, I would like to use pretrained weights, except those are only available as .weight files. I found some scripts on the internet in order to convert them either to .txt or .h5 (.h5 only for Yolo v2, and not v1...), but none of these seemed to be working properly. So I guess my question is: how to read .weights file? How are the data stored and structured.

$\endgroup$
4
$\begingroup$

The .weights seems to be the extension for a framework called "darknet" , you can read h5 files with Keras , however it if you really want to build an object detection framework there is no necessity to stick the darknet's weights. There are many pretrained models lying around in the web. Or else you could finetune a pretrained imagenet model in Keras which i think is the best option, although there is not much you can do if you got the exact weights of the YOLO model , instead it is better to train one from scratch or atleast by finetuning an imagenet model , doing so will learn a LOT.

$\endgroup$
  • 1
    $\begingroup$ Do you think it's good idea to use a CNN pretrained on ImageNet for instance, add a couple of layers (Conv or FC) that I train for object detection using Pascal VOC. If so, should I ran my backprop on these added layers only for bounding-boxes regression or also for classification ? (I hope my question is clear...) $\endgroup$ – Hermès Jul 3 '18 at 20:09
  • $\begingroup$ yeah ,that is called finetuning. $\endgroup$ – riemann77 Jul 4 '18 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.