Gil-Simas commited on
Commit
a13dc9f
·
verified ·
1 Parent(s): c7763c3

finished better documentation

Browse files
Files changed (1) hide show
  1. README.md +11 -58
README.md CHANGED
@@ -48,7 +48,7 @@ references = [torch.tensor[n,5], torch.tensor[n,5]]
48
  #refernces box format: label, x1, y1, x2, y2 (torch metrics format)
49
 
50
  # Load SEA-AI/det-metrics and evaluate
51
- module = evaluate.load("SEA-AI/det-metrics")
52
  module.add_batch(prediction=predictions, reference=references, sequence_name="sequence")
53
  results = module.compute()
54
 
@@ -77,15 +77,15 @@ logging.basicConfig(level=logging.WARNING)
77
 
78
  # Configure your dataset and model details
79
  processor = PayloadProcessor(
80
- dataset_name="SAILING_DATASET_QA",
81
  gt_field="ground_truth_det",
82
- models=["yolov5n6_RGB_D2304-v1_9C"],
83
- sequence_list=["Trip_14_Seq_1"],
84
- data_type="rgb",
85
  )
86
 
87
  # Evaluate using SEA-AI/det-metrics
88
- module = evaluate.load("SEA-AI/det-metrics")
89
  module.add_payload(processor.payload)
90
  results = module.compute()
91
 
@@ -93,63 +93,16 @@ print(results)
93
  ```
94
 
95
  ```console
96
- {'all': {'range': [0, 10000000000.0],
97
- 'iouThr': '0.00',
98
- 'maxDets': 100,
99
- 'tp': 89,
100
- 'fp': 13,
101
- 'fn': 15,
102
- 'duplicates': 1,
103
- 'precision': 0.8725490196078431,
104
- 'recall': 0.8557692307692307,
105
- 'f1': 0.8640776699029126,
106
- 'support': 104,
107
- 'fpi': 0,
108
- 'nImgs': 22}}
109
- ```
110
-
111
- ## Metric Settings
112
-
113
- Customize your evaluation by specifying various parameters when loading SEA-AI/det-metrics:
114
-
115
- - **area_ranges_tuples**: Define different area ranges for metrics calculation.
116
- - **bbox_format**: Set the bounding box format (e.g., `"xywh"`).
117
- - **iou_threshold**: Choose the IOU threshold for determining correct detections.
118
- - **class_agnostic**: Specify whether to calculate metrics disregarding class labels.
119
-
120
- ```python
121
- area_ranges_tuples = [
122
- ("all", [0, 1e5**2]),
123
- ("small", [0**2, 6**2]),
124
- ("medium", [6**2, 12**2]),
125
- ("large", [12**2, 1e5**2]),
126
- ]
127
-
128
- module = evaluate.load(
129
- "SEA-AI/det-metrics",
130
- iou_threshold=[0.00001],
131
- area_ranges_tuples=area_ranges_tuples,
132
- )
133
  ```
134
 
135
- ## Output Values
136
-
137
- SEA-AI/det-metrics provides a detailed breakdown of performance metrics for each specified area range:
138
-
139
- - **range**: The area range considered.
140
- - **iouThr**: The IOU threshold applied.
141
- - **maxDets**: The maximum number of detections evaluated.
142
- - **tp/fp/fn**: Counts of true positives, false positives, and false negatives.
143
- - **duplicates**: Number of duplicate detections.
144
- - **precision/recall/f1**: Calculated precision, recall, and F1 score.
145
- - **support**: Number of ground truth boxes considered.
146
- - **fpi**: Number of images with predictions but no ground truths.
147
- - **nImgs**: Total number of images evaluated.
148
-
149
  ## Further References
150
 
151
  - **seametrics Library**: Explore the [seametrics GitHub repository](https://github.com/SEA-AI/seametrics/tree/main) for more details on the underlying library.
152
- - **Pycoco Tools**: SEA-AI/det-metrics calculations are based on [pycoco tools](https://github.com/cocodataset/cocoapi/tree/master/PythonAPI/pycocotools), a widely used library for COCO dataset evaluation.
153
  - **Understanding Metrics**: For a deeper understanding of precision, recall, and other metrics, read [this comprehensive guide](https://www.analyticsvidhya.com/blog/2020/09/precision-recall-machine-learning/).
154
 
155
  ## Contribution
 
48
  #refernces box format: label, x1, y1, x2, y2 (torch metrics format)
49
 
50
  # Load SEA-AI/det-metrics and evaluate
51
+ module = evaluate.load("SEA-AI/box-metrics")
52
  module.add_batch(prediction=predictions, reference=references, sequence_name="sequence")
53
  results = module.compute()
54
 
 
77
 
78
  # Configure your dataset and model details
79
  processor = PayloadProcessor(
80
+ dataset_name="SENTRY_VIDEOS_DATASET_QA",
81
  gt_field="ground_truth_det",
82
+ models=["ahoy-IR-b2-whales__XAVIER-AGX-JP46_CNN"],
83
+ sequence_list=["Sentry_2022_11_PROACT_CELADON_7.5M_MOB_2022_11_25_12_12_39"],
84
+ data_type="thermal",
85
  )
86
 
87
  # Evaluate using SEA-AI/det-metrics
88
+ module = evaluate.load("SEA-AI/box-metrics")
89
  module.add_payload(processor.payload)
90
  results = module.compute()
91
 
 
93
  ```
94
 
95
  ```console
96
+ {'Sentry_2022_11_PROACT_CELADON_7.5M_MOB_2022_11_25_12_12_39': {'ahoy-IR-b2-whales__XAVIER-AGX-JP46_CNN':
97
+ {'iou': '0.6',
98
+ 'bep': 0.5,
99
+ ...
100
+ }}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  ```
102
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  ## Further References
104
 
105
  - **seametrics Library**: Explore the [seametrics GitHub repository](https://github.com/SEA-AI/seametrics/tree/main) for more details on the underlying library.
 
106
  - **Understanding Metrics**: For a deeper understanding of precision, recall, and other metrics, read [this comprehensive guide](https://www.analyticsvidhya.com/blog/2020/09/precision-recall-machine-learning/).
107
 
108
  ## Contribution