MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / _getDrawColor

Method _getDrawColor

PATH/core/solvers/utils/detools/box.py:253–268  ·  view source on GitHub ↗

:meth: get the color for detection box. Blue for unmatched (self.matched=0); green for matched (self.matched=1); white for matched with ignored groundtruth (self.matched=-1)

(self)

Source from the content-addressed store, hash-verified

251 return odf
252
253 def _getDrawColor(self):
254 """
255 :meth: get the color for detection box. Blue for unmatched (self.matched=0); green for matched (self.matched=1); white for matched with ignored groundtruth (self.matched=-1)
256 """
257 if self.color is not None:
258 return self.color
259 color = (0, 255, 0) # green for matched dt (unignored)
260 """
261 if self.matched == 0:
262 color = (255, 0, 0) # blue for unmatched dt
263 elif self.matched == 1:
264 color = (0, 255, 0) # green for matched dt (unignored)
265 elif self.matched == -1:
266 color = (255, 255, 255) # white for matched dt (ignored)
267 """
268 return color
269
270
271class DetBoxGT(BoxBase):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected