pytorch-YOLOv4 icon indicating copy to clipboard operation
pytorch-YOLOv4 copied to clipboard

darknet2pytorch supported for Yolo versions below 4 ?

Open sendeniz opened this issue 3 years ago • 1 comments
trafficstars

Tianxiamo,

Amazing tool first of all. I tested your conversion method darknet2pytorch on both V4 and V1 and found out that V1 is not supported. Are there any plans to add support for versions below Yolo V4.

My test code resulted in the following output:

unknown type local
unknown type dropout
unknown type detection
unknown type local
unknown type dropout
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
[<ipython-input-14-007ad6e147b5>](https://localhost:8080/#) in <module>()
      1 WEIGHTS = Darknet("yolov1.cfg", inference=True)
----> 2 WEIGHTS.load_weights("yolov1.weights")

2 frames
[/usr/local/lib/python3.7/dist-packages/torch/nn/modules/container.py](https://localhost:8080/#) in _get_abs_string_index(self, idx)
    187         idx = operator.index(idx)
    188         if not (-len(self) <= idx < len(self)):
--> 189             raise IndexError('index {} is out of range'.format(idx))
    190         if idx < 0:
    191             idx += len(self)

IndexError: index 30 is out of range

Please let me know, All the best.

sendeniz avatar Jun 21 '22 13:06 sendeniz

@sendeniz did you have success with converting yolov4 at least? Am trying to convert yolov4-csp but its difficult

lpkoh avatar Jul 16 '22 18:07 lpkoh