Darknet: How to implement focal loss in DARKNET

Created on 13 Mar 2019  路  6Comments  路  Source: AlexeyAB/darknet

I want to implement focal loss in DARKNET. How can I do that?

Most helpful comment

Focal loss already implemented for [yolo] layer.
It will be used if you set focal_loss=1 in each [yolo] layer.

https://github.com/AlexeyAB/darknet/blob/7a854302efb7adba80d5e8a747ad5e5ec384a226/src/yolo_layer.c#L158-L177

All 6 comments

Focal loss already implemented for [yolo] layer.
It will be used if you set focal_loss=1 in each [yolo] layer.

https://github.com/AlexeyAB/darknet/blob/7a854302efb7adba80d5e8a747ad5e5ec384a226/src/yolo_layer.c#L158-L177

what does it mean: in each [yolo] layer.

the network show: unused field focal =1

Can you show screenshot?

@AlexeyAB
thanks

below is mine cfg-file

[yolo]
focal_loss=1
mask = 6,7,8
anchors = 14, 13, 69, 16, 43, 56, 151, 33, 74, 93, 110,141, 152,206, 220,276, 332,374
classes=4
num=9
jitter=.3
ignore_thresh = .7
truth_thresh = 1
random=1

is there right?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hemp110 picture hemp110  路  3Comments

HilmiK picture HilmiK  路  3Comments

yongcong1415 picture yongcong1415  路  3Comments

PROGRAMMINGENGINEER-NIKI picture PROGRAMMINGENGINEER-NIKI  路  3Comments

Jacky3213 picture Jacky3213  路  3Comments