Skip to content

Commit fd4714d

Browse files
authored
Bug fix os.path.isdir() to os.path.isfile() in coco.py
Current code produces an error when the file is present, as the current code is looking for a directory. Fix corrects this.
1 parent 17eec49 commit fd4714d

File tree

1 file changed

+1
-1
lines changed
  • sotabencheval/object_detection

1 file changed

+1
-1
lines changed

sotabencheval/object_detection/coco.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def _download(self, annFile):
124124
:param annFile: path of the annotations file
125125
:return: void - extracts the archive
126126
"""
127-
if not os.path.isdir(annFile):
127+
if not os.path.isfile(annFile):
128128
if "2017" in annFile:
129129
annotations_dir_zip = os.path.join(
130130
self.root, "annotations_train%s2017.zip" % self.split

0 commit comments

Comments
 (0)