Approaches to modeling terrain and maps in python

Overview

topography 🌎

Python 3.8 Build Status Language grade: Python Total alerts

Contains different approaches to modeling terrain and topographic-style maps in python

image

Features

Inverse Distance Weighting (IDW)

A given point P(x, y) is determined by the values of its neighbors, inversely proportional to the distance of each neighbor.

P is more heavily influenced by nearer points via a weighting function w(x, y).

Steps

The value of P(x, y) is determined only by the closest raw data point.

This approach works best to get a "feel" for larger datasets. With few input points, the resulting map has little detail.

In the case of multiple equidistant points being closest, point values are stored, and averaged.

Bilinear

in progress 👷 🛠️

Bicubic

in progress 👷 🛠️

Install

pip install topography

Requirements

  • numpy
  • matplotlib

see the requirements.txt

Example

from topography.Map import Map
from topography.utils.io import getPointValuesFromCsv

# # make map from noise data
# noiseMaker = Noise((0, 50), (0, 50))
# noiseData = noiseMaker.getRandom(scaleFactor=1)
# M = Map(noiseData)

# make map from recorded data
rawData = getPointValuesFromCsv("tests/data/20x20.csv")
M = Map(rawData)

# # Display the inputted raw data values
M.showRawPointValues()

# interpolate the Map
M.idw(showWhenDone=True)

# Display the interpolated data values
M.showFilledPointValues()

# Save the data to a .csv file
# optionally, write to file as a matrix
# default is x, y, z
M.writeLastToCsv("idw_20x20", writeAsMatrix=True)
Comments
  • NN - Improvements and Possible Design Changes

    NN - Improvements and Possible Design Changes

    NN Improvements and Design Changes

    Consider breaking up the current implementation of NN

    • [x] current NN ➡️ Map.steps()
    • [ ] new NN via voroni tesselation ➡️ Map.voroni() or Map.nn()

    image

    feature 
    opened by XDwightsBeetsX 1
  • Noise Generation

    Noise Generation

    Add Noise Generators

    This will be nice for quickly making cool topography maps

    start with random noise, but ideas for later...

    feature 
    opened by XDwightsBeetsX 1
  • allows for user to input map size

    allows for user to input map size

    Custom Map Dimensions, closes #5

    Can now customize views of the Map by specifying a custom Map(rawData, xRange=(lower, upper), yRange=(lower, upper))

    This does not impact the determination of points by interpolation, but does give a "sliced" view of the Map

    feature 
    opened by XDwightsBeetsX 1
  • Add Surface Plotting

    Add Surface Plotting

    New Surface Plot

    • In addition to the heatmap-style plot, add a surface representation plot of the Map
    • It should be displayed alongside the 2D Heatmap in a horizontal subplot
    • This may require some refactoring of the Map PointValue storage so that it can be used as a series of X, Y, Z lists
    • See this documentation on matplotlib

    Something Like This:

    | image | image | | :-: | :-: |

    feature 
    opened by XDwightsBeetsX 1
  • IDW Improvement - Neighborhooding

    IDW Improvement - Neighborhooding

    Add Neighborhooding to IDW

    • only apply IDW to a minimum number of nearby neighbors
      • the point of interest is more likely to be similar to nearby points
    feature 
    opened by XDwightsBeetsX 0
  • Added NN Interpolation

    Added NN Interpolation

    New NN Interpolation

    This is going to work better with larger data sets to get a "feel" for the Map.

    • Should add some noise generator to see how this looks with larger data sets.
    • Also add some docs, mentioning above
    • can add sophistication by grouping within a nearby region
    feature 
    opened by XDwightsBeetsX 0
  • Allow User to Input Map Size

    Allow User to Input Map Size

    Currently

    The size of the Map is determined by the user input RawData:

    width = self.xMax - self.xMin + 1
    height = self.yMax - self.yMin + 1
    

    Desired

    This should be changed to allow for the Instantiation of a Map's size to be set in the constructor.

    • Something like Map(rawData, xRange=(lower, upper), yRange=(lower, upper)) where lower and upper are inclusive
    • This change will have to be accounted for when finding max values
    • Undecided on if interpolation approaches should still consider these points
    feature 
    opened by XDwightsBeetsX 0
  • Bicubic Interpolation

    Bicubic Interpolation

    Add Bicubic Interpolation Scheme

    • [ ] in interpolaion.py add bicubic(thisPt, rawPts)
    • [ ] in tests/test_interpolate add test_bicubic.py
    • [ ] in tests/visual/1d add test_visual_bicubic.py
    • [ ] in Map.py add Map.bicubic(showWhenDone=True)

    image

    also see wikipedia

    feature tests 
    opened by XDwightsBeetsX 0
  • Bilinear Interpolation

    Bilinear Interpolation

    Add Bilinear Interpolation Scheme

    • [ ] in interpolaion.py add bilinear(thisPt, rawPts)
    • [ ] in tests/test_interpolate add test_bilinear.py
    • [ ] in tests/visual/1d add test_visual_bilinear.py
    • [ ] in Map.py add Map.bilinear(showWhenDone=True)

    image

    also see wikipedia

    feature tests 
    opened by XDwightsBeetsX 3
Releases(1.0.0)
  • 1.0.0(Jun 27, 2021)

    check out the new topography package on pypi 🌎

    This package provides some visualization and interpolation for topography data using the Map data structure

    • read data from file into PointValues using topography.utils.io.getPointValuesFromCsv(filename)
    • make a map with M = Map(rawData) and perform some interpolation like Map.idw(showWhenDone=True)
    • write the results to a data file with M.writeLastToCsv("cool_idw_interpolation", writeAsMatrix=True)

    Current interpolation schemes:

    • inverse distance weighting
    • step function
    Source code(tar.gz)
    Source code(zip)
Owner
John Gutierrez
Texas A&M MEEN '22. CS minor. Texas Water Safari Finisher '19 '21
John Gutierrez
Code repository for Semantic Terrain Classification for Off-Road Autonomous Driving

BEVNet Datasets Datasets should be put inside data/. For example, data/semantic_kitti_4class_100x100. Training BEVNet-S Example: cd experiments bash t

(Brian) JoonHo Lee 24 Dec 12, 2022
Quadruped-command-tracking-controller - Quadruped command tracking controller (flat terrain)

Quadruped command tracking controller (flat terrain) Prepare Install RAISIM link

Yunho Kim 4 Oct 20, 2022
Framework for joint representation learning, evaluation through multimodal registration and comparison with image translation based approaches

CoMIR: Contrastive Multimodal Image Representation for Registration Framework ?? Registration of images in different modalities with Deep Learning ??

Methods for Image Data Analysis - MIDA 55 Dec 9, 2022
Free Book about Deep-Learning approaches for Chess (like AlphaZero, Leela Chess Zero and Stockfish NNUE)

Free Book about Deep-Learning approaches for Chess (like AlphaZero, Leela Chess Zero and Stockfish NNUE)

Dominik Klein 189 Dec 21, 2022
This repo is about implementing different approaches of pose estimation and also is a sub-task of the smart hospital bed project :smile:

Pose-Estimation This repo is a sub-task of the smart hospital bed project which is about implementing the task of pose estimation ?? Many thanks to th

Max 11 Oct 17, 2022
Providing the solutions for high-frequency trading (HFT) strategies using data science approaches (Machine Learning) on Full Orderbook Tick Data.

Modeling High-Frequency Limit Order Book Dynamics Using Machine Learning Framework to capture the dynamics of high-frequency limit order books. Overvi

Chang-Shu Chung 1.3k Jan 7, 2023
Image morphing without reference points by applying warp maps and optimizing over them.

