Datasets:

Modalities:
Image
Text
Formats:
webdataset
ArXiv:
Libraries:
Datasets
WebDataset
License:
zxooh46@uni-tuebingen.de commited on
Commit
0268768
·
1 Parent(s): eedc72a

Refined eval

Browse files
evaluation/clips/eval.py CHANGED
@@ -3,9 +3,10 @@ import json
3
  from pathlib import Path
4
  import sys
5
 
6
- def point_in_xywh(px, py, x, y, w, h):
7
- return (x <= px < x + w) and (y <= py < y + h)
8
 
 
9
  def main():
10
 
11
  parser = argparse.ArgumentParser()
@@ -48,7 +49,7 @@ def main():
48
  continue
49
  total+=1
50
  GT_box = clips_gt[clip].get(frame)
51
- if point_in_xywh(*point, *GT_box):
52
  hits+=1
53
 
54
  print(f"Total: {total}, hits: {hits}")
 
3
  from pathlib import Path
4
  import sys
5
 
6
+ def point_in_box(px, py, x_min, y_min, x_max, y_max):
7
+ return (x_min <= px < x_max) and (y_min <= py < y_max)
8
 
9
+
10
  def main():
11
 
12
  parser = argparse.ArgumentParser()
 
49
  continue
50
  total+=1
51
  GT_box = clips_gt[clip].get(frame)
52
+ if point_in_box(*point, *GT_box):
53
  hits+=1
54
 
55
  print(f"Total: {total}, hits: {hits}")
evaluation/frames/eval.py CHANGED
@@ -3,8 +3,8 @@ import json
3
  from pathlib import Path
4
  import sys
5
 
6
- def point_in_xywh(px, py, x, y, w, h):
7
- return (x <= px < x + w) and (y <= py < y + h)
8
 
9
  def main():
10
 
@@ -44,7 +44,7 @@ def main():
44
 
45
  total+=1
46
  GT_box = frames_gt[frame]
47
- if point_in_xywh(*coords, *GT_box):
48
  hits+=1
49
 
50
  print(f"Total: {total}, hits: {hits}")
 
3
  from pathlib import Path
4
  import sys
5
 
6
+ def point_in_box(px, py, x_min, y_min, x_max, y_max):
7
+ return (x_min <= px < x_max) and (y_min <= py < y_max)
8
 
9
  def main():
10
 
 
44
 
45
  total+=1
46
  GT_box = frames_gt[frame]
47
+ if point_in_box(*coords, *GT_box):
48
  hits+=1
49
 
50
  print(f"Total: {total}, hits: {hits}")