Meehai commited on
Commit
c86db9a
·
1 Parent(s): fff26c3

len(classes)

Browse files
scripts/evaluate_semantic_segmentation.py CHANGED
@@ -1,6 +1,6 @@
1
  """
2
- Evaluation script for semantic segmentation for dronescapes. Outputs F1Score and mIoU for the 8 classes and each frame.
3
- Usage: ./evaluate_semantic_segmentation.py y_dir gt_dir --classes C1 C2 ... Cn -o results.csv
4
  """
5
  import sys
6
  import os
@@ -34,7 +34,7 @@ def compute_metrics_by_class(df: pd.DataFrame, class_name: str) -> pd.DataFrame:
34
  return df
35
 
36
  def compute_raw_stats_per_frame(reader: MultiTaskDataset, classes: list[str]) -> pd.DataFrame:
37
- res = tr.zeros((len(reader), 8, 4)).long() # (N, 8, 4)
38
  index = []
39
  for i in trange(len(reader)):
40
  x = reader[i]
 
1
  """
2
+ Evaluation script for semantic segmentation for dronescapes. Outputs F1Score and mIoU for the classes and each frame.
3
+ Usage: ./evaluate_semantic_segmentation.py y_dir gt_dir --classes C1 .. Cn [--class_weights W1 .. Wn] -o results.csv
4
  """
5
  import sys
6
  import os
 
34
  return df
35
 
36
  def compute_raw_stats_per_frame(reader: MultiTaskDataset, classes: list[str]) -> pd.DataFrame:
37
+ res = tr.zeros((len(reader), len(classes), 4)).long() # (N, NC, 4)
38
  index = []
39
  for i in trange(len(reader)):
40
  x = reader[i]