Skip to content

Commit

Permalink
fix infer image save path
Browse files Browse the repository at this point in the history
  • Loading branch information
shensheng272 authored Sep 6, 2022
1 parent 14d84a4 commit a82eee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yolov6/core/inferer.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def infer(self, conf_thres, iou_thres, classes, agnostic_nms, max_det, save_dir,
t2 = time.time()

# Create output files in nested dirs that mirrors the structure of the images' dirs
rel_path = osp.relpath(osp.dirname(img_path), self.source)
rel_path = osp.relpath(osp.dirname(img_path), osp.dirname(self.source))
save_path = osp.join(save_dir, rel_path, osp.basename(img_path)) # im.jpg
txt_path = osp.join(save_dir, rel_path, osp.splitext(osp.basename(img_path))[0])
os.makedirs(osp.join(save_dir, rel_path), exist_ok=True)
Expand Down

0 comments on commit a82eee8

Please sign in to comment.