Skip to content
Snippets Groups Projects
Commit c559d8ef authored by Manon Blanco's avatar Manon Blanco Committed by Mélodie Boillet
Browse files

Remove normalize parameter from training configuration

parent 87692012
No related branches found
No related tags found
1 merge request!163Remove normalize parameter from training configuration
......@@ -112,9 +112,8 @@ class OCRDataset(GenericDataset):
)
sample["img"] = cv2.resize(sample["img"], (new_w, new_h))
# Normalization if requested
if "normalize" in self.params["config"] and self.params["config"]["normalize"]:
sample["img"] = (sample["img"] - self.mean) / self.std
# Normalization
sample["img"] = (sample["img"] - self.mean) / self.std
sample["img_reduced_shape"] = np.ceil(
sample["img"].shape / self.reduce_dims_factor
......
......@@ -113,7 +113,6 @@ def get_config():
"add_eot",
"add_sot",
], # add end-of-transcription and start-of-transcription tokens in labels
"normalize": True, # Normalize with mean and variance of training dataset
"preprocessings": [
{
"type": "to_RGB",
......
......@@ -19,7 +19,6 @@ All hyperparameters are specified and editable in the training scripts (meaning
| `dataset_params.config.padding_value` | Image padding value. | `int` | `0` |
| `dataset_params.config.padding_token` | Transcription padding value. | `int` | `None` |
| `dataset_params.config.constraints` | Whether to add end-of-transcription and start-of-transcription tokens in labels. | `list` | `["add_eot", "add_sot"]` |
| `dataset_params.config.normalize` | Normalize with mean and variance of training dataset. | `bool` | `True` |
| `dataset_params.config.preprocessings` | List of pre-processing functions to apply to input images. | `list` | (see [dedicated section](#data-preprocessing)) |
| `dataset_params.config.augmentation` | Configuration for data augmentation. | `dict` | (see [dedicated section](#data-augmentation)) |
......
......@@ -76,7 +76,6 @@ def training_config():
"add_eot",
"add_sot",
], # add end-of-transcription and start-of-transcription tokens in labels
"normalize": True, # Normalize with mean and variance of training dataset
"preprocessings": [
{
"type": "to_RGB",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment