[YOLOv4] AML & KSNN

Hi all,

I am trying to convert a YOLOv4 darknet model – (.weights and .cfg) on the Khadas VIM3.

I have succeeded by following this.
Unfortunately, the performance of the model drops from ~0.4 mAP to ~0.2 mAP. Is this drop expected?

Additionally, is it possible to convert & run a model using KSNN? The GitHub repo only mentions YOLOv3 (and not v4)

Thank you all for your help :slight_smile:

@arthurgassner Our C++ demo support yolov4 ,you can try with it .

You need to implement the post-processing code yourself

@Frank Thank you for the quick reply

Which demo? This one? It is the one I used; What kind of drop in performance do you see when you use it?

Do you mean the NMS and confidence thresholding? If so that’s fine

@arthurgassner Yes. This one docs. it run with 3-5FPS.

No, the whole post-processing

Hi @arthurgassner , I fixed code to run with yolov4
And I fixed it as follows:
GRID0 = 13 β†’ GRID2 = 52
GRID1 = 26 β†’ GRID1 = 26
GRID2 = 52 β†’ GRID0 = 13
masks = [[6, 7, 8], [3, 4, 5], [0, 1, 2]] β†’ masks = [[0, 1, 2] ,[3, 4, 5],[6, 7, 8]]
anchors = [[10, 13], [16, 30], [33, 23], [30, 61], [62, 45], [59, 119], [116, 90], [156, 198], [373, 326]] β†’ anchors = [[12, 16], [19, 36], [40, 28], [36, 75], [76, 55], [72, 146], [142, 110], [192, 243], [459, 401]]