We support two installation methods:
We recommend using the Docker container for a consistent and reproducible installation environment.
You can pull our pre-built docker image from Docker Hub. We provide a Dockerfile in the root directory and you can also build from the Dockerfile.
- Option 1: Pull from Docker Hub
docker pull shaoyuanxie/flytrap:latest
docker tag shaoyuanxie/flytrap:latest flytrap:latest- Option 2: Build from Dockerfile
docker build -t flytrap .After preparing the environment, you can run the following command to start the container:
bash run_docker.shThen, inside the container, you can run the following command to build the models:
cd /workspace/flytrap
bash scripts/install.shYou might encounter building errors. We've verified the errors won't affect functionality. You can ignore them and continue.
Please ensure that you have CUDA 11.3 installed on your system. Then run the following command to create the environment:
# Create new environment
conda create -n flytrap python=3.8
conda activate flytrap
# Set CUDA_HOME
export CUDA_HOME=/usr/local/cuda-11.3
# Install dependencies
pip install cython==0.29.3
pip install -r requirements.txt
pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu113_pyt1110/download.html
# Install models
bash scripts/install.shWe provide two ways to prepare the data.
- Option 1: Google Drive
Please download the dataset from the link above. You can also download using the terminal command:
bash download/download_data.sh- Option 2: Zenodo
Please download the dataset from the link above. You can also download using the terminal command:
bash download/download_data_zenodo.shFinally, the dataset is organized as follows:
├── data
│ └── dataset_v4.0
│ ├── annotations
│ │ ├── eval
│ │ ├── train_search
│ │ └── train_template
│ ├── collect_eval.json
│ ├── collect_train_final.json
│ ├── collect_train.json
│ ├── eval
│ ├── README.md
│ ├── scripts
│ ├── TGT
│ ├── train_search
│ └── train_template
You can download the checkpoints from the link. You can also download using the terminal command:
# For Google Drive
bash download/download_model.sh
# For Zenodo
bash download/download_model_zenodo.shThe checkpoints are organized as follows: if you used the above Google Drive commands to download the checkpoints, they're already in the correct place.
├── ckpts/
│ ├── torch_bdd100k.pth
│ ├── siamrpn_r50_l234_dwxcorr.pth
│ ├── siamrpn_mobilev2_l234_dwxcorr.pth
│ └── siamrpn_alex_dwxcorr.pth
├── models/
│ ├── MixFormer/
│ │ └── models/
│ │ └── mixformer_online_22k.pth.tar
│ └── VOGUES/
│ └── model.pt
│ └── pretrained_models/
│ │ └── multi_domain_fast50_dcn_combined_256x192.pth
│ └── detector/
│ └── yolo/
│ └── data/
│ └── yolov3-spp.weights