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

Custom Loss on Real-ESRGAN fine tune? #694

Open
macunaimaa opened this issue Jul 24, 2024 · 0 comments
Open

Custom Loss on Real-ESRGAN fine tune? #694

macunaimaa opened this issue Jul 24, 2024 · 0 comments

Comments

@macunaimaa
Copy link

macunaimaa commented Jul 24, 2024

I am currently fine-tuning Real-ESRGAN and want to add a custom loss function that incorporates a semantic binary mask. The goal is to calculate the loss only in the regions where my model has classified the image, using the semantic mask as a binary indicator.

However, I am encountering difficulties in passing the paths or names of the images used in the training process to my custom loss function. This is essential for me to load the corresponding binary mask for each image.

  • Expected Behavior
    • The custom loss function should receive the path or name of the images being processed.
    • The custom loss function should load the corresponding binary mask for each image.
    • The loss should be calculated only for the areas indicated by the binary mask.
  • Actual Behavior
    • I am unable to pass the image paths or names to the custom loss function.
    • As a result, I cannot load the corresponding binary masks to calculate the loss correctly.
  • Steps to Reproduce
    • Define a custom loss function that requires the image path to load a binary mask.
    • Attempt to integrate this loss function into the Real-ESRGAN training process.
    • Observe that the image paths are not accessible within the custom loss function.
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

No branches or pull requests

1 participant