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

ReverseImageChannels transform's get_equivalent_preprocessing return unwanted set object #1122

Closed
yitelee opened this issue Jun 4, 2023 · 1 comment · Fixed by #1352
Closed

Comments

@yitelee
Copy link

yitelee commented Jun 4, 2023

/usr/local/lib/python3.10/dist-packages/super_gradients/training/processing/processing.py in preprocess_image(self, image)
72 processed_image, metadata_lst = image.copy(), []
73 for processing in self.processings:
---> 74 processed_image, metadata = processing.preprocess_image(image=processed_image)
75 metadata_lst.append(metadata)
76 return processed_image, ComposeProcessingMetadata(metadata_lst=metadata_lst)

AttributeError: 'set' object has no attribute 'preprocess_image'

print(best_model._image_processor.processings)

[<super_gradients.training.processing.processing.ReverseImageChannels at 0x7fe14c69cd60>,
<super_gradients.training.processing.processing.DetectionLongestMaxSizeRescale at 0x7fe14c69fca0>,
{'ReverseImageChannels'},
<super_gradients.training.processing.processing.DetectionCenterPadding at 0x7fe14c69db40>,
<super_gradients.training.processing.processing.StandardizeImage at 0x7fe14c69dfc0>,
<super_gradients.training.processing.processing.ImagePermute at 0x7fe14c69ee30>]

https://github.com/Deci-AI/super-gradients/blame/b4eec926261e9e8f3032d8fb51977af33b85ec3c/src/super_gradients/training/transforms/transforms.py#L944

Tested OK if changed
return [{Processings.ReverseImageChannels}] --> return [Processings.ReverseImageChannels]

@aayushsingla
Copy link

aayushsingla commented Aug 7, 2023

Facing similar issue. Can reproduce with YoloNAS when using model.predict with image path or array of paths. model.predict works fine with a url though but throws same error with prediction.save.

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

Successfully merging a pull request may close this issue.

2 participants