Skip to content
tmhoangggPublic

About

Semantic Alignment in Hyperbolic Space for Open-Vocabulary Semantic Segmentation (CVPRW'26 - PVUW)

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Semantic Alignment in Hyperbolic Space for Open-Vocabulary Semantic Segmentation (CVPRW'26)

This is our official implementation of HyRo!

[Project Page] [Colab]

Overview

Intro

HyRo refines semantic alignment by rotating embeddings in hyperbolic space, reducing the angle between visual and textual features (from $\alpha$ to $\beta$). This geometric adjustment enables the model to resolve semantic ambiguities and produce more accurate, fine-grained segmentations.



Architecture

We tackle semantic misalignment in open-vocabulary semantic segmentation by proposing (1) HyRo, a hyperbolic rotation module for angular refinement, and (2) a hyperbolic fine-tuning framework that decouples semantic alignment (angle) from hierarchical alignment (radius).

Installation

Please follow installation.

Data Preparation

Please follow dataset preperation, or download the complete dataset from this Kaggle Dataset.

Demo

You can download the model weights, install the required dependencies, and run the demo using the following command:

python demo/demo.py --config-file configs/vitb_384_hyperbolic.yaml --input path/to/input --output path/to/output --opts MODEL.WEIGHTS path/to/weights

Alternatively, you can run the demo directly in Colab: Open In Colab.

Training

We provide shell scripts for training and evaluation. run.sh trains the model in default configuration and evaluates the model after training.

To train or evaluate the model in different environments, modify the given shell script and config files accordingly.

Training script

sh run.sh [CONFIG] [NUM_GPUS] [OUTPUT_DIR] [OPTS]

# For ViT-B variant
sh run.sh configs/vitb_384.yaml 4 output/
# For ViT-L variant
sh run.sh configs/vitl_336.yaml 4 output/

Evaluation

eval.sh automatically evaluates the model following our evaluation protocol, with weights in the output directory if not specified. To individually run the model in different datasets, please refer to the commands in eval.sh.

Evaluation script

sh run.sh [CONFIG] [NUM_GPUS] [OUTPUT_DIR] [OPTS]

sh eval.sh configs/vitb_384_hyperbolic.yaml 4 output/ MODEL.WEIGHTS path/to/weights.pth

Training and Evaluation

You can launch the entire training and evaluation pipeline using:

bash run_train_test.sh

Pretrained Models

We provide pretrained weights for our models reported in the paper. All of the models were evaluated with 8 NVIDIA A100 GPUs, and can be reproduced with the evaluation script above.

Model CLIP A-847 PC-459 A-150 PC-59 PAS-20 PAS-20b Download
HyRo (B) ViT-B/16 12.0 18.9 31.2 57.3 95.0 76.7 ckpt 

Acknowledgement

Thanks to the excellent works and their codebases of CAT-Seg and HyperCLIP.

About

Semantic Alignment in Hyperbolic Space for Open-Vocabulary Semantic Segmentation (CVPRW'26 - PVUW)

Resources

Stars

3 stars

Watchers

0 watching

Forks

Contributors

Languages