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

[BUG] Could not convert string to float in Augmentation with Albumentations #5498

Open
1 of 3 tasks
riset-testing-khs opened this issue Feb 19, 2025 · 0 comments
Open
1 of 3 tasks
Labels
bug Bug fixes

Comments

@riset-testing-khs
Copy link

Describe the problem

So, I was trying to augment my dataset using Albumentations by following this tutorial. Here, I used the "quickstart" dataset. But, when I applied the augmentation, there's an error message: "could not convert string to float: 'id'" and "Error occurred during operator execution."

Here, I checked the "Transform all label fields", but the error also occurred when I checked "Transform ground_truth?" and "Transform predictions?" in Augment with Albumentations dialog box. The error, surprisingly, did not happen when unchecked all those options. But, it will cause all the ground truth and prediction boxes to vanish. I wanted the augmentation to keep the boxes. Is that possible?

Code to reproduce issue

import fiftyone as fo
import fiftyone.zoo as foz

# Load dataset
dataset = foz.load_zoo_dataset("quickstart")

print(dataset.summary())

if __name__ == "__main__":
     # ensures that the app processes are safely launched on windows
     session = fo.launch_app(dataset)
     session.wait()

System information

  • OS Platform and Distribution : Windows 10 Pro
  • Python version (python --version): 3.11.9
  • FiftyOne version (fiftyone --version): 1.2.0
  • FiftyOne installed from (pip or source): pip

Other info/logs

Dataset already downloaded
Loading existing dataset 'quickstart'. To reload from disk, either delete the existing dataset or provide a custom `dataset_name` to use
Name:        quickstart
Media type:  image
Num samples: 200
Persistent:  False
Tags:        []
Sample fields:
    id:               fiftyone.core.fields.ObjectIdField
    filepath:         fiftyone.core.fields.StringField
    tags:             fiftyone.core.fields.ListField(fiftyone.core.fields.StringField)
    metadata:         fiftyone.core.fields.EmbeddedDocumentField(fiftyone.core.metadata.ImageMetadata)
    created_at:       fiftyone.core.fields.DateTimeField
    last_modified_at: fiftyone.core.fields.DateTimeField
    ground_truth:     fiftyone.core.fields.EmbeddedDocumentField(fiftyone.core.labels.Detections)
    uniqueness:       fiftyone.core.fields.FloatField
    predictions:      fiftyone.core.fields.EmbeddedDocumentField(fiftyone.core.labels.Detections)
App launched. Point your web browser to http://localhost:5151

Willingness to contribute

The FiftyOne Community encourages bug fix contributions. Would you or another
member of your organization be willing to contribute a fix for this bug to the
FiftyOne codebase?

  • Yes. I can contribute a fix for this bug independently
  • Yes. I would be willing to contribute a fix for this bug with guidance
    from the FiftyOne community
  • No. I cannot contribute a bug fix at this time
@riset-testing-khs riset-testing-khs added the bug Bug fixes label Feb 19, 2025
@riset-testing-khs riset-testing-khs changed the title [BUG] [BUG] Could not convert string to float in Augmentation with Albumentations Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fixes
Projects
None yet
Development

No branches or pull requests

1 participant