BacXeption is a Deep Learning template of image segmentation functions and a Convolutional Neural Network (CNN) built on Keras for bacterial image classification. It uses the Xception architecture with pre-trained weights (https://arxiv.org/abs/1610.02357).
This project requires Python 3.6+
Install the prerequisites with PIP
pip install -r requirements.txt
- Place the raw images in
data/test_data/
- Run
python main.py
This should output labelled images with a .txt file of the coordinates of
each box in the output/$DATE_TIME
folder. Example:
- Replace the images in the
data/0/
anddata/1/
with your images. - Run
python train.py
- Move the
output/$DATE_TIME/model.json
andoutput/$DATE_TIME/model.h5
in themodel/
folder. - Follow the instructions in section 1.2
- Change
NUM_CLASSES
in config.py to the number of classes wanted. - Add your data in the
data/
folder. Each category should have a separate folder name, these must be integers starting from 0 (eg.0/
,1/
,2/
for 3 categories) - Follow the instructions in section 2.1
Pull requests and suggestions are always welcome.
Leonardo Castorina - universVM
Dr. Teuta Pilizota - Proposing the problem and useful discussions.
Dario Miroli – For introducing me to Keras and debugging early versions of BacXeption
François Chollet – Developing Keras and Xception