Skip to main content

Python package to integrate image pyramids and raster/vector algorithms for computer vision at Port of Barcelona. Allows text, bounding box and point-based segmentation based on SAMGeo and GroundingDINO. Please refer to the homepage https://victorpachecoaznar.github.io/TFG/

Project description

TFG

This repository hosts the code for my Bachelors' thesis in Geoinfomation and Geomatics Engineering. The project has been tutored by Port de Barcelona and Universitat Politècnica de Catalunya.

Please refer to the homepage of the project:

🏡 https://victorpachecoaznar.github.io/TFG/

About this package

The goal of APB_spatial_computer_vision is to provide a framework to perform computer vision tasks on geospatial imagery. Its focus is semantic segmentation, mainly though SAM. The logic can be accessed in several points:

  • Through text, to perform image to bbox tasks via Grounding DINO.
  • Through bounding box, to perform SAM and achieve segmentation.
  • Throgh a lower resolution vector dataset coming from another model, in an attempt to improve segmentation.

Tools

  • 🦆 The program leverages Spatial-SQL DuckDB queries for precise vector operations
  • ⚡ Image pyramids have been optimized via concurrency to GDAL-warping
  • 📷 Integration of virtual layers through GDAL to SAMGeo
  • 📄 MKDocs for automated docs+ jupyter visualization

Instructions

The entry points of the system are the following environment variables:

  • TEXT_PROMPT: a string with the prompt to look for via Grounding DINO
  • VECTOR_DATASET: a vector dataset
  • DATA_DIR: location of the data
  • BASE_DIR: where this package is located, acessible for deployments
  • NAME_ORTOFOTO: basename for the image to be processed

Installation

In order to install this package, please download the yaml file in order to create the environment:

  • ✅ If CUDA is available:

    conda env create -f environment_cuda.yaml
    conda activate sam_apb_env
    pip install apb_spatial_computer_vision
    
  • ❌ If CUDA is not available:

    conda env create -f environment_cpu.yaml
    conda activate sam_apb_env
    pip install apb_spatial_computer_vision
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apb_spatial_computer_vision-1.1.0.tar.gz (42.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apb_spatial_computer_vision-1.1.0-py3-none-any.whl (50.3 kB view details)

Uploaded Python 3

File details

Details for the file apb_spatial_computer_vision-1.1.0.tar.gz.

File metadata

File hashes

Hashes for apb_spatial_computer_vision-1.1.0.tar.gz
Algorithm Hash digest
SHA256 3e2fabb5a1e4a6e9e843d04df38875d45bc7a5ad6d8d467138f3a8898e63586f
MD5 9874320fa99bab9c0d08af0d14de8c72
BLAKE2b-256 d12c46f256bf8e459c8fea1f82871cc28eda23563ab76411768132a69328f911

See more details on using hashes here.

File details

Details for the file apb_spatial_computer_vision-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for apb_spatial_computer_vision-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dddbfcc227f14857d355d338e1fbd6e7daa162f2ceb5e701dadbf3c293b34057
MD5 2378b7756d762868c3840306ecfd4261
BLAKE2b-256 599e5e6ff35caede4c6ea5512b72c5fcca5c255276544d5ae51d4b3bf46e9cea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page