change path

This commit is contained in:
Daniel Saavedra
2020-02-25 22:18:56 -03:00
parent 67eb6a3fa9
commit 338e0e9ae9
9 changed files with 128 additions and 51 deletions

View File

@@ -0,0 +1,39 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Example of load model for detections"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

39
Example_prediction.ipynb Normal file
View File

@@ -0,0 +1,39 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Example of load model for detections"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

View File

@@ -25,7 +25,7 @@ The models used for detection are SSD [SSD: Single Shot MultiBox Detector](https
* [SSD_Keras](https://github.com/pierluigiferrari/ssd_keras#how-to-fine-tune-one-of-the-trained-models-on-your-own-dataset)
* [YOLOv3_Keras](https://github.com/experiencor/keras-yolo3)
Grab the pretrained weights of SSD and YOLO3 from https://drive.google.com/drive/folders/1LSc9FkAwJrAAT8pAUWz8aax_biFAMMXS?usp=sharing
Grab the pretrained weights of SSD and YOLO3 from [Drive_Weights](https://drive.google.com/drive/folders/1LSc9FkAwJrAAT8pAUWz8aax_biFAMMXS?usp=sharing)
## Type of Data
The images used for the design of this model were extracted by air analysis, specifically: FLIR aerial radiometric thermal infrared pictures, taken by UAV (R-JPEG format). Which were converted into .jpg images for the training of these detection models.
@@ -172,10 +172,10 @@ The evaluation is integrated into the training process, if you want to do the in
Compute the mAP performance of the model defined in `saved_weights_name` on the validation dataset defined in `valid_image_folder` and `valid_annot_folder`.
# Result
All of weights of this trained model grab from https://drive.google.com/drive/folders/1LSc9FkAwJrAAT8pAUWz8aax_biFAMMXS?usp=sharing
All of weights of this trained model grab from [Drive_Weights](https://drive.google.com/drive/folders/1LSc9FkAwJrAAT8pAUWz8aax_biFAMMXS?usp=sharing)
## Panel Detector
### SDD7
On folder Result_ssd7_panel show code (jupyter notebook), weight and result of this model (mAP 89.8%).
On folder [Result ssd7 panel](Result_ssd7_panel/) show code (jupyter notebook), weight and result of this model (mAP 89.8%).
![](Result_ssd7_panel/result_ssd7_panel/DJI_0020.jpg)
@@ -183,14 +183,14 @@ On folder Result_ssd7_panel show code (jupyter notebook), weight and result of t
## Soiling Fault Detector
### SSD300
On folder Result_ssd300_fault_1 show code (jupyter notebook), weight and result of this model (mAP 79.5%).
On folder [Result ssd300 fault 1](Result_ssd300_fault_1/) show code (jupyter notebook), weight and result of this model (mAP 79.5%).
![](Result_ssd300_fault_1/result_ssd300_fault_1/Mision_11_DJI_0011.jpg)
### YOLO3
On folder Result_yolo3_fault_1 show history train (yolo3_full_yolo.output), weight and result of this model (mAP 73.02%).
On folder [Result yolo3 fault 1](Result_yolo3_fault_1/) show [history train](Result_yolo3_fault_1/yolo3_full_yolo.output), weight and result of this model (mAP 73.02%).
![](Result_yolo3_fault_1/result_yolo3_fault_1/Mision_11_DJI_0011.jpg)
@@ -198,7 +198,7 @@ On folder Result_yolo3_fault_1 show history train (yolo3_full_yolo.output), weig
## Diode Fault Detector
### YOLO3
On folder Result_yolo3_fault_4 show history train (yolo3_full_yolo.output), weight and result of this model (mAP 73.02%).
On folder [Result yolo3 fault 4](Result_yolo3_fault_4/) show [history train](Result_yolo3_fault_4/yolo3_full_yolo.output), weight and result of this model (mAP 73.02%).
![](Result_yolo3_fault_4/result_yolo3_fault_4/Mision%2041_DJI_0044.jpg)
@@ -221,4 +221,4 @@ Before sending your pull requests, make sure you followed this list.
# Example to use trained model
In ['Example_Prediction'](ex_prediction.ipynb)
In ['Example_Prediction'](Example_prediction.ipynb)

View File

@@ -6,9 +6,9 @@
},
"train": {
"train_image_folder": "../Train&Test_D/Train/images",
"train_annot_folder": "../Train&Test_D/Train/anns",
"train_image_set_filename": "../Train&Test_D/Train/train.txt",
"train_image_folder": "Train&Test_D/Train/images",
"train_annot_folder": "Train&Test_D/Train/anns",
"train_image_set_filename": "Train&Test_D/Train/train.txt",
"train_times": 1,
"batch_size": 12,
@@ -16,19 +16,19 @@
"warmup_epochs": 3,
"nb_epochs": 100,
"saved_weights_name": "../Result_ssd300_fault_4/ssd300_fault_4.h5",
"saved_weights_name": "Result_ssd300_fault_4/ssd300_fault_4.h5",
"debug": false
},
"valid": {
"valid_image_folder": "../Train&Test_D/Test/images/",
"valid_annot_folder": "../Train&Test_D/Test/anns/",
"valid_image_set_filename": "../Train&Test_D/Test/test.txt"
"valid_image_folder": "Train&Test_D/Test/images/",
"valid_annot_folder": "Train&Test_D/Test/anns/",
"valid_image_set_filename": "Train&Test_D/Test/test.txt"
},
"test": {
"test_image_folder": "../Train&Test_D/Test/images",
"test_annot_folder": "../Train&Test_D/Test/anns",
"test_image_set_filename": "../Train&Test_D/Test/test.txt"
"test_image_folder": "Train&Test_D/Test/images",
"test_annot_folder": "Train&Test_D/Test/anns",
"test_image_set_filename": "Train&Test_D/Test/test.txt"
}
}

View File

@@ -4,13 +4,13 @@
"max_input_size": 400,
"anchors": [5,7, 10,14, 15, 15, 26,32, 45,119, 54,18, 94,59, 109,183, 200,21],
"labels": ["1"],
"backend": "full_yolo_backend.h5"
"backend": "keras-yolo3-master/full_yolo_backend.h5"
},
"train": {
"train_image_folder": "../Train&Test_S/Train/images/",
"train_annot_folder": "../Train&Test_S/Train/anns/",
"cache_name": "../Result_yolo3_fault_1/experimento_fault_1_gpu.pkl",
"train_image_folder": "Train&Test_S/Train/images/",
"train_annot_folder": "Train&Test_S/Train/anns/",
"cache_name": "Result_yolo3_fault_1/experimento_fault_1_gpu.pkl",
"train_times": 1,
@@ -33,16 +33,16 @@
},
"valid": {
"valid_image_folder": "../Train&Test_S/Test/images/",
"valid_annot_folder": "../Train&Test_S/Test/anns/",
"cache_name": "../Result_yolo3_fault_1/val_fault_1.pkl",
"valid_image_folder": "Train&Test_S/Test/images/",
"valid_annot_folder": "Train&Test_S/Test/anns/",
"cache_name": "Result_yolo3_fault_1/val_fault_1.pkl",
"valid_times": 1
},
"test": {
"test_image_folder": "../Train&Test_S/Test/images/",
"test_annot_folder": "../Train&Test_S/Test/anns/",
"cache_name": "../Result_yolo3_fault_1/test_fault_1.pkl",
"test_image_folder": "Train&Test_S/Test/images/",
"test_annot_folder": "Train&Test_S/Test/anns/",
"cache_name": "Result_yolo3_fault_1/test_fault_1.pkl",
"test_times": 1
}

View File

@@ -4,13 +4,13 @@
"max_input_size": 400,
"anchors": [5,7, 10,14, 15, 15, 26,32, 45,119, 54,18, 94,59, 109,183, 200,21],
"labels": ["1"],
"backend": "full_yolo_backend.h5"
"backend": "keras-yolo3-master/full_yolo_backend.h5"
},
"train": {
"train_image_folder": "../Train&Test_S/Train/images/",
"train_annot_folder": "../Train&Test_S/Train/anns/",
"cache_name": "../Result_yolo3_fault_1/experimento_fault_1_gpu.pkl",
"train_image_folder": "Train&Test_S/Train/images/",
"train_annot_folder": "Train&Test_S/Train/anns/",
"cache_name": "Result_yolo3_fault_1/experimento_fault_1_gpu.pkl",
"train_times": 1,
@@ -28,21 +28,21 @@
"class_scale": 1,
"tensorboard_dir": "log_experimento_fault_gpu",
"saved_weights_name": "../Result_yolo3_fault_1/yolo3_full_fault_1.h5",
"saved_weights_name": "Result_yolo3_fault_1/yolo3_full_fault_1.h5",
"debug": true
},
"valid": {
"valid_image_folder": "../Train&Test_S/Test/images/",
"valid_annot_folder": "../Train&Test_S/Test/anns/",
"cache_name": "../Result_yolo3_fault_1/val_fault_1.pkl",
"valid_image_folder": "Train&Test_S/Test/images/",
"valid_annot_folder": "Train&Test_S/Test/anns/",
"cache_name": "Result_yolo3_fault_1/val_fault_1.pkl",
"valid_times": 1
},
"test": {
"test_image_folder": "../Train&Test_S/Test/images/",
"test_annot_folder": "../Train&Test_S/Test/anns/",
"cache_name": "../Result_yolo3_fault_1/test_fault_1.pkl",
"test_image_folder": "Train&Test_S/Test/images/",
"test_annot_folder": "Train&Test_S/Test/anns/",
"cache_name": "Result_yolo3_fault_1/test_fault_1.pkl",
"test_times": 1
}

View File

@@ -4,13 +4,13 @@
"max_input_size": 400,
"anchors": [5,7, 10,14, 15, 15, 26,32, 45,119, 54,18, 94,59, 109,183, 200,21],
"labels": ["4"],
"backend": "full_yolo_backend.h5"
"backend": "keras-yolo3-master/full_yolo_backend.h5"
},
"train": {
"train_image_folder": "../Train&Test_D/Train/images/",
"train_annot_folder": "../Train&Test_D/Train/anns/",
"cache_name": "../Result_yolo3_fault_4/Result_yolo3_fault_4.pkl",
"train_image_folder": "Train&Test_D/Train/images/",
"train_annot_folder": "Train&Test_D/Train/anns/",
"cache_name": "Result_yolo3_fault_4/Result_yolo3_fault_4.pkl",
"train_times": 1,
@@ -33,9 +33,9 @@
},
"valid": {
"valid_image_folder": "../Train&Test_D/Test/images/",
"valid_annot_folder": "../Train&Test_D/Test/anns/",
"cache_name": "../Result_yolo3_fault_4/Result_yolo3_fault_4.pkl",
"valid_image_folder": "Train&Test_D/Test/images/",
"valid_annot_folder": "Train&Test_D/Test/anns/",
"cache_name": "Result_yolo3_fault_4/Result_yolo3_fault_4.pkl",
"valid_times": 1
},

