Skip to content

Add script for single image testing and inference #11

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lyraestar
Copy link

This script allows testing the deblurring models (Defocus and Motion) on individual images.

Key features:

  • Accepts input image path, model type, and configuration name.
  • Handles both regular and dual-pixel (e.g., DPDD) inputs.
  • Loads model configurations and weights from options/Test_configs.yml.
  • Performs image preprocessing, model inference, and saves the deblurred output.

This script allows testing the deblurring models (Defocus and Motion) on individual images.

Key features:
- Accepts input image path, model type, and configuration name.
- Handles both regular and dual-pixel (e.g., DPDD) inputs.
- Loads model configurations and weights from options/Test_configs.yml.
- Performs image preprocessing, model inference, and saves the deblurred output.
Changed the call to `crop_image` in `test_single_image.py` to use `size=True` instead of the incorrect `return_hw=True`.

This aligns with the function definition in `util/util.py` and resolves the TypeError, ensuring that original image dimensions are correctly retrieved for output cropping.
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.

1 participant