BubbleSeg is a DeepLabV3+-based semantic segmentation framework for identifying bubble and solid phases in fluidized-bed images.
- DeepLab-based segmentation with configurable backbone (default: ResNet18)
- VOC-style dataset loading and augmentation pipeline
- Multi-scale and sliding-window inference modes
- Automatic export of segmentation masks and overlay visualizations
BubbleSeg/
|-- base/
|-- data/
| `-- BubbleDataSet/
| |-- JPEGImages/
| |-- SegmentationClass/
| `-- ImageSets/
| `-- Segmentation/
|-- dataloaders/
|-- models/
|-- pth/
| |-- best_model.pth
| `-- config.json
|-- test/
|-- config.json
|-- train.py
`-- inference.py
The BubbleDataSet used in this project is publicly available on Zenodo:
Place the dataset under ./data/BubbleDataSet in VOC format (JPEGImages, SegmentationClass, and ImageSets/Segmentation).
If you use this dataset in research or production, please cite the DOI and follow the license and usage terms on the Zenodo page.
- Python 3.8+
- PyTorch
- torchvision
- numpy
- scipy
- Pillow
- tqdm
- opencv-python
Example installation:
pip install torch torchvision numpy scipy pillow tqdm opencv-pythonTrain with the project config:
python train.py --config config.jsonResume from a checkpoint:
python train.py --config config.json --resume path/to/checkpoint.pthSelect specific GPU devices (optional):
python train.py --config config.json --device 0Run inference with the released checkpoint:
python inference.py --config ./pth/config.json --model ./pth/best_model.pth --test ./test --output outputs --extension jpgSwitch inference mode (optional):
python inference.py --config ./pth/config.json --model ./pth/best_model.pth --test ./test --mode slidingInference results are saved to:
outputs/masks: colorized segmentation masksoutputs/overlays: side-by-side original image and mask overlay
This project is developed based on the open-source repository pytorch-segmentation by yassouali:
https://github.com/yassouali/pytorch-segmentation
Parts of the source code are simplified and modified for bubble/solid phase segmentation in fluidized-bed systems.