View File

@@ -21,9 +21,9 @@ def _main_(args):
makedirs(output_path)
print ('Training ssd')
os.system('cd ssd_keras-master/ && python train.py -c ../' + config_path + ' > ../' + output_path + '/ssd.output 2> ../' + output_path +'/ssd.err')
os.system('python ssd_keras-master/train.py -c ' + config_path + ' > ' + output_path + '/ssd.output 2> ' + output_path +'/ssd.err')
print ('Testing ssd')
os.system('cd ssd_keras-master/ && python evaluate.py -c ../' + config_path + ' > ../' + output_path + '/ssd_test.output 2> ../' + output_path +'/ssd_test.err')
os.system('python ssd_keras-master/evaluate.py -c ' + config_path + ' > ' + output_path + '/ssd_test.output 2> ' + output_path +'/ssd_test.err')
if __name__ == '__main__':
@@ -32,4 +32,3 @@ if __name__ == '__main__':
argparser.add_argument('-o', '--output', help='path to save the experiment')
args = argparser.parse_args()
_main_(args)

View File

@@ -20,9 +20,9 @@ def _main_(args):
makedirs(output_path)
print ('Training full_yolo3')
os.system('cd keras-yolo3-master/ && python train.py -c ../' + config_path + ' > ../' + output_path + '/yolo3_full_yolo.output 2> ../' + output_path +'/yolo3_full_yolo.err')
os.system('python keras-yolo3-master/train.py -c ' + config_path + ' > ' + output_path + '/yolo3_full_yolo.output 2> ' + output_path +'/yolo3_full_yolo.err')
print('Test full_yolo3')
os.system('cd keras-yolo3-master/ && python evaluate.py -c ../' + config_path+ ' > ../' + output_path + '/yolo3_full_yolo_test.output 2> ../' + output_path +'/yolo3_full_yolo_test.err')
os.system('python keras-yolo3-master/evaluate.py -c ' + config_path+ ' > ' + output_path + '/yolo3_full_yolo_test.output 2> ' + output_path +'/yolo3_full_yolo_test.err')
if __name__ == '__main__':
argparser = argparse.ArgumentParser(description='train and evaluate ssd model on any dataset')