hhk7734 / tensorflow-yolov4

YOLOv4 Implemented in Tensorflow 2.
MIT License
136 stars 75 forks source link

RuntimeError:parse_cfg: [net] 'subdivisions' is not supported. #66

Closed x12901 closed 3 years ago

x12901 commented 3 years ago

There is a problem with the new version yolov4 3.0.1. https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov4-tiny.cfg

from tensorflow.keras import callbacks

from yolov4.tf import YOLOv4, YOLODataset, SaveWeightsCallback

yolo = YOLOv4()

yolo.config.parse_names("obj.names")
yolo.config.parse_cfg("yolov4-tiny.cfg")
Call tf.config.experimental.set_memory_growth(GPU0, True)
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
D:\Anaconda\envs\labelimg\lib\site-packages\yolov4\common\parser.py in parse_cfg(cfg_path)
    100                 try:
--> 101                     metalayers[layer.name][option] = value
    102                 except KeyError as error:

D:\Anaconda\envs\labelimg\lib\site-packages\yolov4\common\metalayer\net_layer.py in __setitem__(self, key, value)
    145         else:
--> 146             raise KeyError(f"'{key}' is not supported")

KeyError: "'subdivisions' is not supported"

The above exception was the direct cause of the following exception:

RuntimeError                              Traceback (most recent call last)
<ipython-input-1-5d0c6f0b11b4> in <module>
      6 
      7 yolo.config.parse_names("obj.names")
----> 8 yolo.config.parse_cfg("yolov4-tiny.cfg")

D:\Anaconda\envs\labelimg\lib\site-packages\yolov4\common\config.py in parse_cfg(self, cfg_path)
     64             self._layer_count,
     65             self._model_name,
---> 66         ) = parser.parse_cfg(cfg_path=cfg_path)
     67 
     68     def parse_names(self, names_path: str):

D:\Anaconda\envs\labelimg\lib\site-packages\yolov4\common\parser.py in parse_cfg(cfg_path)
    101                     metalayers[layer.name][option] = value
    102                 except KeyError as error:
--> 103                     raise RuntimeError(
    104                         f"parse_cfg: [{layer.name}] '{option}' is not"
    105                         " supported."

RuntimeError: parse_cfg: [net] 'subdivisions' is not supported.
hhk7734 commented 3 years ago

Subdivision is not yet implemented.

hhk7734 commented 3 years ago

https://github.com/hhk7734/tensorflow-yolov4/tree/master/config

x12901 commented 3 years ago

Thank you