-
Clone GFM.
-
Create uv venv by running
uv init
-
download dependencies:
uv add torch pyyaml scipy termcolor timm yacs torchmetrics rasterio torchgeo opencv-python
-
[OPTIONAL: only for speeding up, you can ommit the dependency to apex by using the parameter
--amp-opt-level O0when running scripts]Clone apex and run commands:
git clone https://github.com/NVIDIA/apex
cd apexrm pyproject.toml
uv run setup.py install
uv run pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --global-option="--cpp_ext" --global-option="--cuda_ext" ./
-
Download weights from imagenet
wget https://github.com/SwinTransformer/storage/releases/download/v1.0.0/swin_base_patch4_window7_224_22k.pthand place it under the following folder structure.
output |- simmim_finetune |- swin_base_patch4_window7_224_22k.pth -
Download GeoPile from NAS-3:
"\\NAS-3\Imagery\ai-internship-2025\geopile\GeoPile.zip", place the file indataand unzip it to obtain the GeoPileV0 folder (might take several minutes to unzip). -
To train their fundation model, you can run the
main_teacher.pyscript as follows:uv run -m torch.distributed.run --nproc_per_node 1 main_teacher.py --cfg configs/simmim_pretrain__swin_base__img192_window6__100ep.yaml --batch-size 1 --data-path data/GeoPileV0 --tag gfm --pretrained output/simmim_finetune/swin_base_patch4_window7_224_22k.pth --amp-opt-level O0
This is slightly different from GFM instruction because the
torch.distributedlibrary evolved. Note that we use a single GPU and a batch size that is much smaller because of current RAM issues. Depending on your set, adapt those parameters.
forked from mmendiet/GFM
-
Notifications
You must be signed in to change notification settings - Fork 0
License
novelt/GFM
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Python 100.0%