darknet_scripts
darknet_scripts copied to clipboard
The code is not compatible with Python 3.x
Hi,
You have wrote the code in Python 2 and it is obvious from the print without parenthesis in the code. But in the description you mentioned about installing the python 3.5.
The code works with Python 2.7, but it does not work with Python 3.6.4 as I tested now, even after I modified the ( and ) for print operations.
Error:
Traceback (most recent call last):
File "gen_anchors.py", line 165, in <module>
main(sys.argv)
File "gen_anchors.py", line 161, in main
kmeans(annotation_dims,centroids,eps,anchor_file)
File "gen_anchors.py", line 74, in kmeans
k,dim = centroids.shape
ValueError: not enough values to unpack (expected 2, got 1)
Please fix.
Hi @VanitarNordic , I changed it to python2 from the manual. Thanks for the catch!