Differentiable Morphing Image morphing without reference points by applying warp maps and optimizing over them. Differentiable Morphing is machine lea

Alex K 380 Dec 19, 2022
Reimplementation of the paper `Human Attention Maps for Text Classification: Do Humans and Neural Networks Focus on the Same Words? (ACL2020)`

Human Attention for Text Classification Re-implementation of the paper Human Attention Maps for Text Classification: Do Humans and Neural Networks Foc

Shunsuke KITADA 15 Dec 13, 2021
Implementation of "Fast and Flexible Temporal Point Processes with Triangular Maps" (Oral @ NeurIPS 2020)

Fast and Flexible Temporal Point Processes with Triangular Maps This repository includes a reference implementation of the algorithms described in "Fa

Oleksandr Shchur 20 Dec 2, 2022
A large dataset of 100k Google Satellite and matching Map images, resembling pix2pix's Google Maps dataset.

Larger Google Sat2Map dataset This dataset extends the aerial ⟷ Maps dataset used in pix2pix (Isola et al., CVPR17). The provide script download_sat2m

null 34 Dec 28, 2022
Pytorch implementation of CVPR2020 paper “VectorNet: Encoding HD Maps and Agent Dynamics from Vectorized Representation”

VectorNet Re-implementation This is the unofficial pytorch implementation of CVPR2020 paper "VectorNet: Encoding HD Maps and Agent Dynamics from Vecto

null 120 Jan 6, 2023
PyTorch implementations of the paper: "Learning Independent Instance Maps for Crowd Localization"

IIM - Crowd Localization This repo is the official implementation of paper: Learning Independent Instance Maps for Crowd Localization. The code is dev

tao han 91 Nov 10, 2022
Spatial Intention Maps for Multi-Agent Mobile Manipulation (ICRA 2021)

spatial-intention-maps This code release accompanies the following paper: Spatial Intention Maps for Multi-Agent Mobile Manipulation Jimmy Wu, Xingyua

Jimmy Wu 70 Jan 2, 2023
Spatial Action Maps for Mobile Manipulation (RSS 2020)

spatial-action-maps Update: Please see our new spatial-intention-maps repository, which extends this work to multi-agent settings. It contains many ne

Jimmy Wu 27 Nov 30, 2022
Range Image-based LiDAR Localization for Autonomous Vehicles Using Mesh Maps

Range Image-based 3D LiDAR Localization This repo contains the code for our ICRA2021 paper: Range Image-based LiDAR Localization for Autonomous Vehicl

Photogrammetry & Robotics Bonn 208 Dec 15, 2022
Deep Compression for Dense Point Cloud Maps.

DEPOCO This repository implements the algorithms described in our paper Deep Compression for Dense Point Cloud Maps. How to get started (using Docker)

Photogrammetry & Robotics Bonn 67 Dec 6, 2022
Neural Surface Maps

Neural Surface Maps Official implementation of Neural Surface Maps - Luca Morreale, Noam Aigerman, Vladimir Kim, Niloy J. Mitra [Paper] [Project Page]

Luca Morreale 49 Dec 13, 2022
Riemannian Convex Potential Maps

Modeling distributions on Riemannian manifolds is a crucial component in understanding non-Euclidean data that arises, e.g., in physics and geology. The budding approaches in this space are limited by representational and computational tradeoffs. We propose and study a class of flows that uses convex potentials from Riemannian optimal transport. These are universal and can model distributions on any compact Riemannian manifold without requiring domain knowledge of the manifold to be integrated into the architecture. We demonstrate that these flows can model standard distributions on spheres, and tori, on synthetic and geological data.

Facebook Research 61 Nov 28, 2022
OrienMask: Real-time Instance Segmentation with Discriminative Orientation Maps

OrienMask This repository implements the framework OrienMask for real-time instance segmentation. It achieves 34.8 mask AP on COCO test-dev at the spe

null 45 Dec 13, 2022