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

[FR] YOLOv5DatasetExporter : Add optional to add path to dataset.yaml #2106

Closed
2 of 6 tasks
karsil opened this issue Sep 21, 2022 · 3 comments
Closed
2 of 6 tasks

[FR] YOLOv5DatasetExporter : Add optional to add path to dataset.yaml #2106

karsil opened this issue Sep 21, 2022 · 3 comments
Labels
enhancement Code enhancement

Comments

@karsil
Copy link

karsil commented Sep 21, 2022

Proposal Summary

Add option for the YOLOv5 dataset export to add the value for path to the dataset.yaml.

Motivation

A problem occured when working with the pip package of YOLOv5.
YOLOv5 will try before training to resolve the relative train / val inside the dataset.yaml.
Without any reference to the absolute path of the data, it will end up resolving it inside the pip package, not in any project. This will end up in an exception and stopping the training process.

What areas of FiftyOne does this feature affect?

  • App: FiftyOne application
  • Core: Core fiftyone Python library
  • Server: FiftyOne server

Details

By adding the absolute path as value to the key path, this problem can be fixed. (I modified the dataset.yaml after the export to verify this). The already existing variable export_dir could be used for this.

As far as I understood it until now, my proposed changes would be quite small:

  • YOLOv5DatasetExporter.init(...): Recieves another optional, boolean parameter: export_dir_as_path, default False
  • YOLOv5DatasetExporter.close(...): If flag has been set, export_dir is added as value to key path

Open for any improvements!

Willingness to contribute

  • Yes. I can contribute this feature independently.
  • Yes. I would be willing to contribute this feature with guidance from
    the FiftyOne community.
  • No. I cannot contribute this feature at this time.
@karsil karsil added the enhancement Code enhancement label Sep 21, 2022
@karsil karsil changed the title [FR] [FR] YOLOv5DatasetExporter : Add optional to add path to dataset.yaml Sep 21, 2022
@brimoor
Copy link
Contributor

brimoor commented Sep 22, 2022

Hi @karsil 👋 makes sense! I might recommend include_path=True as the name of the new optional parameter for this case.

If you submit a PR I'd be happy to approve it! 🤗

@brimoor
Copy link
Contributor

brimoor commented Sep 22, 2022

cc @victor1cea @alexk-ede from #2016

@karsil
Copy link
Author

karsil commented Sep 22, 2022

Fix #2114

@karsil karsil closed this as completed Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Code enhancement
Projects
None yet
Development

No branches or pull requests

2 participants