Views
No views yet
causal-conv1d and mamba-ssmstnr and install PyTorch. In the following installation steps, the default installed CUDA version is 12.1. If your CUDA version is not 12.1, please modify it according to the actual situation.1# Create conda environment
2conda create -n stnr python=3.8 -y
3conda activate stnr
4
5# Install PyTorch
6pip install torch==2.1.0 torchvision==0.14.0 torchaudio==0.13.0
7
8# Install dependencies
9pip install causal_conv1d mamba_ssm packaging
10pip install timm==0.4.12
11pip install pytest chardet yacs termcolor
12pip install submitit tensorboardX
13pip install triton==2.0.0
14
15# Or simply run
16pip install -r requirements.txt${DATASET_ROOT} # Dataset root directory, for example: /home/username/data/LEVIR-CD
├── A
│ ├── train_1_1.png
│ ├── train_1_2.png
│ ├──...
│ ├── val_1_1.png
│ ├── val_1_2.png
│ ├──...
│ ├── test_1_1.png
│ ├── test_1_2.png
│ └── ...
├── B
│ ├── train_1_1.png
│ ├── train_1_2.png
│ ├──...
│ ├── val_1_1.png
│ ├── val_1_2.png
│ ├──...
│ ├── test_1_1.png
│ ├── test_1_2.png
│ └── ...
├── label
│ ├── train_1_1.png
│ ├── train_1_2.png
│ ├──...
│ ├── val_1_1.png
│ ├── val_1_2.png
│ ├──...
│ ├── test_1_1.png
│ ├── test_1_2.png
│ └── ...
├── list
│ ├── train.txt
│ ├── val.txt
│ └── test.txtconfig. Below are the example commands to train and test the model on the LEVIR-CD dataset.python train_cd.py --config/levir/levir.jsonpython test_cd.py --config/levir/levir_test.jsonSTNR-Det/
├── config/ # Configuration files for training/testing
│ ├── levir_cd_mamba.json
│ ├── levir_test_cd_mamba.json
│ └── ...
├── core/ # Core functionality (e.g., models, loss functions)
│ └── ...
├── data/ # Data loading and preprocessing scripts
│ └── ...
├── misc/ # Miscellaneous utility scripts
│ └── ...
├── models/ # Model architectures and components
│ └── ...
├── .gitattributes # Git attributes for version control
├── README.md # Project README (this file)
├── requirement.txt # Python package dependencies
├── test_cd.py # Testing script for the model
└── train_cd.py # Training script for the model