https://github.com/clibdev/espcn-pytorch

ESPCN in Pytorch and ONNX

https://github.com/clibdev/espcn-pytorch

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (5.0%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

ESPCN in Pytorch and ONNX

Basic Info
  • Host: GitHub
  • Owner: clibdev
  • License: apache-2.0
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 1.35 MB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Created almost 3 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License

README.md

Fork of Lornatang/ESPCN-PyTorch

Differences between original repository and fork:

  • Compatibility with PyTorch >=2.4. (🔥)
  • Original pretrained models and converted ONNX models from GitHub releases page. (🔥)
  • Model conversion to ONNX format using the export.py file. (🔥)
  • Installation with updated requirements.txt file.
  • The following deprecations has been fixed:
    • FutureWarning: You are using 'torch.load' with 'weights_only=False'.

Installation

shell pip install -r requirements.txt

Pretrained models

  • Download links:

| Name | Model Size (MB) | Link | SHA-256 | |----------|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------| | ESPCNx2 | 0.1
0.1 | PyTorch, ONNX | 67321a870da341c15a92f5dcea31bcb21b7fa30165b0ac445662d4364048595b
6c806349be7f963f3d0895050a771a5de15e9950361e2a2f92624e4b1f675044 | | ESPCN
x3 | 0.1
0.1 | PyTorch, ONNX | 242ab640f79fa1e005f5d495debf6c1e385209c8b81f14f5692ba7ed51ec2f5d
77aea5de0ba9628566ef9519de06a18ff5c25b32b0743d3e49a808c539c5445f | | ESPCN_x4 | 0.1
0.1 | PyTorch, ONNX | 756564c1b4103cad1170479bbce665b2b58163444d5170dcc1db37ba143694f8
2b421d032afd5737c8cc0f1145214d78c35dbc46e3c7cb45913da80304b8aa8e |

  • Evaluation results:

| Name | Scale | Set5 (PSNR) | Set14 (PSNR) | |----------|-------|-------------|--------------| | ESPCNx2 | 2 | 36.64 | 32.35 | | ESPCNx3 | 3 | 32.55 | 29.20 | | ESPCN_x4 | 4 | 30.26 | 27.41 |

Inference

shell python inference.py --model_arch_name espcn_x2 --upscale_factor 2 --model_weights_path espcn-x2.pth.tar --inputs_path figure/comic.png --output_path figure/sr_comic_x2.png python inference.py --model_arch_name espcn_x3 --upscale_factor 3 --model_weights_path espcn-x3.pth.tar --inputs_path figure/comic.png --output_path figure/sr_comic_x3.png python inference.py --model_arch_name espcn_x4 --upscale_factor 4 --model_weights_path espcn-x4.pth.tar --inputs_path figure/comic.png --output_path figure/sr_comic_x4.png

Export to ONNX format

shell pip install onnx shell python export.py --model_arch_name espcn_x2 --model_weights_path espcn-x2.pth.tar python export.py --model_arch_name espcn_x3 --model_weights_path espcn-x3.pth.tar python export.py --model_arch_name espcn_x4 --model_weights_path espcn-x4.pth.tar

Owner

  • Login: clibdev
  • Kind: user

GitHub Events

Total
Last Year