Eugene Siow
commited on
Commit
•
d44aba7
1
Parent(s):
83d3d05
Add training notebook link.
Browse files
README.md
CHANGED
@@ -64,6 +64,7 @@ The following code gets the data and preprocesses/augments the data.
|
|
64 |
|
65 |
```python
|
66 |
from datasets import load_dataset
|
|
|
67 |
|
68 |
augmented_dataset = load_dataset('eugenesiow/Div2k', 'bicubic_x4', split='train')\
|
69 |
.map(augment_five_crop, batched=True, desc="Augmenting Dataset") # download and augment the data with the five_crop method
|
@@ -89,11 +90,13 @@ trainer = Trainer(
|
|
89 |
model=model, # the instantiated model to be trained
|
90 |
args=training_args, # training arguments, defined above
|
91 |
train_dataset=train_dataset, # training dataset
|
92 |
-
eval_dataset=
|
93 |
)
|
94 |
|
95 |
trainer.train()
|
96 |
```
|
|
|
|
|
97 |
## Evaluation results
|
98 |
The evaluation metrics include [PSNR](https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio#Quality_estimation_with_PSNR) and [SSIM](https://en.wikipedia.org/wiki/Structural_similarity#Algorithm).
|
99 |
|
|
|
64 |
|
65 |
```python
|
66 |
from datasets import load_dataset
|
67 |
+
from super_image.data import EvalDataset, TrainDataset, augment_five_crop
|
68 |
|
69 |
augmented_dataset = load_dataset('eugenesiow/Div2k', 'bicubic_x4', split='train')\
|
70 |
.map(augment_five_crop, batched=True, desc="Augmenting Dataset") # download and augment the data with the five_crop method
|
|
|
90 |
model=model, # the instantiated model to be trained
|
91 |
args=training_args, # training arguments, defined above
|
92 |
train_dataset=train_dataset, # training dataset
|
93 |
+
eval_dataset=eval_dataset # evaluation dataset
|
94 |
)
|
95 |
|
96 |
trainer.train()
|
97 |
```
|
98 |
+
|
99 |
+
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/eugenesiow/super-image-notebooks/blob/master/notebooks/Train_super_image_Models.ipynb "Open in Colab")
|
100 |
## Evaluation results
|
101 |
The evaluation metrics include [PSNR](https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio#Quality_estimation_with_PSNR) and [SSIM](https://en.wikipedia.org/wiki/Structural_similarity#Algorithm).
|
102 |
|