Some code for the Semantic Segmentation in TensorFlow/Keras Data Hub TechTalk, March 7 2023
- clone this repo
- download the data (see below) and structure like this:
data
├── class_dict_seg.csv
├── RGB_color_image_masks
├── test_data
├── test_labels
├── train_data
├── train_labels
├── val_data
└── val_labels
The program assumes all images are *.png files that have been resized and cropped to 512x512
- Create virtual environment (python3 -m venv venv)
- source ./venv/bin/activate
- pip install -U pip
- pip install tensorflow opencv-python scikit-image
- mkdir raw_output final_output
- source ./venv/bin/activate
- python unet.py
- source ./venv/bin/activate
- python ./unet_inference.py (inferred output will be in "raw_output")
- source ./venv/bin/activate
- python ./convert.py (files will be in "final_output")
https://www.kaggle.com/datasets/bulentsiyah/semantic-drone-dataset
More information on the dataset can be found here: http://dronedataset.icg.tugraz.at/