I am attempting to implement YOLO v3 in Tensorflow-Keras from scratch, with the aim of training my own model on a custom dataset. By that, I mean without using pretrained weights. I have gone through all three papers for YOLOv1, YOLOv2(YOLO9000) and YOLOv3, and find that although Darknet53 is used as a feature extractor for YOLOv3, I am unable to point out the complete architecture which extends after that - the "detection" layers talked about here. After a lot of reading on blog posts from Medium, kdnuggets and other similar sites, I ended up with a few significant questions:

  • Have I have missed the complete architecture of the detection layers (that extend after Darknet53 used for feature extraction) in YOLOv3 paper somewhere?
  • The author seems to use different image sizes at different stages of training. Does the network automatically do this upscaling/downscaling of images?
  • For preprocessing the images, is it really just enough to resize them and then normalize it (dividing by 255)?

Please be kind enough to point me in the right direction. I appreciate the help!


1 Answer 1


This is old but YOLOv1 there is everything you need in the paper. It is not that simple to implement though.

What you are missing I think is that they first train a classification NN, this is, they removed the last few layers, and run probably with a regression head, and softmax function, the standard way you classify images. In this case, you can train in any size, (224x224 in this case); the convolution results are general.

In this way the NN learnt to extract features.

Then they load the weights without the network head, and add a different, 5 layers head that ends with 2 fully connected regression layers, and a different loss function, which is the custom one they designed, and you will have to implement.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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