Test models and image pre-processing techniques to find the best combination.
- Define the
WORK_DIR
with the working directory of your project. It should contain:- File named
dataset.zip
containing:input
folder with all the input imageslabel
folder with all the target images (masks) with the same name as in the input foldertest-input
folder with the test input imagestest-label
folder with the target test masks with the same name as in the input folder
- Folder named
models
- File named
- Define
SIZE
with the model input size (SegNet follows 256) - Define
STRIDE
with the stride that the algorithm will make to generate the dataset - Define the
CURRENT_MODEL
with the path of your model according to image-segmentation-kerasCURRENT_MODEL = "segnet.resnet50_segnet"
will produce a SegNet model using the ResNet50 backbone
- Run all the cells until
Functions
stage - If your model is new (first time using it)
- Run
create_default_model()
- Run
- If your dataset is new (first time using it)
- Run
develop_dataset()
(last cell) - Wait for it to complete, may take a while
- Run
- Create/modificate the image pre-processing cells, starting at
Standard
- Run the cells
- When a cell is completed, it should create a folder with the model results
- At the end, run
fetch_model_results()
to get all the model results into its own folder
- Copy the CURRENT_MODEL.csv file to the same dir as
data_analysis.ipynb
- Run the cells
- Check the result.png file
On the right there's the model trained on 1024 images and on the left there's the model results trained on 7000 images. Each line corresponds to a different image processing technique.