🚌 MARS: Mask Attention Refinement with Sequential Quadtree Nodes for Car Damage Instance Segmentation
Welcome to the official repository for MARS—an innovative deep learning model tailored for precise car damage instance segmentation. Leveraging advanced self-attention mechanisms with sequential quadtree nodes, MARS delivers superior segmentation masks, surpassing state-of-the-art methods like Mask R-CNN, PointRend, and Mask Transfiner.
In the realm of car insurance, accurately assessing vehicle damage is crucial. Traditional models often struggle with complex images and fine segmentation tasks. MARS (Mask Attention Refinement with Sequential Quadtree Nodes) addresses these challenges by recalibrating channel weights using a quadtree transformer, enhancing segmentation accuracy.
- +1.3 maskAP improvement with the R50-FPN backbone.
- +2.3 maskAP improvement with the R101-FPN backbone on the Thai car-damage dataset.
MARS was showcased at the International Conference on Image Analysis and Processing 2023 (ICIAP 2023) in Udine, Italy.
- Teerapong Panboonyuen (Kao Panboonyuen)
If you're interested in exploring the academic work behind MARS, please check out the following publication:
- MARS: Mask Attention Refinement with Sequential Quadtree Nodes for Car Damage Instance Segmentation
- ACM: Link
- ArXiv: Link
- Springer (PDF): Link
- Code: GitHub Repository
- Python 3.8+
- PyTorch 1.8+
- CUDA 11.1+
- Other dependencies listed in
requirements.txt
-
Clone the Repository:
git clone https://github.com/kaopanboonyuen/MARS.git cd MARS
-
Set Up a Virtual Environment:
python3 -m venv mars-env source mars-env/bin/activate # For Windows: `mars-env\Scripts\activate`
-
Install Dependencies:
pip install -r requirements.txt
-
Download Datasets:
- Public Dataset: Download here and place it in the
data/
directory. - Private Dataset: Access restricted due to licensing with THAIVIVAT INSURANCE PCL.
- Public Dataset: Download here and place it in the
-
Train the Model:
python train.py --config configs/mars_config.yaml
-
Evaluate the Model:
python evaluate.py --checkpoint checkpoints/mars_best_model.pth --data data/test/
-
Run Inference:
python inference.py --image_path images/sample.jpg --output_dir results/
Experience MARS in action: Visit GitHub Pages
Our models were trained on both public and private datasets:
- Public Dataset: Download here
- Private Dataset: Access restricted due to licensing agreements with our partner THAIVIVAT INSURANCE PCL.
If you find our work helpful, please consider citing it:
@inproceedings{panboonyuen2023mars,
title={MARS: Mask Attention Refinement with Sequential Quadtree Nodes for Car Damage Instance Segmentation},
author={Panboonyuen, Teerapong, et al.},
booktitle={International Conference on Image Analysis and Processing},
year={2023},
organization={Springer}
}
If you're utilizing the public dataset Car Damage Detection (CarDD), which includes 4,000 high-resolution images and over 9,000 well-annotated instances across six damage categories (dent, scratch, crack, glass shatter, lamp broken, and tire flat), please make sure to cite the following paper:
@article{wang2023cardd,
title={Cardd: A new dataset for vision-based car damage detection},
author={Wang, Xinkuang and Li, Wenjing and Wu, Zhongcheng},
journal={IEEE Transactions on Intelligent Transportation Systems},
volume={24},
number={7},
pages={7202--7214},
year={2023},
publisher={IEEE}
}
This project is licensed under the MIT License. For more details, see the LICENSE file.
For inquiries or collaborations, feel free to reach out:
- Author: Teerapong Panboonyuen (Kao Panboonyuen)
- Email: panboonyuen.kao@gmail.com
- MARS (Motor AI Recognition Solution): https://www.marssolution.io
- MARSAIL (Motor AI Recognition Solution Artificial Intelligence Laboratory): MARSAIL