Author Topic: Photogrammatry/Visual SLAM  (Read 6524 times)

0 Members and 1 Guest are viewing this topic.

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: de
Re: Photogrammatry/Visual SLAM
« Reply #25 on: October 22, 2018, 09:44:00 pm »
Pretty much as lukier said - people don't use CUDA because they love it so much or Nvidia is paying them but because it is the only viable game in town.

If you don't like it, feel free to go old school and rewrite the calculations using e.g. compute shaders. That works too and the performance should be similar to CUDA (it is basically the same thing) but you will quickly wish you had that CUDA to do the boilerplate and housekeeping necessary for you.

SLAM, photogrammetry, deep learning - none of these can be done realistically for actually useful sized tasks unless you are willing to spend money, whether on hardware or something like Google or Amazon cloud compute services. CPU-only variants are good for toy-sized problems only, it would take ages to process any real world dataset like that.

So if you can't afford a decent GPU, don't waste your money buying an underpowered one.  You will be fighting an uphill battle and will give up in disgust sooner than later. Many of these things need iterations where you tweak some parameters, run the code for a few hours, then tweak some more, run it again, until you get something acceptable.  If those few hours per round turn into days you will quickly give up.

And regardless of that - using that measuring tape is still going to be faster than any of this.

E.g. just today I was playing at work with a deep learning based animation system presented at this year's SIGGRAPH. It can generate data for steering a physically controlled (PID and such) simulated robot by learning from an example animation, such as a motion captured keyframe animation performed by a human actor. Complex problem but once trained it runs in real time. However, the training on a single beefy computer with 16 threads in parallel using a single GPU for one animation takes over a day. Without GPU it is completely nonviable, it would take weeks.
« Last Edit: October 22, 2018, 09:46:03 pm by janoc »
 
The following users thanked this post: cdev

Offline cdevTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: Photogrammatry/Visual SLAM
« Reply #26 on: October 23, 2018, 01:02:54 am »
Could you take a look at the ROCm "HIP" and related work,  (AMD open source cross-compiler allowing work with Cuda code on AMD HW) effort and let me know what you think of the viability of their approach?

Just a quick look.

https://github.com/ROCm-Developer-Tools/HIP

also https://gpuopen.com and https://rocm.github.io/

My current HW (older 6 core AMD "bulldozer" board lacking PCIe 3 atomics support) doesn't support it now.. My GPU which is a Polaris/Ellsmere type would now if I had a newer (Ryzen/Epyx or newer Intel-based) MB and CPU but its my understanding that future revisions of their code 'may' (or may not)

I get the impression it may even work now but if so I am on my own and its totally unsupported.

I cant afford to damage anything so I am waiting to try it until they say they can get it running properly, or I will just buy another GPU and MB once I know I need it and have outgrown everything I have now (I'm not even close, I am just feeling the waters now and don't know practically anything).

I just want to know your opinion on the viability of doing what they are doing and running Cuda code on it. Note that Ive used several different similar programs to run simple Cuda programs and its worked for some but not all of them. gpuocelot - two years ago I had it running and it worked, and I successfully ran cuda test programs on it. I forget what hung me up, something did though. It wasn't a complete tool. And now its a dead project without any support.

None of the similar tools quite work now, none are viable for anything complex though, and gpuocelot is really old and broken- it no longer compiles for me now.
« Last Edit: October 23, 2018, 01:14:15 am by cdev »
"What the large print giveth, the small print taketh away."
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: de
Re: Photogrammatry/Visual SLAM
« Reply #27 on: October 24, 2018, 03:52:31 pm »
Could you take a look at the ROCm "HIP" and related work,  (AMD open source cross-compiler allowing work with Cuda code on AMD HW) effort and let me know what you think of the viability of their approach?


I don't know whether that is viable. Crosscompiling CUDA code to C++ won't make it magically work on a non-CUDA GPUs - it still needs drivers and other infrastructure which isn't in place. AMD is very much non-existent in the high performance/research computing area. Given that no major project uses this it is likely a proof of concept at best and not production-ready tool.

I don't really understand what are you trying to do here. You won't save any money trying to push this stuff to CPUs or low end cheap GPUs. There is no magic in there - if the hardware is underpowered, it makes zero difference what framework or tool you use to manage the calculations.

Your current HW is hopelessly outdated, Bulldozer was released 7 years ago so no wonder the code doesn't work with it.

Also, do you want to rewrite the major computer vision frameworks needed for running SLAM or any photogrammetry (such as OpenCV) to use this yourself? Because otherwise I fail to see how it even could be relevant for you. I am pretty certain you don't have the scientific knowledge necessary to pull it off.

 

Offline cdevTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: Photogrammatry/Visual SLAM
« Reply #28 on: October 24, 2018, 08:39:45 pm »
You're right, I don't have the skill to "rewrite the major CV frameworks". 

By the way, maybe I didn't make it clear, Ive sort of diverged here to a more general discussion of GPU computing platforms- sorry if I didnt make that clear.

I am wondering if the situation with AMD is really as dire as you make it out to be.

It may well be, but maybe not.

 But my AMD card is fairly current. So I am hoping I dont need to replace it that soon.

Also, for example, OpenCV supports OpenCL as do forks of a great many other frameworks.

It may not be plug and play (Thats why I was asking about the ROCm tools) but its out there.

There is another issue too, proprietary code shouldn't be put in a position where binary blobs make decisions, perhaps life or death decisions - soon -  that are totally opaque to human examination and criticism.
« Last Edit: October 26, 2018, 08:16:36 pm by cdev »
"What the large print giveth, the small print taketh away."
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: de
Re: Photogrammatry/Visual SLAM
« Reply #29 on: October 25, 2018, 10:02:30 pm »
You're right, I don't have the skill to "rewrite the major CV frameworks".  I just want to be able to play with them, soon.

The situation with AMD, Raspberry Pi, old Cuda HW (I do have old computers and cards that support old versions of Cuda) isn't a total desert. For example, OpenCV supports OpenCL as do forks of a great many other frameworks.

Yes and as you were told already, OpenCL on your old hardware is totally hopeless performance-wise.  And that RaspberryPi was hopefully a joke, you don't want to run mapping (not navigation - that could work) SLAM on that, do you? You obviously have no idea how much computing power the job you want to do actually requires.

There is another issue too, proprietary code shouldnt be put in a position where binary blobs make decisions, perhaps life or death decisons - soon -  that are totally opaque to human examination and criticism.

Are you planning to build an armed drone or what? Otherwise I fail to see the relevance of this to your problem.

Also, open source is great - but when the open source solution either doesn't exist or is unsupported/doesn't work/is pain to use, then you either go with the proprietary one and solve your problem or keep talking about how morals - but the problem will be left unsolved. The third option is to actually fix the open source tools but most people don't have neither the means nor time for that.

I would also rather use open source drivers and libraries but when the state of the art is proprietary and the open solutions are not really comparable, then there is not much left to debate, IMO.
 

Offline cdevTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: Photogrammatry/Visual SLAM
« Reply #30 on: October 26, 2018, 12:27:34 am »
This is a good essay on the pros of the OpenCL like approach.
https://mathema.tician.de/the-state-of-opencl-for-scientific-computing-in-2018/

I have a semi-current video card, as I said. On a very few applications it is actually faster than their more recent Vega consumer cards. Its driver is more mature and at the current time it actually better supported than their Vega cards, by a great many applications (although that is changing)

Its performance on benchmarks is around 65-75% of what I would get paying twice or three times as much for AMDs newest consumer HW. And it cost around a third as much. Thats value, its not "obsolete". That I plan to keep. In a year or so, once I get my feet wet with what Ive got, I definitely plan to upgrade the CPU, but I would prefer to wait as long as I can, in particular until Ive reached the limits of my current HW, which I definitely have not done yet.

No, I am not planning to build anything like that, the thing I want to do is learn how to build and train models to solve everyday problems using neural nets. Not because that is guaranteed to be the best approach, just because I want to see how it works and how it differs from the more conventional approaches in coding.
« Last Edit: October 26, 2018, 12:32:46 am by cdev »
"What the large print giveth, the small print taketh away."
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: de
Re: Photogrammatry/Visual SLAM
« Reply #31 on: October 26, 2018, 08:03:43 pm »
No, I am not planning to build anything like that, the thing I want to do is learn how to build and train models to solve everyday problems using neural nets.

Didn't you say that you want to do photogrammetry/SLAM to scan your room? Neither of that has nothing whatsoever to do with neural nets and machine learning.

I feel you don't really understand what these terms actually mean and what the software is really doing.

If you want to learn how SLAM works, this course is a very good start to give you an introduction into the basics. There are newer techniques, such as dense SLAM, but they all start from the same foundation:
http://www.joansola.eu/JoanSola/eng/course.html

Photogrammetry basics are quite well explained here:
https://www.cse.wustl.edu/~furukawa/papers/fnt_mvs.pdf

The problems are related because SLAM uses photogrammetric techniques to create the map and most photogrammetry software needs to calculate where the camera was when every picture was taken to be able to reconstruct the scene.

Again, none of this has anything to do with neural networks or machine learning. There are some never works that use machine learning to improve some aspects of the above but neither SLAM nor photogrammetry are machine learning problems.

If you want to do machine learning and don't have the hardware necessary for it (training actually useful models is frequently beyond the means of a single PC even with a modern GPU), you will do better if you pay for computing time e.g. on Amazon or elsewhere - it is not too expensive, most machine learning frameworks support this and you get to train even large models that would take you weeks at home otherwise. But once again, you don't need any of this for scanning/reconstructing your place.
 
The following users thanked this post: cdev


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf