pip install -r requirements.txt
Generate all needed data for each metrics
python generate_all_data.py --metric all
For noise detection, many metrics are available :
You can also specify metric you want to compute :
python generate_all_data.py --metric mscn
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_data_model.py --help
python 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
Parameters explained :
This is an example of how to train a model
python models/xxxxx.py --data 'data/xxxxx.train' --output 'model_file_to_save'
Now we have a model trained, we can use it with an image as input :
python metrics_predictions/predict_noisy_image_svd_lab.py --image path/to/image.png --interval "x,x" --model saved_models/xxxxxx.joblib --mode 'svdn'
The model will return only 0 or 1 :
You can also use other specific metric
python metrics_predictions/predict_noisy_image_svd_mscn.py --image path/to/image.png --interval "x,x" --model saved_models/xxxxxx.joblib --mode 'svdn'
All SVD metrics you 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.
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
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 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 is saved using model name into models_info folder.
All others bash scripts are used to combine and run multiple model combinations...
This git project uses git-flow implementation. You are free to contribute to it.git