zhu-xlab / DOFA

Code for Neural Plasticity-Inspired Foundation Model for Observing the Earth Crossing Modalities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

utils import issue - which library versions are used?

alimkarimi opened this issue · comments

Hi there. Very cool work!

Can you please post the versions of the libraries that are listed in the requirements.txt file? I am running into an issue with using the demo.ipynb as I get an issue loading the vit base model in the cell below "Load the pre-trained weights of DOFA base model" (in the import statement "from models_dwv import vit_base_patch16")

Specifically the error is "ModuleNotFoundError: No module named 'util'". I have kornia, numpy, rasterio, timm, and torch all in my environment. I am wondering if it may be an issue with which version of timm I am on, as timm is the only library in that list that has a built in function for sin/cos based 2d positional embeddings (as far as I am aware).

This is the full error message:
Screenshot 2024-04-01 at 10 12 44 PM

Is it possibly from the MAE library? https://github.com/facebookresearch/mae/blob/main/util/pos_embed.py . The pos_embed.py file here has a function called "get_1d_sincos_pos_embed_from_grid".

Hi @alimkarimi , we updated the repo and the problem should be fixed now.
The demo file has also been updated. Thanks for your interest.

Thanks! I am able to run inference now for the demo notebook examples.