Spaces:
Runtime error
Runtime error
mingyang91
commited on
fix runtime error in coco evaluator
Browse files- .idea/workspace.xml +12 -5
- yolo_dataset.py +1 -0
.idea/workspace.xml
CHANGED
@@ -6,8 +6,6 @@
|
|
6 |
<component name="ChangeListManager">
|
7 |
<list default="true" id="d7806539-b6d6-42e7-bb45-1565f5d54891" name="Changes" comment="fix runtime error in coco evaluator">
|
8 |
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
9 |
-
<change beforePath="$PROJECT_DIR$/demo.py" beforeDir="false" afterPath="$PROJECT_DIR$/demo.py" afterDir="false" />
|
10 |
-
<change beforePath="$PROJECT_DIR$/evaluator.py" beforeDir="false" afterPath="$PROJECT_DIR$/evaluator.py" afterDir="false" />
|
11 |
<change beforePath="$PROJECT_DIR$/yolo_dataset.py" beforeDir="false" afterPath="$PROJECT_DIR$/yolo_dataset.py" afterDir="false" />
|
12 |
</list>
|
13 |
<option name="SHOW_DIALOG" value="false" />
|
@@ -239,7 +237,8 @@
|
|
239 |
<workItem from="1706176033980" duration="1344000" />
|
240 |
<workItem from="1706274709532" duration="27000" />
|
241 |
<workItem from="1706445222599" duration="1814000" />
|
242 |
-
<workItem from="1706449264770" duration="
|
|
|
243 |
</task>
|
244 |
<task id="LOCAL-00001" summary="init commit">
|
245 |
<option name="closed" value="true" />
|
@@ -457,7 +456,15 @@
|
|
457 |
<option name="project" value="LOCAL" />
|
458 |
<updated>1706446725139</updated>
|
459 |
</task>
|
460 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
461 |
<servers />
|
462 |
</component>
|
463 |
<component name="TypeScriptGeneratedFilesManager">
|
@@ -519,7 +526,7 @@
|
|
519 |
<SUITE FILE_PATH="coverage/detector$yolo_dataset.coverage" NAME="yolo_dataset Coverage Results" MODIFIED="1705852113469" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
520 |
<SUITE FILE_PATH="coverage/detector$evaluator.coverage" NAME="evaluator Coverage Results" MODIFIED="1706107083258" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
521 |
<SUITE FILE_PATH="coverage/detector$demo.coverage" NAME="demo Coverage Results" MODIFIED="1706108414052" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
522 |
-
<SUITE FILE_PATH="coverage/detector$streamlit.coverage" NAME="streamlit Coverage Results" MODIFIED="
|
523 |
<SUITE FILE_PATH="coverage/detector$extract.coverage" NAME="yolo_dataset Coverage Results" MODIFIED="1705764465837" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
524 |
</component>
|
525 |
</project>
|
|
|
6 |
<component name="ChangeListManager">
|
7 |
<list default="true" id="d7806539-b6d6-42e7-bb45-1565f5d54891" name="Changes" comment="fix runtime error in coco evaluator">
|
8 |
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
|
|
|
|
9 |
<change beforePath="$PROJECT_DIR$/yolo_dataset.py" beforeDir="false" afterPath="$PROJECT_DIR$/yolo_dataset.py" afterDir="false" />
|
10 |
</list>
|
11 |
<option name="SHOW_DIALOG" value="false" />
|
|
|
237 |
<workItem from="1706176033980" duration="1344000" />
|
238 |
<workItem from="1706274709532" duration="27000" />
|
239 |
<workItem from="1706445222599" duration="1814000" />
|
240 |
+
<workItem from="1706449264770" duration="4974000" />
|
241 |
+
<workItem from="1706517295469" duration="574000" />
|
242 |
</task>
|
243 |
<task id="LOCAL-00001" summary="init commit">
|
244 |
<option name="closed" value="true" />
|
|
|
456 |
<option name="project" value="LOCAL" />
|
457 |
<updated>1706446725139</updated>
|
458 |
</task>
|
459 |
+
<task id="LOCAL-00028" summary="fix runtime error in coco evaluator">
|
460 |
+
<option name="closed" value="true" />
|
461 |
+
<created>1706454211376</created>
|
462 |
+
<option name="number" value="00028" />
|
463 |
+
<option name="presentableId" value="LOCAL-00028" />
|
464 |
+
<option name="project" value="LOCAL" />
|
465 |
+
<updated>1706454211376</updated>
|
466 |
+
</task>
|
467 |
+
<option name="localTasksCounter" value="29" />
|
468 |
<servers />
|
469 |
</component>
|
470 |
<component name="TypeScriptGeneratedFilesManager">
|
|
|
526 |
<SUITE FILE_PATH="coverage/detector$yolo_dataset.coverage" NAME="yolo_dataset Coverage Results" MODIFIED="1705852113469" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
527 |
<SUITE FILE_PATH="coverage/detector$evaluator.coverage" NAME="evaluator Coverage Results" MODIFIED="1706107083258" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
528 |
<SUITE FILE_PATH="coverage/detector$demo.coverage" NAME="demo Coverage Results" MODIFIED="1706108414052" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
529 |
+
<SUITE FILE_PATH="coverage/detector$streamlit.coverage" NAME="streamlit Coverage Results" MODIFIED="1706517471264" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" />
|
530 |
<SUITE FILE_PATH="coverage/detector$extract.coverage" NAME="yolo_dataset Coverage Results" MODIFIED="1705764465837" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
531 |
</component>
|
532 |
</project>
|
yolo_dataset.py
CHANGED
@@ -127,6 +127,7 @@ class YoloDataset:
|
|
127 |
@staticmethod
|
128 |
def from_zip_file(zip_file: ZipFile) -> 'YoloDataset':
|
129 |
namelist = zip_file.namelist()
|
|
|
130 |
root_name = namelist[0]
|
131 |
if not zip_file.getinfo(root_name).is_dir():
|
132 |
root_name = root_name.split('/')[0] + '/'
|
|
|
127 |
@staticmethod
|
128 |
def from_zip_file(zip_file: ZipFile) -> 'YoloDataset':
|
129 |
namelist = zip_file.namelist()
|
130 |
+
namelist = list(filter(lambda x: not x.startswith('.DS_Store'), namelist))
|
131 |
root_name = namelist[0]
|
132 |
if not zip_file.getinfo(root_name).is_dir():
|
133 |
root_name = root_name.split('/')[0] + '/'
|