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

some fixes #30

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

some fixes #30

wants to merge 5 commits into from

Conversation

gessyoo
Copy link

@gessyoo gessyoo commented Mar 18, 2024

minor modifications to overcome some install and inference issues.

python 3.8 has dependency conflicts under Ubuntu, python 3.9 does not.
Improve error handling when images cannot be loaded
Comment on lines +56 to +60
def process(self, img_path):
img = cv2.imread(img_path)
if img is None:
print(f"Error: Unable to load image '{img_path}'. Skipping...")
return None
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the change here is necessary because it will also affect ImageColorizationPipelineHF class.

class ImageColorizationPipelineHF(ImageColorizationPipeline):
.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My intention, not yet complete, was to modify the pipeline to process a directory of images and save them, rather than display the results. But I defer to you, of course. I think this project has a lot less color bleeding than others I've tried, but some of my test images are over-saturated. I'll probably add some color adjustment parameters.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @gessyoo, thank you for your recognition of our project!
I understand what you're trying to do, but I think it's better to keep the process() method the same behavior as before. As for processing image directories and saving them, maybe we can write these codes outside of the class, or to write a separate class method (such as process_img_folder() or something).
We do observe that some results can be oversaturated, so adding some color adjustment parameters is a good idea!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added some experimental color correction options with defaults to produce a hopefully more natural, less saturated output. I've also updated the teaser.png to show the color correction effect.

added color adjustment options to improve output colors, reduce over-saturation
Updated teaser.png to show experimental color adjustment options applied to test images
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 this pull request may close these issues.

2 participants