MCPcopy Index your code
hub / github.com/FoundationVision/ByteTrack / load_img_from_file

Method load_img_from_file

tutorials/motr/eval.py:318–323  ·  view source on GitHub ↗
(self,f_path)

Source from the content-addressed store, hash-verified

316 os.remove(os.path.join(self.predict_path, 'gt.txt'))
317
318 def load_img_from_file(self,f_path):
319 label_path = f_path.replace('images', 'labels_with_ids').replace('.png', '.txt').replace('.jpg', '.txt')
320 cur_img = cv2.imread(f_path)
321 cur_img = cv2.cvtColor(cur_img, cv2.COLOR_BGR2RGB)
322 targets = load_label(label_path, cur_img.shape[:2]) if os.path.exists(label_path) else None
323 return cur_img, targets
324
325 def init_img(self, img):
326 ori_img = img.copy()

Callers 1

detectMethod · 0.95

Calls 1

load_labelFunction · 0.85

Tested by

no test coverage detected