Skip to content

Commit

Permalink
Merge pull request thtrieu#459 from dkermany/master
Browse files Browse the repository at this point in the history
JPEG Images not found during predictions: FIXED
  • Loading branch information
abagshaw authored Dec 8, 2017
2 parents 6dddf04 + 4b36cc9 commit 854b0f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions darkflow/net/yolo/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def labels(meta, FLAGS):
meta['labels'] = labels20

def is_inp(self, name):
return name[-4:] in ['.jpg','.JPG', '.jpeg', '.JPEG', '.png', '.PNG']
return name.lower().endswith(('.jpg', '.jpeg', '.png'))

def show(im, allobj, S, w, h, cellx, celly):
for obj in allobj:
Expand All @@ -59,7 +59,7 @@ def show(im, allobj, S, w, h, cellx, celly):
(int(centerx - ww/2), int(centery - hh/2)),
(int(centerx + ww/2), int(centery + hh/2)),
(0,0,255), 2)
cv2.imshow("result", im)
cv2.imshow('result', im)
cv2.waitKey()
cv2.destroyAllWindows()

Expand Down

0 comments on commit 854b0f9

Please sign in to comment.