-
Notifications
You must be signed in to change notification settings - Fork 131
Imaging benchmarks #984
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
Imaging benchmarks #984
Conversation
Andrewwango
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super cool idea @jscanvic !
Hello pandas, old friend...
|
|
||
|
|
||
| benchmark = Benchmark() | ||
| models = [dinv.models.DRUNet(), dinv.models.Restormer()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super cool!
however, is the benchmark conflating multiple things - arch, how-well-weights-are-pretrained, model size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now it's a somewhat crude benchmark of the models featured out of the box in deepinv
| dinv.physics.GaussianNoise(sigma=25 / 255, rng=rng) | ||
| ).to(device) | ||
|
|
||
| psnr_fn = dinv.metric.PSNR(min_pixel=0.0, max_pixel=1.0).to(device) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to use modality-specific metrics e.g. our ERGAS etc. for spectral imaging benchmarks
| x = x.mul(255.0).round().div(255.0).clamp(0.0, 1.0) | ||
|
|
||
| psnr = psnr_fn(x_hat, x).item() | ||
| psnrs.append(psnr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could use the AverageMeter we use in the trainer (utils/logger.py)
|
Thanks Andrew, I'll make the changes over there deepinv/benchmarks#1 (closing this) |
The library has all of the building blocks necessary to compute benchmarks on different imaging modalities. Yet, there is no standardized way to do that at the moment and we do not showcase it in the docs. The goal of this PR is to remedy that.
Plan
deepinv.benchmarkfor the benchmark-related codeInspirations
TODO