We have moved to https://openmodeldb.info/. This new site has a tag and search system, which will make finding the right models for you much easier! If you have any questions, ask here: https://discord.gg/cpAUpDK |
Difference between revisions of "Beginner Training Guide"
Line 14: | Line 14: | ||
It is important to create the best dataset you can for your upscale task. Many pre-existing datasets exist, such as DF2K or Manga109, but a dataset can be anything. Your HRs could be high quality frames of a TV show, for example, with the LRs being the same images scaled down by 4 using a bicubic filter. This would then create a model that is good at upscaling small images that are visually similar to the LRs you created. The dataset is arguably the most important part of training a model. Without a good dataset, your model will not work well. | It is important to create the best dataset you can for your upscale task. Many pre-existing datasets exist, such as DF2K or Manga109, but a dataset can be anything. Your HRs could be high quality frames of a TV show, for example, with the LRs being the same images scaled down by 4 using a bicubic filter. This would then create a model that is good at upscaling small images that are visually similar to the LRs you created. The dataset is arguably the most important part of training a model. Without a good dataset, your model will not work well. | ||
− | ==== Examples of | + | ==== Examples of bad datasets ==== |
* Random images with no similarity to each other | * Random images with no similarity to each other | ||
− | * | + | * Images with lots of JPEG artifacts |
+ | * Low resolution images | ||
* A dataset with only 5 images | * A dataset with only 5 images | ||
Revision as of 06:18, 10 July 2020
Contents
Getting Started
This guide assumes you already know how to download/clone repositories from GitHub and that you are familiar with python and pip.
Choosing a Fork
The original BasicSR fork by Xinntao still works fine for training. However, it lacks a lot of features and bug fixes that forks made by various community members have. Also, if you get the latest Xinntao fork you will be training a new-arch model instead of an old-arch model. This means you will not be able to train in scales other than 4.
If you are reading this guide as a refresher and currently use Victorca25's fork, please consider switching to BlueAmulets fork. It fixes many of the bugs present in Vic's fork (which is no longer being maintained) and has all the same features (and more). If this is your first time reading this guide, I still highly recommend BlueAmulets fork. However, DinJerr's fork is also a good alternative.
You can see a current list of currently maintained forks here.
Creating a Dataset
All BasicSR/ESRGAN models are trained using low-resolution images, often called LR for short or LQ (Low Quality), and high-resolution images, often called HR for short or GT (Ground Truth). For a 4x scale model, this means that your LR images will be 4x smaller in resolution than your HR images.
It is important to create the best dataset you can for your upscale task. Many pre-existing datasets exist, such as DF2K or Manga109, but a dataset can be anything. Your HRs could be high quality frames of a TV show, for example, with the LRs being the same images scaled down by 4 using a bicubic filter. This would then create a model that is good at upscaling small images that are visually similar to the LRs you created. The dataset is arguably the most important part of training a model. Without a good dataset, your model will not work well.
Examples of bad datasets
- Random images with no similarity to each other
- Images with lots of JPEG artifacts
- Low resolution images
- A dataset with only 5 images
Examples of a good dataset
- 800 high-quality pictures of mountains
- 3,000 exported frames of a 1080p cartoon
- 500 images of cropped-out faces
A few things to note:
- Your HR images and LR images must have exactly matching names
- Your HR images must be exactly 4x (or whatever scale you are training) the resolution of your LRs. This means you must crop your HR images so that each dimension (width and height) are multiples of 4.
- The more images you have, the better the model will become (generally)
Configuring BasicSR
This configuration setup is based on BlueAmulet's fork and will be explaining how to modify the YAML training configs.