Skip to content

Commit

Permalink
Added HF Space and Model
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSecureHuman committed Aug 11, 2023
1 parent 6b641c1 commit 78545cb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
4 changes: 4 additions & 0 deletions examples/vision/edsr.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,4 +342,8 @@ def plot_results(lowres, preds):
You could also improve on the given baseline EDSR model by implementing EDSR+,
or MDSR( Multi-Scale super-resolution) and MDSR+,
which were proposed in the same paper.
| Trained Model | Demo |
| :--: | :--: |
| [![Generic badge](https://img.shields.io/badge/🤗%20Model-EDSR-red.svg)](https://huggingface.co/keras-io/EDSR) | [![Generic badge](https://img.shields.io/badge/🤗%20Spaces-EDSR-red.svg)](https://huggingface.co/spaces/keras-io/EDSR) |
"""
30 changes: 16 additions & 14 deletions examples/vision/ipynb/edsr.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"you can do super-resolution using an ESPCN Model. According to the survey paper, EDSR is one of the top-five\n",
"best-performing super-resolution methods based on PSNR scores. However, it has more\n",
"parameters and requires more computational power than other approaches.\n",
"It has a PSNR value (\u224834db) that is slightly higher than ESPCN (\u224832db).\n",
"It has a PSNR value (≈34db) that is slightly higher than ESPCN (≈32db).\n",
"As per the survey paper, EDSR performs better than ESPCN.\n",
"\n",
"Paper:\n",
Expand All @@ -60,7 +60,7 @@
},
{
"cell_type": "code",
"execution_count": 0,
"execution_count": null,
"metadata": {
"colab_type": "code"
},
Expand Down Expand Up @@ -93,7 +93,7 @@
},
{
"cell_type": "code",
"execution_count": 0,
"execution_count": null,
"metadata": {
"colab_type": "code"
},
Expand Down Expand Up @@ -123,7 +123,7 @@
},
{
"cell_type": "code",
"execution_count": 0,
"execution_count": null,
"metadata": {
"colab_type": "code"
},
Expand Down Expand Up @@ -184,8 +184,7 @@
" highres_width : highres_width + hr_crop_size,\n",
" ] # 96x96\n",
"\n",
" return lowres_img_cropped, highres_img_cropped\n",
""
" return lowres_img_cropped, highres_img_cropped\n"
]
},
{
Expand All @@ -203,7 +202,7 @@
},
{
"cell_type": "code",
"execution_count": 0,
"execution_count": null,
"metadata": {
"colab_type": "code"
},
Expand Down Expand Up @@ -249,7 +248,7 @@
},
{
"cell_type": "code",
"execution_count": 0,
"execution_count": null,
"metadata": {
"colab_type": "code"
},
Expand Down Expand Up @@ -278,8 +277,7 @@
" \"\"\"Compute the peak signal-to-noise ratio, measures quality of image.\"\"\"\n",
" # Max value of pixel is 255\n",
" psnr_value = tf.image.psnr(high_resolution, super_resolution, max_val=255)[0]\n",
" return psnr_value\n",
""
" return psnr_value\n"
]
},
{
Expand Down Expand Up @@ -307,7 +305,7 @@
},
{
"cell_type": "code",
"execution_count": 0,
"execution_count": null,
"metadata": {
"colab_type": "code"
},
Expand Down Expand Up @@ -404,7 +402,7 @@
},
{
"cell_type": "code",
"execution_count": 0,
"execution_count": null,
"metadata": {
"colab_type": "code"
},
Expand Down Expand Up @@ -433,7 +431,7 @@
},
{
"cell_type": "code",
"execution_count": 0,
"execution_count": null,
"metadata": {
"colab_type": "code"
},
Expand Down Expand Up @@ -471,7 +469,11 @@
"\n",
"You could also improve on the given baseline EDSR model by implementing EDSR+,\n",
"or MDSR( Multi-Scale super-resolution) and MDSR+,\n",
"which were proposed in the same paper."
"which were proposed in the same paper.\n",
"\n",
"| Trained Model | Demo |\n",
"| :--: | :--: |\n",
"| [![Generic badge](https://img.shields.io/badge/🤗%20Model-EDSR-red.svg)](https://huggingface.co/keras-io/EDSR) | [![Generic badge](https://img.shields.io/badge/🤗%20Spaces-EDSR-red.svg)](https://huggingface.co/spaces/keras-io/EDSR) |"
]
}
],
Expand Down
4 changes: 4 additions & 0 deletions examples/vision/md/edsr.md
Original file line number Diff line number Diff line change
Expand Up @@ -635,3 +635,7 @@ be able to handle a greater range of real-world images.
You could also improve on the given baseline EDSR model by implementing EDSR+,
or MDSR( Multi-Scale super-resolution) and MDSR+,
which were proposed in the same paper.

| Trained Model | Demo |
| :--: | :--: |
| [![Generic badge](https://img.shields.io/badge/🤗%20Model-EDSR-red.svg)](https://huggingface.co/keras-io/EDSR) | [![Generic badge](https://img.shields.io/badge/🤗%20Spaces-EDSR-red.svg)](https://huggingface.co/spaces/keras-io/EDSR) |

0 comments on commit 78545cb

Please sign in to comment.