Synthesis Images noise detection metrics developed including all approaches using SVD or others compression methods
|
5 年之前 | |
---|---|---|
analysis | 5 年之前 | |
data_processing | 5 年之前 | |
display | 5 年之前 | |
generate | 5 年之前 | |
modules @ 139aa3c231 | 5 年之前 | |
others | 5 年之前 | |
prediction | 5 年之前 | |
run | 5 年之前 | |
simulation | 5 年之前 | |
.gitignore | 5 年之前 | |
.gitmodules | 5 年之前 | |
LICENSE | 5 年之前 | |
README.md | 5 年之前 | |
__init__.py | 5 年之前 | |
custom_config.py | 5 年之前 | |
data_attributes.py | 5 年之前 | |
dataset | 5 年之前 | |
models.py | 5 年之前 | |
requirements.txt | 5 年之前 | |
train_keras_svd.py | 5 年之前 | |
train_model.py | 5 年之前 |
pip install -r requirements.txt
Generate all needed data for each metrics (which requires the the whole dataset. In order to get it, you need to contact us).
python generate/generate_all_data.py --metric all
For noise detection, many metrics are available:
You can also specify metric you want to compute and image step to avoid some images:
python generate/generate_all_data.py --metric mscn --step 50
Two scripts can be used for generating data in order to fit model:
Remark: Note here that all python script have --help command.
python generate/generate_data_model.py --help
python generate/generate_data_model.py --output xxxx --interval 0,20 --kind svdne --scenes "A, B, D" --zones "0, 1, 2" --percent 0.7 --sep: --rowindex 1 --custom custom_min_max_filename
Parameters explained:
This is an example of how to train a model
python train_model.py --data 'data/xxxxx.train' --output 'model_file_to_save' --choice 'model_choice'
Expected values for the choice parameter are ['svm_model', 'ensemble_model', 'ensemble_model_v2'].
Now we have a model trained, we can use it with an image as input:
python predict_noisy_image_svd.py --image path/to/image.png --interval "x,x" --model saved_models/xxxxxx.joblib --metric 'lab' --mode 'svdn' --custom 'min_max_filename'
The model will return only 0 or 1:
All SVD metrics developed need:
Now we have a model trained, we can use it with an image as input:
python prediction_scene.py --data path/to/xxxx.csv --model saved_model/xxxx.joblib --output xxxxx --scene xxxx
Remark: scene parameter expected need to be the correct name of the Scene.
All scripts with names display_*.py are used to display data information or results.
Just use --help option to get more information.
All scripts named predict_seuil_expe*.py are used to simulate model prediction during rendering process. Do not forget the custom parameter filename if necessary.
Once you have simulation done. Checkout your threshold_map/%MODEL_NAME%/simulation_curves_zones_*/ folder and use it with help of display_simulation_curves.py script.
In order to see if a model well generalized, a bash script is available:
bash testModelByScene.sh '100' '110' 'saved_models/xxxx.joblib' 'svdne' 'lab'
Parameters list:
Main objective of this project is to predict as well as a human the noise perception on a photo realistic image. Human threshold is available from training data. So a script was developed to give the predicted treshold from model and compare predicted treshold from the expected one.
python predict_seuil_expe.py --interval "x,x" --model 'saved_models/xxxx.joblib' --mode ["svd", "svdn", "svdne"] --metric ['lab', 'mscn', ...] --limit_detection xx --custom 'custom_min_max_filename'
Parameters list:
Another script was developed to display into Mardown format the performance of a model.
The content will be divised into two parts:
The previous script need to already have ran to obtain and display treshold maps on this markdown file.
python others/save_model_result_in_md.py --interval "xx,xx" --model saved_models/xxxx.joblib --mode ["svd", "svdn", "svdne"] --metric ['lab', 'mscn']
Parameters list:
Markdown file with all information is saved using model name into models_info folder.
All others bash scripts are used to combine and run multiple model combinations...