# say-it-better **Repository Path**: lsreback/say-it-better ## Basic Information - **Project Name**: say-it-better - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-23 - **Last Updated**: 2026-05-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Say It Better: RL-Based Prompt Tuning for Enhancing Open-Vocabulary Recognition This repository contains code accompanying the paper “Say It Better: RL-Based Prompt Tuning for Enhancing Open-Vocabulary Recognition”. The project explores how the performance of open-vocabulary object detection and segmentation models can be improved by automatically reformulating natural-language queries. Open-vocabulary vision models are highly sensitive to the wording of text prompts. Even minor changes in phrasing can significantly affect detection and segmentation quality. This work addresses that issue by introducing Say It Better (SiB), a prompt adaptation approach that learns to rewrite user queries into formulations that are better aligned with the internal biases and expectations of a specific vision model. ## Installation To set up the environment and dependencies required to run the code, follow these steps: 1. Clone this repository: ```bash https://github.com/Mikle5/say-it-better.git cd say-it-better ``` 2. Install the required packages using pip (settings for python3.9): ```bash pip install -r requirements.txt ``` ## Training To train the LLM with SiB , proceed as follows: ```bash python grpo_run_detection.py --reward_model DETECTION_MODEL_NAME --project detection_experiment ``` or for segmentation ```bash python grpo_run_segmentation.py --reward_model SEGMENTATION_MODEL_NAME --project segmentation_experiment ``` ## Validate results To validate your results using your own config or setup parametrs in console, do the following: ```bash python3 validation/validation_det.py --path_to_source ./data/dataset.csv --path_to_imgs /datasets/gold/images/RGB_raw/ --detector_model_name DINO --path_to_checkpoint ./results/checkpoint-XXXX/ --language_model_type tuned --run_name validation_checkpoint_XXXX ```