dog-qiuqiu / FastestDet

:zap: A newly designed ultra lightweight anchor free target detection algorithm, weight only 250K parameters, reduces the time consumption by 10% compared with yolo-fastest, and the post-processing is simpler
BSD 3-Clause "New" or "Revised" License
768 stars 131 forks source link

May choose the function `os.path.splitext` ? #44

Open Z-MiCTrue opened 1 year ago

Z-MiCTrue commented 1 year ago

In line 89 of the file /utils/datasets.py, there is a statement: label_path = img_path.split(".")[0] + ".txt" which may cause some errors, such as using the format of './xxx/xxx. txt '. To avoid such errors, label_path = os.path.splitext(img_path)[0] + ".txt" might be better?

touchinglie commented 4 days ago

linux和windows系统路径格式不同,估计得用pathlib更好