Skip to content

huster-wgm/Pytorch-metrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pytorch-metrics

This is a repo. for evaluation metrics using Pytorch. The metrics.py is designed for evaluation tasks using two pytorch tensors as input. All implemented metric is compatible with any batch_size and devices(CPU or GPU).

y_pred << 4D tensor in [batch_size, channels, img_rows, img_cols]
y_true << 4D tensor in [batch_size, channels, img_rows, img_cols]

metric = MSE()
acc = metric(y_pred, y_true).item()
print("{} ==> {}".format(repr(metric), acc))

Requirement

  • python3
  • pytorch >= 1.
  • torchvision >= 0.2.0

Implementation

  • Image similarity

    • AE (Average Angular Error)
    • MSE (Mean Square Error)
    • PSNR (Peak Signal-to-Noise Ratio)
    • SSIM (Structural Similarity)
    • LPIPS (Learned Perceptual Image Patch Similarity)
  • Accuray

    • OA(Overall Accuracy)
    • Precision
    • Recall
    • F1-score
    • Kapp coefficiency
    • Jaccard Index

Ongoing

  • FID(Fréchet Inception Distance)

Acknowledgment

Our implementations are largely inspired by many open-sources codes, repos, as well as papers. Many thanks to the authors.

LICENSE

This implementation is licensed under the MIT License.

About

Implementation of Evaluation Metrics for Pytorch

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages