MCPcopy Create free account
hub / github.com/EmbodiedGPT/EmbodiedGPT_Pytorch / refine_bbox_dict

Method refine_bbox_dict

demo/script.py:313–330  ·  view source on GitHub ↗
(self,boxes, names)

Source from the content-addressed store, hash-verified

311
312
313 def refine_bbox_dict(self,boxes, names):
314 counter_dict = {}
315 result_dict = {}
316
317 for i, name in enumerate(names):
318 if name in counter_dict:
319 counter_dict[name] += 1
320 else:
321 counter_dict[name] = 0
322
323 unique_name = f"{name}_{counter_dict[name]}"
324
325 result_dict[unique_name] = boxes[i].tolist()
326
327 for name, box in result_dict.items():
328 print(f"{name}: {box}")
329
330 return result_dict
331
332
333

Callers 1

post_questionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected