AustNet-Inharmonious-Region-Localization
February 24, 2026 ยท View on GitHub

This is the official code of the paper:
Inharmonious Region Localization with Auxiliary Style Feature
Penghao Wu, Li Niu, Liqing Zhang
arXiv Paper, BMVC 2022
Online Demo
Try this online demo for image composition (object insertion) built upon libcom toolbox and have fun!
Install
Clone this repo and build the environment
git clone https://github.com/bcmi/AustNet-Inharmonious-Region-Localization.git
cd AustNet-Inharmonious-Region-Localization
conda env create -f environment.yml --name Austnet
conda activate Austnet
Download the semantic segmentation network model weight through link Dropbox or Baidu Yun with code pfpy. Put the model weight in the HRNet-Semantic-Segmentation-HRNet-OCR folder.
Datset
Please refer to DIRL to download the iHarmoney4 dataset.
Training
To train AustNet, run
python train_austnet.py --dataset_root PATH_OF_THE_DATASET --logdir austnet_training_log --gpus NUMBER_OF_GPUS
To train AustNet_S, run
python train_austnet_s.py --dataset_root PATH_OF_THE_DATASET --logdir austnet_s_training_log --gpus NUMBER_OF_GPUS
Pretrained Model
| Model | Google Drive Link | Baidu Yun Link |
|---|---|---|
| Austnet | Dropbox | Baidu Yun code: m8ku |
| Austnet_s | Dropbox | Baidu Yun code: jrdi |
Evaluation
To evaluate AustNet, run
python test_austnet.py --dataset_root PATH_OF_THE_DATASET --ckpt MODEL_WEIGHT_PATH
To evaluate AustNet_S, run
python test_austnet_s.py --dataset_root PATH_OF_THE_DATASET --ckpt MODEL_WEIGHT_PATH
Citation
If you find our work or code helpful, please cite:
@inproceedings{Wu2022Inharmonious,
title={Inharmonious Region Localization with Auxiliary Style Feature},
author={Penghao Wu and Li Niu and Liqing Zhang},
booktitle={BMVC},
year={2022}
}
Acknowledgement
Our code is based on repositories: