U-Maceralnet: A Deep Learning Model for Coal Maceral Images Segmentation
An Improved U-net Model for the Identification of Coal Macerals
U-Maceralnet is a deep learning-based semantic segmentation model specifically designed for identification of coal maceral images. By integrating Dynamic Snake Convolution and External Attention Mechanism, U-Maceralnet effectively enhances the segmentation accuracy of lathy coal macerals while addressing the challenges in coal maceral images processing. The U-maceralnet model achieves average values of 84.01% for pixel accuracy (PA), 75.29% for intersection over union (IoU), 87.58% for precision, and 89.77% for recall.
- using Dynamic Snake Convolution to improve lathy structure recognition
- using External Attention Mechanism to enhance feature representation
- using Pixel-level segmentation to ensure detailed maceral classification
- achving High-accuracy segmentation of coal maceral images
Ensure you have the following installed:
- Python 3.8+
- PyTorch 2.3.0
- CUDA 12.1 (for GPU acceleration)
- OpenCV, NumPy, Matplotlib, and other dependencies
Anaconda is strongly recommended to use a configured runtime environment
conda create -n u-maceralnet python=3.10 conda activate u-maceralnet pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 pip install -r requirements.txt
10 coal maceral images were placed in VOCdevkit for testing purposes
dataset/
└─VOC2007
├─ImageSets
│ └─Segmentation
│ ├─train.txt # Training image list
│ ├─val.txt # Validation image list
│ ├─test.txt # Test image list
├─JPEGImages
│ ├─img1.jpg
│ ├─img2.jpg
│ ├─...
└─SegmentationClass
├─img1.png
├─img2.png
python train.py --epochs --batch_size --lr --gpu
python evaluate.py --weights --dataset
python inference.py --image sample.jpg --output result.jpg
Special thanks to coal petrography experts for data annotation and contributions to the dataset.
If you have any questions, feel free to reach out!
- Na Xu: [email protected]; [email protected]
- Feiyang Jiao: [email protected]