mingyang91 commited on
Commit
d21cbff
·
verified ·
1 Parent(s): 93cb0d5

fix runtime error in coco evaluator

Browse files
Files changed (2) hide show
  1. .idea/workspace.xml +16 -15
  2. demo.py +1 -1
.idea/workspace.xml CHANGED
@@ -6,7 +6,7 @@
6
  <component name="ChangeListManager">
7
  <list default="true" id="d7806539-b6d6-42e7-bb45-1565f5d54891" name="Changes" comment="Update UI">
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" />
12
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -213,7 +213,7 @@
213
  <component name="SharedIndexes">
214
  <attachedChunks>
215
  <set>
216
- <option value="bundled-python-sdk-50da183f06c8-2887949eec09-com.jetbrains.pycharm.pro.sharedIndexes.bundled-PY-233.13135.95" />
217
  </set>
218
  </attachedChunks>
219
  </component>
@@ -233,7 +233,10 @@
233
  <workItem from="1705845330999" duration="11089000" />
234
  <workItem from="1706104589422" duration="517000" />
235
  <workItem from="1706105118954" duration="5729000" />
236
- <workItem from="1706151430872" duration="786000" />
 
 
 
237
  </task>
238
  <task id="LOCAL-00001" summary="init commit">
239
  <option name="closed" value="true" />
@@ -435,7 +438,15 @@
435
  <option name="project" value="LOCAL" />
436
  <updated>1706110517589</updated>
437
  </task>
438
- <option name="localTasksCounter" value="26" />
 
 
 
 
 
 
 
 
439
  <servers />
440
  </component>
441
  <component name="TypeScriptGeneratedFilesManager">
@@ -494,16 +505,6 @@
494
  <line>81</line>
495
  <option name="timeStamp" value="17" />
496
  </line-breakpoint>
497
- <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
498
- <url>file://$PROJECT_DIR$/yolo_dataset.py</url>
499
- <line>230</line>
500
- <option name="timeStamp" value="20" />
501
- </line-breakpoint>
502
- <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
503
- <url>file://$PROJECT_DIR$/yolo_dataset.py</url>
504
- <line>233</line>
505
- <option name="timeStamp" value="21" />
506
- </line-breakpoint>
507
  </breakpoints>
508
  </breakpoint-manager>
509
  </component>
@@ -511,7 +512,7 @@
511
  <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$" />
512
  <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$" />
513
  <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$" />
514
- <SUITE FILE_PATH="coverage/detector$streamlit.coverage" NAME="streamlit Coverage Results" MODIFIED="1706152216466" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" />
515
  <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$" />
516
  </component>
517
  </project>
 
6
  <component name="ChangeListManager">
7
  <list default="true" id="d7806539-b6d6-42e7-bb45-1565f5d54891" name="Changes" comment="Update UI">
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
  </list>
11
  <option name="SHOW_DIALOG" value="false" />
12
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
 
213
  <component name="SharedIndexes">
214
  <attachedChunks>
215
  <set>
216
+ <option value="bundled-python-sdk-5a2391486177-2887949eec09-com.jetbrains.pycharm.pro.sharedIndexes.bundled-PY-233.13763.11" />
217
  </set>
218
  </attachedChunks>
219
  </component>
 
233
  <workItem from="1705845330999" duration="11089000" />
234
  <workItem from="1706104589422" duration="517000" />
235
  <workItem from="1706105118954" duration="5729000" />
236
+ <workItem from="1706151430872" duration="1470000" />
237
+ <workItem from="1706176033980" duration="1344000" />
238
+ <workItem from="1706274709532" duration="27000" />
239
+ <workItem from="1706445222599" duration="1467000" />
240
  </task>
241
  <task id="LOCAL-00001" summary="init commit">
242
  <option name="closed" value="true" />
 
438
  <option name="project" value="LOCAL" />
439
  <updated>1706110517589</updated>
440
  </task>
441
+ <task id="LOCAL-00026" summary="Update UI">
442
+ <option name="closed" value="true" />
443
+ <created>1706152276670</created>
444
+ <option name="number" value="00026" />
445
+ <option name="presentableId" value="LOCAL-00026" />
446
+ <option name="project" value="LOCAL" />
447
+ <updated>1706152276670</updated>
448
+ </task>
449
+ <option name="localTasksCounter" value="27" />
450
  <servers />
451
  </component>
452
  <component name="TypeScriptGeneratedFilesManager">
 
505
  <line>81</line>
506
  <option name="timeStamp" value="17" />
507
  </line-breakpoint>
 
 
 
 
 
 
 
 
 
 
508
  </breakpoints>
509
  </breakpoint-manager>
510
  </component>
 
512
  <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$" />
513
  <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$" />
514
  <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$" />
515
+ <SUITE FILE_PATH="coverage/detector$streamlit.coverage" NAME="streamlit Coverage Results" MODIFIED="1706446389552" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" />
516
  <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$" />
517
  </component>
518
  </project>
demo.py CHANGED
@@ -51,7 +51,7 @@ def evaluate(model: YoloModel):
51
  # Slider for changing confidence
52
  confidence = st.slider('Confidence Threshold', 0, 100, 30)
53
  yolo_dataset = YoloDataset.from_zip_file(ZipFile(buffer))
54
- capture_output(evaluator.coco_evaluate)(model=model.model,
55
  dataset=yolo_dataset,
56
  confidence_threshold=confidence / 100.0)
57
  with evaluator.yolo_evaluator(model, yolo_dataset) as metrics:
 
51
  # Slider for changing confidence
52
  confidence = st.slider('Confidence Threshold', 0, 100, 30)
53
  yolo_dataset = YoloDataset.from_zip_file(ZipFile(buffer))
54
+ capture_output(evaluator.coco_evaluate)(model=model,
55
  dataset=yolo_dataset,
56
  confidence_threshold=confidence / 100.0)
57
  with evaluator.yolo_evaluator(model, yolo_dataset) as metrics: