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

Add Weights and Baises Integration #44

Merged
merged 4 commits into from
Jan 13, 2022
Merged

Conversation

ayulockin
Copy link
Contributor

This PR adds support for Weights and Biases Metric, model checkpointing and evaluation logging.

Usage

I have added the functionality to sr.py, sample.py and infer.py files. To enable logging to W&B pass -enable_wandb.

Super Resolution

  • Train: python sr.py -p train -c config/sr_sr3_16_128.json -enable_wandb -log_wandb_ckpt
    Training and validation metrics, generated sr image and model checkpoint are logged as shown.

    Screen.Recording.2022-01-13.at.12.38.56.AM.mov
  • Evaluate: python sr.py -p val -c config/sr_sr3_16_128.json -enable_wandb -log_eval
    Below you can see the use of W&B Tables to log the result of evaluation.

    Screen.Recording.2022-01-13.at.12.57.01.AM.mov

Unconditional Image Generation

  • Train: python sample.py -p train -c config/sample_sr3_128.json -enable_wandb -log_wandb_ckpt
    The resulting W&B run page will look similar to super-resolution one.

  • Evaluation: python sample.py -p train -c config/sample_sr3_128.json -enable_wandb
    Since the task is image generation, the generated images will be shown as a W&B image panel as shown.

    image

Inference

To run inference python infer.py -c config/sr_sr3_16_128.json -enable_wandb -log_infer. This will give a table similar to evaluation but without psnr and ssim scores.

image

Notes

  • If -enable_wandb is not passed, the scripts will run without any issue (normally).
  • The major code related to W&B is in the core/wandb_logger.py file.
  • The screenshots and recordings are based on the results that I got by using -debug argument. However, I have tested the implementation on full training.

I would love to know what you think of this and hope this will add value to your useful repository.

@Janspiry Janspiry merged commit b247799 into Janspiry:master Jan 13, 2022
@Janspiry
Copy link
Owner

This PR adds support for Weights and Biases Metric, model checkpointing and evaluation logging.

Usage

I have added the functionality to sr.py, sample.py and infer.py files. To enable logging to W&B pass -enable_wandb.

Super Resolution

  • Train: python sr.py -p train -c config/sr_sr3_16_128.json -enable_wandb -log_wandb_ckpt
    Training and validation metrics, generated sr image and model checkpoint are logged as shown.

    Screen.Recording.2022-01-13.at.12.38.56.AM.mov
    
  • Evaluate: python sr.py -p val -c config/sr_sr3_16_128.json -enable_wandb -log_eval
    Below you can see the use of W&B Tables to log the result of evaluation.

    Screen.Recording.2022-01-13.at.12.57.01.AM.mov
    

Unconditional Image Generation

  • Train: python sample.py -p train -c config/sample_sr3_128.json -enable_wandb -log_wandb_ckpt
    The resulting W&B run page will look similar to super-resolution one.
  • Evaluation: python sample.py -p train -c config/sample_sr3_128.json -enable_wandb
    Since the task is image generation, the generated images will be shown as a W&B image panel as shown.
    image

Inference

To run inference python infer.py -c config/sr_sr3_16_128.json -enable_wandb -log_infer. This will give a table similar to evaluation but without psnr and ssim scores.

image

Notes

  • If -enable_wandb is not passed, the scripts will run without any issue (normally).
  • The major code related to W&B is in the core/wandb_logger.py file.
  • The screenshots and recordings are based on the results that I got by using -debug argument. However, I have tested the implementation on full training.

I would love to know what you think of this and hope this will add value to your useful repository.

Thanks so much for this great work, which is so awesome! and I will try this amazing tool and check it carefully soon.
Could you edit the README.md to add Weights and Biases part or add the link to some files like descriptions as mentioned above.

@ayulockin
Copy link
Contributor Author

I will updated the README. Thank you for your feedback. 🙏

@ayulockin ayulockin mentioned this pull request Jan 14, 2022
piperwolters pushed a commit to piperwolters/Image-Super-Resolution-via-Iterative-Refinement that referenced this pull request May 11, 2023
Add Weights and Baises Integration
@kada0720
Copy link

kada0720 commented Dec 7, 2023

@Janspiry
I have a question, why are all the images generated using 'Unconditional Image Generation' pure noise?

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.

None yet

3 participants