Skip to content
New issue

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

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

Already on GitHub? # to your account

Calling get_classifier_score inadvertently saves a file to disk #6

Open
vpalkar opened this issue Nov 14, 2024 · 4 comments · May be fixed by #8
Open

Calling get_classifier_score inadvertently saves a file to disk #6

vpalkar opened this issue Nov 14, 2024 · 4 comments · May be fixed by #8
Assignees

Comments

@vpalkar
Copy link

vpalkar commented Nov 14, 2024

Hello, thank you for the Decimer project!

Just wanted to report that this repo is saving a file to disk where it doesn't seem to be the intent. See the relevant line below:

I will be happy to open a quick PR.

@DocMinus
Copy link

DocMinus commented Nov 19, 2024

Indeed, I have the same happening.
The content of the file isn't caffeine, it is the submitted image content.
This seems to stem from the function called
_get_RGB_grayscale_image(self, img: Image) -> Image:
where a img.save is called as mentioned above, which stems perhaps from debugging?

@Kohulan
Copy link
Collaborator

Kohulan commented Nov 19, 2024

@vpalkar @DocMinus ,

You could comment it out. If someone wants to visualize it how the modified image looks like they could look at the saved image.

@Kohulan Kohulan self-assigned this Nov 19, 2024
@DocMinus
Copy link

If that is the goal, then a flag would make more sense? But sure, I can comment it out.
Cheers.

@vpalkar vpalkar linked a pull request Nov 19, 2024 that will close this issue
@vpalkar
Copy link
Author

vpalkar commented Nov 19, 2024

@Kohulan thanks for looking into this and clarifying the goal.

You could comment it out. If someone wants to visualize it how the modified image looks like they could look at the saved image.

Commenting out is extremely painful to maintain in a downstream project which pip installs this one as a dependency. Please consider merging #8 which makes the file save optional.

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

Successfully merging a pull request may close this issue.

3 participants