Segmentation module and tracking.
This project has the following requirements:
- Python: Version 3.10
- CUDA: Version 12.1 (for GPU support)
- Dependencies:
- PyTorch 2.2.0 and related libraries
- Torch Geometric and extensions
- Git-based libraries:
- Core libraries like
numpy,opencv-python-headless,scipy,scikit-learn, andopen3d
Follow these steps to install and set up the project:
Clone the project repository to your local machine:
git clone <repository-url>
cd <repository-directory>- Ensure you have Conda installed on your system. If not, you can download it from Miniconda or Anaconda.
- Create a new Conda environment with Python 3.10:
conda create -n tracker python=3.10 -y
conda activate trackerSetup the environment by running:
bash setup_env.shInstall XMem:
git clone https://github.com/hkchengrex/XMem.git
cd XMem
pip install -r requirements.txt
cd ..Remember to export XMem path to your PYTHONPATH variable:
export PYTHONPATH=$PYTHONPATH:<path-to-folder>/object_tracker
export PYTHONPATH=$PYTHONPATH:<path-to-folder>/object_tracker/XMemMake sure the environemtn Test that PyTorch and CUDA are installed correctly:
python -c "import torch
print(f'Torch Version: {torch.__version__}')
print(f'CUDA Available: {torch.cuda.is_available()}')
"Expected output:
Torch Version: 2.2.0+cu121
CUDA Available: TrueTest that GroundingDINO is installed correctly:
python -c "
from groundingdino.util.inference import load_model
print('GroundingDINO installed successfully.')
"Test that SAM is installed correctly:
python -c "
from segment_anything import SamPredictor
print('SAM installed successfully.')
"Test that XMem is installed correctly:
python -c "
from XMem.model.network import XMem
print('XMem installed successfully.')
"