MCPcopy Create free account
hub / github.com/FoundationVision/ByteTrack / accumulate

Method accumulate

yolox/layers/fast_coco_eval_api.py:124–150  ·  view source on GitHub ↗

Accumulate per image evaluation results and store the result in self.eval. Does not support changing parameter settings from those used by self.evaluate()

(self)

Source from the content-addressed store, hash-verified

122 # >>>> End of code differences with original COCO API
123
124 def accumulate(self):
125 """
126 Accumulate per image evaluation results and store the result in self.eval. Does not
127 support changing parameter settings from those used by self.evaluate()
128 """
129 print("Accumulating evaluation results...")
130 tic = time.time()
131 if not hasattr(self, "_evalImgs_cpp"):
132 print("Please run evaluate() first")
133
134 self.eval = _C.COCOevalAccumulate(self._paramsEval, self._evalImgs_cpp)
135
136 # recall is num_iou_thresholds X num_categories X num_area_ranges X num_max_detections
137 self.eval["recall"] = np.array(self.eval["recall"]).reshape(
138 self.eval["counts"][:1] + self.eval["counts"][2:]
139 )
140
141 # precision and scores are num_iou_thresholds X num_recall_thresholds X num_categories X
142 # num_area_ranges X num_max_detections
143 self.eval["precision"] = np.array(self.eval["precision"]).reshape(
144 self.eval["counts"]
145 )
146 self.eval["scores"] = np.array(self.eval["scores"]).reshape(self.eval["counts"])
147 toc = time.time()
148 print(
149 "COCOeval_opt.accumulate() finished in {:0.2f} seconds.".format(toc - tic)
150 )

Callers 4

evaluate_predictionMethod · 0.80
evaluate_predictionMethod · 0.80
evaluateFunction · 0.80
evaluate_trackFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected