Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Z-MiCTrue opened this issue Jun 17, 2023 · 1 comment
Open

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

Z-MiCTrue opened this issue Jun 17, 2023 · 1 comment

Comments

@Z-MiCTrue
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants