Regularization or Training images are a way to improve the accuracy of neural networks by introducing noise to a set of data points (such as pixel or vector images).
Using regularization images during training can help a neural network detect more general patterns and improve its overall accuracy.
Imagine that you are trying to create a detailed, lifelike drawing of a specific person's face. You have a lot of reference photos of the person, and you are using them to guide your drawing. However, you don't want your drawing to be an exact copy of any one of the reference photos - you want it to be a composite that captures the person's overall appearance.
To do this, you might decide to use a regularization technique in your drawing process. This could be something like "averaging" the different reference photos together, or only allowing yourself to use a limited number of fine details from each photo. By adding these constraints to your drawing process, you are regularizing your image generation - you are preventing it from becoming too complex and overfitting to any one reference photo.
The goal of regularization in image generation (and in machine learning more generally) is to balance the need for detail and accuracy with the need for generalization and flexibility. Just like in the example above, regularization helps to prevent a model from becoming too complex and overfitting to the training data, which can lead to poor performance when the model is applied to new, unseen data.
Selecting a Good Training Class
When training a generator (finetuned model of Stable Diffusion), you may want to use training classes to prevent overfitting and improve the generalization of the model. To do this, you will need to select a regularization class that is appropriate for your specific task and dataset.
To select a class, explore first the different class categories, such as:
- Art style (i.e. concept art, drawing, sketch, character design, illustration...)
- Characters, NPCs, mobs
- Weapons, clothing, gear
- Vehicles
- Props
- Resources
- GUI (Graphical User Interface)
- Worlds, Maps, Buildings, Environment
- Avatars
Within the category, select the class that corresponds to the output you want to generate (i.e. illustrations, game assets, icons, maps, ...)
In case none of the pre-defined classes match your job, another option is to define your own regularization class by carefully defining its name (token).
Eventually, one approach is to try out different regularization, or as we call them, training classes and compare their performance. This can help you determine which training class works best for your particular goal.