A Keras implementation of Xception. This Work was applied to fire detection
- Import the libraries
- Download the dataset
- Extract, create a folder and move images in it and create of the label file "classes.txt"
- Generation of data from paths and labels
- Definition of parameters
- Collect images and their classes
- Data preparation
- Download of the pre-trained model an tranfer learning
- Training of the model
- Reload the pre-trained model with the weights of the last workout and first frozen weights
- Test the model 11.1 Download the test dataset 11.2 Load the model and fix parameters 11.3 Evaluation of the accuracy and loss 11.4 Evaluation of the number of correct classification (informative)
## How it works
#1. Download "input_classification.ipynb"
#2. Connect to google colab with a google account
#3. Clic on file, import a notebook and go to the path where it have been downloaded. You can also import the notebook by entering the GitHub link
## Explain for other datasets
#1. Sort your images between the classes you want to test
#2. Put each type in a folder with the name of the class
#3. At point 2 and 3, change the link of the test dataset path and change the extraction name and type if necessary
#4. At point 4, change the name of the folder where the class name should be extract
#5. At point 6, change the name of dataset
## Explain for other pre-trained model
#1. At point 6, change the pre-trained model
#2. At point 9, put the name of the pre-trained model fixed at point 6
#3. At point 10, change the name of the result's path to correspond at the right model
#4. At point 11, Do the same as at point 9 and 10
Attention : the "input_size" have to match with what the model accepts, see at point 1 which input_size for the model
- Import the libraries
- Downloads 2.1 Download the test dataset 2.2 Download the model
- Creation of "classes.txt"
- Load the model
- Generation of data from paths and labels
- Test on the model 6.1 Evaluation of the accuracy and the loss 6.2 Evaluation of the number of correct classifications (informative)
## How it works
#1. Download "Test-input_classification.ipynb"
#2. Connect to google colab with a google account
#3. Clic on file, import a notebook and go to the path where it have been downloaded. You can also import the notebook by entering the GitHub link
## Explain for other datasets
#1. Sort your images between the classes you want to test
#2. Put each type in a folder with the name of the class
#3. At point 2.1, change the link of the test dataset path and change the extraction name and type if necessary
#4. At point 3, change the name of the folder where the class name should be extract
#5. At point 4, change the name of dataset_path
- Import the libraries
- Creation of the label file "classes.txt"
- Load the model
- Load the video
- Creation of the paths
- Verification that the video is correctly loaded
- Play video and sequencing in pictures
- Prediction on images
- Writing video from annotated images
- Display of the final video
## How it works
#1. Download "VideoFinal.ipynb"
#2. Connect to google colab with a google account
#3. Clic on file, import a notebook and go to the path where it have been downloaded. You can also import the notebook by entering the GitHub link
## Explain for other videos :
At point 4, change the link of the video to download and rename it "video.mp4"
## Explain for other model
At point 3, change the link of the model to download and rename the model_path
- Python 3.6.8
- Keras 2.2.5
- tensorflow 1.15.0