Dynamic Knowledge Adapter with Probabilistic Calibration for Generalized Few-Shot Semantic Segmentation [CVPR 2024 Workshop]
This repository contains separate environments for training and testing machine learning models, each with its own requirements file for ease of setup and independent use.
To ensure each part of the project runs smoothly, the training and testing environments are separated. Install the required dependencies for each by navigating to the respective directory and running:
pip install -r requirements.txt
- Divide the dataset into trainset and valset.
-
Run data processing: Execute data_processing.py to crop each 1024x1024 image and its corresponding label into four 512x512 images.
python data_processing.py
-
Start training: Navigate to the training directory and run:
bash train.sh
-
Conduct testing: A pre-trained .pth file has been provided for immediate testing. It is stored in the Test/pretrain/ directory.
bash test.sh