added basic models schema

This commit is contained in:
Jan 2021-12-05 11:16:26 +01:00
commit 5c5d9af588

265
models/config_schema.json Normal file
View file

@ -0,0 +1,265 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/dfl_config",
"definitions": {
"dfl_config": {
"type": "object",
"additionalProperties": false,
"properties": {
"use_fp16": {
"type": "boolean"
},
"archi": {
"type": "string",
"pattern": "^(df|liae)-(\\b(?!\\w*(\\w)\\w*\\1)[udtc]+\\b)+|^(df|liae)$"
},
"resolution": {
"type": "integer",
"minimum": 64,
"maximum": 640,
"multipleOf": 16
},
"face_type": {
"type": "string",
"enum": [
"h",
"mf",
"f",
"wf",
"head",
"custom"
]
},
"models_opt_on_gpu": {
"type": "boolean"
},
"ae_dims": {
"type": "integer",
"minimum": 32,
"maximum": 1024
},
"e_dims": {
"type": "integer",
"minimum": 16,
"maximum": 256,
"multipleOf": 2
},
"d_dims": {
"type": "integer",
"minimum": 16,
"maximum": 256,
"multipleOf": 2
},
"d_mask_dims": {
"type": "integer",
"minimum": 16,
"maximum": 256,
"multipleOf": 2
},
"masked_training": {
"type": "boolean"
},
"eyes_prio": {
"type": "boolean"
},
"mouth_prio": {
"type": "boolean"
},
"uniform_yaw": {
"type": "boolean"
},
"blur_out_mask": {
"type": "boolean"
},
"adabelief": {
"type": "boolean"
},
"lr_dropout": {
"type": "string",
"enum": [
"y",
"n",
"cpu"
]
},
"loss_function": {
"type": "string",
"enum": [
"SSIM",
"MS-SSIM",
"MS-SSIM+L1"
]
},
"random_warp": {
"type": "boolean"
},
"random_hsv_power": {
"type": "number",
"minimum": 0.0,
"maximum": 0.3
},
"random_downsample": {
"type": "boolean"
},
"random_noise": {
"type": "boolean"
},
"random_blur": {
"type": "boolean"
},
"random_jpeg": {
"type": "boolean"
},
"background_power": {
"type": "number",
"minimum": 0.0,
"maximum": 1.0
},
"true_face_power": {
"type": "number",
"minimum": 0.0,
"maximum": 1.0
},
"face_style_power": {
"type": "number",
"minimum": 0.0,
"maximum": 100.0
},
"bg_style_power": {
"type": "number",
"minimum": 0.0,
"maximum": 100.0
},
"ct_mode": {
"type": "string",
"enum": [
"none",
"rct",
"lct",
"mkl",
"idt",
"sot"
]
},
"random_color": {
"type": "boolean"
},
"clipgrad": {
"type": "boolean"
},
"pretrain": {
"type": "boolean"
},
"session_name": {
"type": "string"
},
"autobackup_hour": {
"type": "integer",
"minimum": 0,
"maximum": 24
},
"maximum_n_backups": {
"type": "integer"
},
"write_preview_history": {
"type": "boolean"
},
"target_iter": {
"type": "integer",
"minimum": 0
},
"retraining_samples": {
"type": "boolean"
},
"random_src_flip": {
"type": "boolean"
},
"random_dst_flip": {
"type": "boolean"
},
"batch_size": {
"type": "integer"
},
"gan_power": {
"type": "number",
"minimum": 0.0,
"maximum": 5.0
},
"gan_version": {
"type": "integer",
"minimum": 2,
"maximum": 3
},
"gan_patch_size": {
"type": "integer",
"minimum": 3,
"maximum": 640
},
"gan_dims": {
"type": "integer",
"minimum": 4,
"maximum": 512
},
"gan_smoothing": {
"type": "number",
"minimum": 0.0,
"maximum": 0.5
},
"gan_noise": {
"type": "number",
"minimum": 0.0,
"maximum": 0.5
}
},
"required": [
"adabelief",
"ae_dims",
"archi",
"autobackup_hour",
"background_power",
"batch_size",
"bg_style_power",
"blur_out_mask",
"clipgrad",
"ct_mode",
"d_dims",
"d_mask_dims",
"e_dims",
"eyes_prio",
"face_style_power",
"face_type",
"gan_dims",
"gan_noise",
"gan_patch_size",
"gan_power",
"gan_smoothing",
"gan_version",
"loss_function",
"lr_dropout",
"masked_training",
"maximum_n_backups",
"models_opt_on_gpu",
"mouth_prio",
"pretrain",
"random_blur",
"random_color",
"random_downsample",
"random_dst_flip",
"random_hsv_power",
"random_jpeg",
"random_noise",
"random_src_flip",
"random_warp",
"resolution",
"retraining_samples",
"session_name",
"target_iter",
"true_face_power",
"uniform_yaw",
"use_fp16",
"write_preview_history"
],
"title": "dfl_config"
}
}
}