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

Labels are not stored in labels directory but in parent directory #713

Open
gnaegit opened this issue Dec 20, 2023 · 0 comments
Open

Labels are not stored in labels directory but in parent directory #713

gnaegit opened this issue Dec 20, 2023 · 0 comments

Comments

@gnaegit
Copy link

gnaegit commented Dec 20, 2023

When running the weed_ai_yolov5.ipynb the labels were stored in f"/content/drive/MyDrive/{YOUR_DIRECTORY}/yolov5/datasets/{YOUR_DATASET}"
instead of
f"/content/drive/MyDrive/{YOUR_DIRECTORY}/yolov5/datasets/{YOUR_DATASET}/labels"
I could fix that like this:

    # Import json
    for json_file in sorted(Path(json_dir).resolve().glob('*.json')):
        fn = Path(save_dir / 'labels') # folder name
        fn.mkdir(exist_ok=True)
        with open(json_file) as f:
            data = json.load(f)

Not sure if I made some mistake earlier or if this is a bug.

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

1 participant