-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geo-SAM python encoder #25
Comments
Hi @cycle4 The keys for the parameters are fixed. You can copy the settings from The default parameters are enough to run it. Our tutorials just specify the paths, without any other parameters [see I suggest you directly run the Colab tutorials, which can help you understand the results of each step in more detail. |
Hello !
Thank you for thinking about releasing a python library to encode the image without going through QGIS (even if it works very well in QGIS). However I am having troubles when I want to modify the parameters of the encoding in the settings json file. I export it from QGIS to have the "template" of the json file but I am still having issues. Can you provide an exemple of the json settings file to be sure I have the right namings ?
I am currently working with this :
{
"area_units": "m2",
"distance_units": "meters",
"ellipsoid": "EPSG:7030",
"inputs": {
"BANDS": null,
"BATCH_SIZE": 1,
"CKPT": "/home/Desktop/IMG_ENC/checkpoint/sam_vit_l_0b3195.pth",
"CRS": null,
"CUDA": true,
"CUDA_ID": 0,
"EXTENT": null,
"INPUT": "F:/exemple.tif",
"LOAD": true,
"MODEL_TYPE": 1,
"OUTPUT": "TEMPORARY_OUTPUT",
"RANGE": "None,None",
"RESOLUTION": 1.2,
"STRIDE": 922
}
}
I am not sure if this is the expected format as the library works well on a single image with the default parameters (no json settings file implied) but crashes when I try to implement the settings
By the way, I had this error trying to run it with GPU :
line 642, in
settings = {Parameter_Mapping[k]: v for k,
KeyError: 'CUDA'
It has been solved by adding to image_encoder.py line 642 this part :
settings = {Parameter_Mapping[k]: v for k, v in settings.items() if k != 'CRS' and k in Parameter_Mapping}
Thanks for your help
The text was updated successfully, but these errors were encountered: