Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
JacopoLungo committed Jun 23, 2024
0 parents commit 5d4a7ed
Show file tree
Hide file tree
Showing 53 changed files with 7,265 additions and 0 deletions.
210 changes: 210 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# IDE and editors
.idea/
.vscode/
outputs/
.vscode/tasks.json

.python-version

#gpu memory snapshots
*.pickle
data

#scalene profiler outputs
scalene/

#user dependent jobs
j_jobs/
jobs_mosaic/
jobs/

#test files
notebooks/to_delete.ipynb
src/maxarseg/geo_datasets/datasets.py

*.geojson

#shape files
*.shp
*.shx
*.dbf
*.prj
*.cpg
*.qix
*.qmd
*.sbn
*.sbx
*.xml
*.lock

#geopacakge files
*.gpkg

*.csv
*.npy
*.tif
*.parquet
*.paquet

stats/
labelled/
notebooks/

morocco_builds/

#recycle bin
zz_recBin/
2 changes: 2 additions & 0 deletions configs/custom_cfg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
event:
ix: 5
56 changes: 56 additions & 0 deletions configs/default_cfg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
event:
ix: None
when: "pre"

models:
gd:
bs: 1
size: 600
stride: 400
device: "cuda:0"
root_path: "./models/GDINO"
config_file_path: "./models/GDINO/configs/GroundingDINO_SwinT_OGC.py"
weight_path: "./models/GDINO/weights/groundingdino_swint_ogc.pth"
text_prompt: "bush"
box_threshold: 0.15
text_threshold: 0.30

df:
bs: 16
size: 600
patch_overlap: 0.25
device:
- 0 #to indicate cuda:0 input [int(0)], to not specify use 'auto'
box_threshold: 0.1

esam:
bs: 1
num_parall_queries: 200
size: 1024
stride: 768
device: "cuda:0"
root_path: "./models/EfficientSAM"

detection:
trees:
use_GD: true
use_DF: false
nms_threshold: 0.5
min_ratio_GD_boxes_edges: 0.5
max_area_boxes_mt2: 6000
perc_reduce_tree_boxes: 0

buildings:
ext_mt_build_box: 0

segmentation:
general:
clean_mask: true
rmv_holes_area_th: 80
rmv_small_obj_area_th: 80

roads:
road_width_mt: 5

output:
out_dir_root: "./output"
19 changes: 19 additions & 0 deletions configs/trees_cfg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
models:
df:
bs: 16
size: 600
patch_overlap: 0.25
device:
- 0 #to indicate cuda:0 input [int(0)], to not specify use 'auto'
box_threshold: 0.1

gd:
size: 1024
stride: 1024
box_threshold: 0.12

detection:
trees:
nms_threshold: 0.5
min_ratio_GD_boxes_edges: 0.5
max_area_boxes_mt2: 7000 # best in range 6000-8000
3 changes: 3 additions & 0 deletions metadata/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ignore all files except for this one
*
!.gitignore
3 changes: 3 additions & 0 deletions models/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ignore all files except for this one
*
!.gitignore
3 changes: 3 additions & 0 deletions output/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ignore all files except for this one
*
!.gitignore
Loading

0 comments on commit 5d4a7ed

Please sign in to comment.