allanzelener / YAD2K

YAD2K: Yet Another Darknet 2 Keras
Other
2.71k stars 877 forks source link

Fix "is directory" check in test_yolo.py #111

Open iver56 opened 6 years ago

iver56 commented 6 years ago

I'm proposing this change because the existing implementation gave me an error like this:

Traceback (most recent call last):
  File "test_yolo.py", line 194, in <module>
    _main(parser.parse_args())
  File "test_yolo.py", line 119, in _main
    image_type = imghdr.what(os.path.join(test_path, image_file))
  File "C:\Users\Iver\Anaconda3\envs\yad2k\lib\imghdr.py", line 16, in what
    f = open(file, 'rb')
PermissionError: [Errno 13] Permission denied: 'images\\out'

Environment: Windows 10, Anaconda 3 64 bit, Python 3.6.1

beipym commented 4 years ago

hey , i face the same error trying to run the code , what should i do ?

PermissionError: [Errno 13] Permission denied: 'images\\out' in windows