With the increases in GPU prices (and in some cases complete lack of availability) AND the increase in cost of RAM I’ve been wondering what the best way to proceed is for people who want to increase their Photoscan workflow. Moving from a computer with DDR3 RAM to a new processor that requires the new RAM can be a costly proposition, but so can buying a GPU.
I am processing more and more imagery by the week it seems, and processing time is becoming a bottleneck in my workflow. My current research has me taking multispectral imagery of pipeline right of ways to keep an eye out for signs of leaks, illicit access and wildlife movements. This has left me with about 40 sets of images to process after a single field day, they are not big image sets, but they are numerous. Decreasing processing time has a real impact on my weekly productivity because I typically spend upwards of 9 hours a week on nothing other than SfM processing. That’s about half of each office day working on nothing but image processing as I spend 2 days per week in the field collecting data. After that I still have reports to write, flight schedules to set up and meetings to attend.
My typical set right now is about 80 frames. Like I said, not a huge amount of images, but time consuming nonetheless. Like anyone who has a lot of similar image sets and constant output requirements, my first step to handling the deluge was writing a short script to automate the process. Then I got to thinking, I could modify that script to run repeatedly with different settings and using different GPU/CPU settings to process. My current primary machine is an Intel Core i7 5820k. I am lucky enough to have a few different graphics cards kicking around to test as well as another older (and much less powerful) AMD FX8320e based machine that I typically use as a Geodatabase server.
To determine the most cost effective route for upgrading a computer would be I decided to run the following tests on 3 different hardware configurations:
- Full process on CPU only.
- Full process with 1 GPU.
- Full process with dual GPUs.
The following hardware configurations were tested:
- AMD FX8320e with dual AMD RX480 4GB cards.
- Intel Core i7 5820k overclocked to 4GHz with dual AMD RX480 4GB cards.
- Intel Core i7 5820k overclocked to 4GHz with one nVidia GTX 1070ti and one AMD RX480 4GB.
The Python script I used to run these tests is located on my GitHub. You can download it here: https://github.com/tpubben/benchmarking
The test includes the full workflow from initial image alignment right through to the creation of an orthomosaic. I could have benchmarked individual parts of the process like dense cloud creation and image alignment that are more heavily influenced by GPU than they are by CPU performance, however that doesn’t give me a complete understanding of the overall time to complete my workflow.
I was rather surprised by the limited impact of having dual GPUs in my computer on the overall processing speed of the entire project. While this impact would likely be more significant on a larger dataset, for anything less than 200 photos I suspect that having multiple GPUs is more or less a waste of money. Particularly at this time when graphics card prices are so terribly inflated.
Furthermore, the much more expensive GTX1070ti made a difference, but not a huge one when it came to processing times. Each hardware configuration was tested 5 times and the average execution time was taken.
Time to process in seconds:
|Number of GPUs||5820k with 2 RX480s||5820k with GTX 1070ti and RX480||FX8320e with 2 RX480s|
|None||470.24 seconds||470.24 seconds||1191.79 seconds|
|One||263.75 seconds||233.3 seconds||726.24 seconds|
|Two||241.25 seconds||220.56 seconds||683.524 seconds|
As can be seen by the results of the testing, adding a single GPU to the process can cut processing times in half when paired with a fast processor, the improvement is still significant with the slower processor but not as pronounced. Also, it seems that there are rapidly diminishing returns when it comes to adding multiple GPUs.
For people on older processors, the single biggest improvement that can be made is moving to a newer, faster processor. The 5820k tested here is far from new but has roughly twice the compute performance as the FX8320e as per Passmark’s multi-core benchmarks but cuts processing time down to approximately 33% of that shown by the AMD chip. It is even faster than the AMD chip paired with a GPU.
Dense cloud and image alignment are most directly impacted by the addition of a GPU to the mix. However, a significant portion of the SfM process is still bound by CPU speed. Because of this, I can’t recommend just adding a GPU to an old processor. Particularly with the scarcity and price of them as of this writing (January 2018).
There are numerous things to consider when choosing an upgrade path right now. However, my recommendations are as follows:
- If you have a weak processor, moving to a faster one has a huge impact. The 5820k tested in this article is roughly equivalent to the relatively cheap AMD Ryzen 5 1600x in performance.
- If you can’t upgrade your processor but already have a decent graphics card (RX470 or better from AMD or GTX 1060 from nVidia), don’t bother adding another one or buying a faster one. Suffer through it until you can buy a faster processor.
- If you have a decent processor, adding a GPU can nearly double your performance, but again, adding a second one has very little improvement on most workflows.