hahnyuan / darknet-visualizer

A visualizer of darknet nerual network's network
16 stars 5 forks source link

The last layer is ignored #2

Open whdlgp opened 3 years ago

whdlgp commented 3 years ago

Problem

Solution

Just add one line in read_cfg.py

like this, in read_cfg.py

        elif(i[0] in ['\0','#',';']):
            pass
        else:
            read_option(i,current)
    options.append(current.copy()) #add this after line 19
    file.close()
    return options[1:]

This Darknet cfg visualizer is simple and nice. If this repository is still alive, Please check this :)

If apply this, I can read Yolo v4, Yolo v4 Tiny and Yolo v4 Tiny 3l.

JeremyKeusters commented 2 years ago

Thanks for sharing this! Saved me the effort of debugging. :) I can confirm that it also works for YOLOv7-tiny visualisation.

whdlgp commented 2 years ago

If you mean this, https://github.com/WongKinYiu/yolov7 There is no config file for darknet.

Maybe you can visualize it with this tool https://github.com/lutzroeder/Netron

JeremyKeusters commented 2 years ago

No, I meant that it actually also does work for YOLOv7-tiny. AlexeyAB released a cfg file here.

whdlgp commented 2 years ago

Yes, It works.

below image is YOLOv7-tiny graph generated by this visualizer

Imgur