Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.
/ CPD-service Public archive

A microservice to run the Coherent Point Drift (CPD) method as a component of the SpatioTemporal Features eXtractor (stfX)

License

Notifications You must be signed in to change notification settings

EdgarACarneiro/CPD-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPD-service

❗ This repository has been archived. Further developments on this repository are done in most-inesctec/CPD-service

A microservice, built with flask, to run the Coherent Point Drift (CPD) method, a point set registration algorithm by Myronenko and Song (2010), to estimate the spatial transformations affecting spatiotemporal phenomena. This microservice is part of the SpatioTemporal Features eXtractor (stfX). Section 5.2.1 of the thesis associated to the stfX contains a detailed description of this microservice architecture, guidelines and API.

To run the CPD method, we utilise pycpd.

Usage example

Example of a request to this microservice:

curl -d '{"X": [[10, 10],[10, 11],[11, 11],[11, 10]], "Y": [[0, 0],[0, 1],[1, 1],[1, 0]]}' -H "Content-Type: application/json" -X POST http://localhost:5000/cpd
  • X: represents the target point set
  • Y: represents the moving point set (the one to be altered)

The respective response, in json:

{
    "rotation": 0.0,
    "scale": 0.002487577505966565,
    "translation": [10.498756211247015, 10.498756211247013]
}

Running Instructions

  • Using Docker:
docker build -t cpd-service . --no-cache
docker run -p 5000:5000 cpd-service
  • Using command line:
python -m venv venv
. venv/bin activate
sh init.sh

About

A microservice to run the Coherent Point Drift (CPD) method as a component of the SpatioTemporal Features eXtractor (stfX)

Resources

License

Stars

Watchers

Forks

Packages