You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running Python 3.6.9 64-bit on a Ubuntu 18.04.5 docker container.
I spotted a bug for the "predict multiple images at once" feature:
# Predict multiple images at oncepredict.classify(model, ['/Users/bedapudi/Desktop/2.jpg', '/Users/bedapudi/Desktop/6.jpg'])
The exception raised is:
---------------------------------------------------------------------------TypeError Traceback (most recent call last)/#########/nsfw_model/test_script.py in 25 '/Users/bedapudi/Desktop/6.jpg']) 26 ]----> 27 predict.classify(model, imglist)//#########/nsfw_model/nsfw_detector/predict.py in classify(model, input_paths, image_dim) 67 def classify(model, input_paths, image_dim=IMAGE_DIM): 68 """ Classify given a model, input paths (could be single string), and image dimensionality...."""---> 69 images, image_paths = load_images(input_paths, (image_dim, image_dim)) 70 probs = classify_nd(model, images) 71 return dict(zip(image_paths, probs))//#########/nsfw_model/nsfw_detector/predict.py in load_images(image_paths, image_size, verbose) 33 #else: 34 if True:---> 35 if isdir(image_paths): 36 parent = abspath(image_paths) 37 image_paths = [join(parent, f) for f in listdir(/usr/lib/python3.6/genericpath.py in isdir(s) 40 """Return true if the pathname refers to an existing directory.""" 41 try:---> 42 st = os.stat(s) 43 except OSError: 44 return FalseTypeError: stat: path should be string, bytes, os.PathLike or integer, not list
I am running Python 3.6.9 64-bit on a Ubuntu 18.04.5 docker container.
I spotted a bug for the "predict multiple images at once" feature:
The exception raised is:
I guess the problem was in
I fixed it in the following way:
Did I got something wrong or it is a legit fix?
The text was updated successfully, but these errors were encountered: