Synthesis Images noise detection metrics developed including all approaches using SVD or others compression methods
Jerome Buisine f3610efa99 update of way of using train dataset | hace 6 años | |
---|---|---|
fichiersSVD_light | hace 6 años | |
metrics_predictions | hace 6 años | |
models | hace 6 años | |
.gitignore | hace 6 años | |
LICENCE | hace 6 años | |
README.md | hace 6 años | |
generateAndTrainEnsemble_random.sh | hace 6 años | |
generateAndTrainSVM.sh | hace 6 años | |
generateAndTrainSVM_random.sh | hace 6 años | |
generateAndTrain_maxwell.sh | hace 6 años | |
generate_all_data.py | hace 6 años | |
generate_data_model.py | hace 6 años | |
generate_data_model_random.py | hace 6 años | |
generate_data_model_random_maxwell.py | hace 6 años | |
predict_seuil_expe.py | hace 6 años | |
predict_seuil_expe_maxwell.py | hace 6 años | |
prediction_scene.py | hace 6 años | |
requirements.txt | hace 6 años | |
runAll_maxwell.sh | hace 6 años | |
save_model_result_in_md.py | hace 6 años | |
save_model_result_in_md_maxwell.py | hace 6 años | |
testModelByScene.sh | hace 6 años | |
testModelByScene_maxwell.sh | hace 6 años |
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