This repository is adapted from the original Open-World Semantic Segmentation Including Class Similarity, which was presented at IEEE / CVF Computer Vision and Pattern Recognition Conference (CVPR) 2024. The code has been customized and extended for the application of semantic segmentation in underwater ship hull inspection. Specifically improvements have been made to the "Feature loss" to adress some issues it has.
You can find the paper here.
Install the libraries of the requirements.yml
, or create a conda environment by conda env create -f requirements.yml
and then conda activate openworld
.
The weights of ResNet34 with NonBottleneck 1D block pretrained on ImageNet are available here.
Information can be found regarding the datsets under src/datasets.
You can choose your favourite hyperparameters configuration in args.py
. For training, run
python train.py --id <your_id> --dataset_dir <your_data_dir> --num_classes <N> --batch_size 8
.
The expected data structure is taken from Cityscapes. BDDAnomaly has been converted to Cityscapes format.
Use the following command to evaluate your trained model:.
python test.py --dataset 'liaci' --dataset_dir 'path-tp-dataset' --checkpoint_path 'path-to-checkpoint' --code_mode 'test_ow' --test_notes 'test_liaci_owthresh3' --batch_size 16 --num_classes <N>
.