numelm icon indicating copy to clipboard operation
numelm copied to clipboard

Example use case in scope? (8-points 3D reconstruction algorithm)

Open mpizenberg opened this issue 8 years ago • 2 comments

Hi, thanks for this project!

I would like to give one potential personal use case but I don't know if an issue is fitted for my request so feel free to close it and point me somewhere else if that would not be the case.

I'm currently working on 3D reconstruction algorithms, also sometimes known as SfM or visual SLAM depending on the communities. The first simplest algorithm I'd like to try to implement in elm is called the 8-points algorithm for two images. If I try to list the maths requirements to make this possible, I get:

  • [ ] matrices
  • [ ] vectors
  • [ ] matrix multiplication
  • [ ] inner product
  • [ ] transposition
  • [ ] stack matrix (vectorized)
  • [ ] column extraction (m[:,42] etc.)
  • [ ] SVD (Singular Value Decomposition)
  • [ ] Kronecker product

Do you think this would be in the scope of what we could build with NumElm?

mpizenberg avatar Dec 11 '17 02:12 mpizenberg

Hi there,

Matrices and vectos are covered, although I'm treating vectos as shape (n, 1). So is Matrix multiplication, transposition and column extraction. Implementing SVD was planned. I didn't include inner product because I never had the need for it in Machine Learning algorithms I used. Neither did I include Kronecker product.

I'm afraid this first version doesn't support functionality you need to be able to implement the 8-points algorithm.

NumElm is at the moment going through a complete redesign. I hit some walls trying to implement some Deep Learning algorithms where mutability would definitely makes things easier.

Exploring other alternatives. Other approaches. Even other languages such as PureScript. Might suddenly become unpopular with this last comment :-P

jscriptcoder avatar Dec 11 '17 17:12 jscriptcoder

Exploring other alternatives. Other approaches. Even other languages such as PureScript. Might suddenly become unpopular with this last comment :-P

I don't see why XD

NumElm is at the moment going through a complete redesign. I hit some walls trying to implement some Deep Learning algorithms where mutability would definitely makes things easier.

I haven't been using deep learning, but keeping an eye on it, following "trends". I've no idea how such libraries are implemented in languages like haskell. But in case it might be of help, last year, I stumbled upon one very interesting blog post: Neural Networks, Types, and Functional Programming, by Christopher Olah.

Any way, if you're hitting some walls and having a lot of API rethink, it might help to share some of those. Either for your attempt or for the next one.

Cheers

mpizenberg avatar Dec 12 '17 03:12 mpizenberg