Skip to main content

An open source pytorch library for spatial mapping based on 2D representations

Project description



Spatial Mapping (SMap)

Testing CI - Test
Package PyPI Latest Release Coverage

What is it?

An open source pytorch library for spatial mapping based on 2D representations, a concept in 3D inference that first appeared in the paper "A Solution to the Fundamental Problem of 3D Inference Based on 2D Representations" uploaded to arXiv. This project is the foundation of the "Dynamic 3D Inference" vision with three main pillars:

  • Dynamic gradient flows.
  • Platonic-representation based 3D inference.
  • Countable vision.

Dynamic gradient flows: A concept appears in backprobagation programming for neural network optimization when considering the differentiable rendering problem as a multi-objective optimization problem where each point corresponds to an objective. Thus, for each objective, the gradient flow will be controlled in a way that helps to translate an existing point to its corresponding screen position instead of “bubbling" a point at a certain screen position, what is a common process found in solutions based on image loss optimization. For more details, please read the paper.

Platonic-representation based 3D inference: The projection of an object on an image is an 2D instance of the Platonic representation of that object. This project aims to perform 3D inference on these Platonic representations built during the training process. Unlike other approaches, the inverse rendering solution implemented in this project does not separate the 3D inference process from the training process but rather the training process is built on top of the inference. Accordingly, even if the target images are changed by a change in the 3D parameters such as increasing or decreasing the rotation angles of the object or translating the entire object, the training process will not have to restart from the beginning but will be similar to moving the object to the new position.

Countable vision: This concept will be revealed in the second phase of the project.

Current Plans: Trello board

Table of Contents

Installation

Install from PyPI

You can install smap directly from PyPI using pip:

pip install smap-torch

Development Installation

Follow these steps to install and set up SMap for development:

  1. Clone the repository:

    git clone https://github.com/thienannguyen-cv/SMap.git
    cd SMap
    
  2. (Optional) Create and activate a virtual environment:

    # On Linux or macOS:
    python -m venv venv
    source venv/bin/activate
    
    # On Windows:
    python -m venv venv
    venv\Scripts\activate
    
  3. Install dependencies:

    Upgrade pip and setuptools, then install all required packages:

    pip install --upgrade pip setuptools
    pip install -r requirements.txt
    
  4. Install SMap in editable mode:

    This allows you to develop SMap and have changes reflected immediately without reinstalling the package:

    pip install -e .
    

After installation, you can import the package in your python project, for example:

from smap import SMap, SMap3x3

Integrated Applications

  • Camera Calibration as a PnI solver.

Next Release Features

  • Depth Estimation for unique-shape objects.

License

Apache 2.0


Go to Top

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

smap_torch-1.0.3.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

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

smap_torch-1.0.3-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file smap_torch-1.0.3.tar.gz.

File metadata

  • Download URL: smap_torch-1.0.3.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for smap_torch-1.0.3.tar.gz
Algorithm Hash digest
SHA256 dd5ae438fe4c780e687896116882b716e04094c2c0c96900d09ebf96c29f1134
MD5 396f593f63935b77f5d75c79779cb111
BLAKE2b-256 081175e9b12e03541113c10cd495f9c21309974af24dcffe36c1606c47c78ea2

See more details on using hashes here.

Provenance

The following attestation bundles were made for smap_torch-1.0.3.tar.gz:

Publisher: cd.yml on thienannguyen-cv/SMap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file smap_torch-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: smap_torch-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for smap_torch-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7e4ff11ec8caec2f82765d51b6e4a17a8c54d6eccde66e2801cc6ca794c4b23e
MD5 4c9994fafdaf4dad0e0967e5da049689
BLAKE2b-256 5cdba86d06ef7fc8c25beb53bf0a65130793dd19fe81577c2d2a4ecd2293c8d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for smap_torch-1.0.3-py3-none-any.whl:

Publisher: cd.yml on thienannguyen-cv/SMap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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