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

Method _getDrawColor

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

:meth: get the color for groundtruth box. Red for unmatched (self.matched=0 & self.ign=0); cyan for matched (self.matched=1 & self.ign=0); yellow for ignored groundtruth (self.ign=1)

(self)

Source from the content-addressed store, hash-verified

314 return odf
315
316 def _getDrawColor(self):
317 """
318 :meth: get the color for groundtruth box. Red for unmatched (self.matched=0 & self.ign=0); cyan for matched (self.matched=1 & self.ign=0); yellow for ignored groundtruth (self.ign=1)
319 """
320 if self.color is not None:
321 return self.color
322 if self.ign == 1:
323 color = (0, 255, 255) # yellow for ignored gt
324 elif self.matched == 0:
325 color = (0, 0, 255) # red for unmatched gt
326 elif self.matched == 1:
327 color = (255, 255, 0) # cyan for matched gt
328 return color
329
330class BoxUtil:
331 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected