Darknet: pretrained model 'darknet53.conv.74'

Created on 30 Apr 2020  ·  16Comments  ·  Source: AlexeyAB/darknet

I find that darknet53.conv.74 is not the same as darknet53.weights and darknet53_448.weights. Is darknet53.conv.74 trained in ImageNet with different settings or other random seed?

All 16 comments

darknet53.weights train imagenet from scratch with image size 256x256.
darknet53.conv.74 is the weights of first 74 layers of darknet53.weights.
darknet53_448.weights is fine-tune with image size 448x448 on darknet53.weights.

But I find the values in darknet53.conv.74 is not the same as the first 74 layers of darknet53.weights. The first 5 weights in darknet53.weights is [-0.11338928 1.1283484 1.2455083 1.9338647 -4.148237] and the first 5 weights in darknet53.conv.74 is [-4.1455936 -0.99273944 -2.060937 1.2925771 -0.89972943].

what is the first 5 weights of darknet53_448.weights?

The first 5 weights of darknet53_448.weights are [-0.10601279 1.1518075 1.2749087 1.9374714 -4.1375694].

well, it becomes a mystery.
image
maybe you are correct.

Just to know the first 20 bytes from .weights-file are not the weights: https://github.com/AlexeyAB/darknet/blob/f14054ec2b49440ad488c3e28612e7a76780bc5f/src/parser.c#L1763-L1767

@AlexeyAB That's right. I ignore the first 20 bytes but they are still not the same.
All these three files have the same major = 0, minor = 2, revision = 0 but the net.seen are 102400000, 0 and 12800000 respectively.

This is a question for Joe)

darknet53: 102400000 = 128x800000
darknet53.conv.74: partial will clean the information
darknet53_448: 12800000 = 128x800000 (darknet53 pre-train)+ 128x200000 (448 fine-tune)

I have a question. What is the relationship between 53 and 74? How I get the number with darknet19_448?

53 means there are totally 53 convolutional layers in darknet53.
74 means 53-1 (convolution for classify) + 23-1 (last shortcut layer has no weights) = totally 74 layers.

for darknet19, you can get number by calculate 19-1 (convolution for classify) + number of maxpooling layers.
image

53 means there are totally 53 convolutional layers in darknet53.
74 means 53-1 (convolution for classify) + 23-1 (last shortcut layer has no weights) = totally 74 layers.

for darknet19, you can get number by calculate 19-1 (convolution for classify) + number of maxpooling layers.
image

Thank you so much for your answer. So, in this case, darknet19 will be 19-1 + 5-1 = 22, right?

23

23
Thank you!
So what is the layer name of ”last shortcut layer has no weights” in darknet53
image

the layer just before avgpol.
image

@WongKinYiu Thank you for your answer!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

qianyunw picture qianyunw  ·  3Comments

PROGRAMMINGENGINEER-NIKI picture PROGRAMMINGENGINEER-NIKI  ·  3Comments

Greta-A picture Greta-A  ·  3Comments

louisondumont picture louisondumont  ·  3Comments

hemp110 picture hemp110  ·  3Comments