Page 1 of 1

Use GPU instead of CPU during training and classification

Posted: Wed Nov 22, 2023 12:43 pm
by SjorsJessen
Hi there,

Firstly, 3DMASC is a great plugin which has delivered us accurate results so far!

The one issue we've been running into is that during training or classification the main load seems to go to the CPU, resulting in very long waiting times where often CloudCompare freezes and in some cases even our machine.

So, I was wondering if somehow it's possible to put the load on the GPU instead of the CPU? Or if there are other configuration options which would speed up the process?

Thanks!

Kind regards,
Sjors Jessen

Re: Use GPU instead of CPU during training and classification

Posted: Wed Nov 22, 2023 9:51 pm
by daniel
Nope, sadly this algorithm cannot be transferred to the GPU...

And as for the speed-up, I guess a processor with more core might help?

Re: Use GPU instead of CPU during training and classification

Posted: Wed Dec 13, 2023 3:11 pm
by PablerasBCN
SjorsJessen wrote: Wed Nov 22, 2023 12:43 pm Hi there,

Firstly, 3DMASC is a great plugin which has delivered us accurate results so far!

The one issue we've been running into is that during training or classification the main load seems to go to the CPU, resulting in very long waiting times where often CloudCompare freezes and in some cases even our machine.

So, I was wondering if somehow it's possible to put the load on the GPU instead of the CPU? Or if there are other configuration options which would speed up the process?

Thanks!

Kind regards,
Sjors Jessen
could you please share an screenshot of the type of data yo're processing?

The times I tried I failed, I was only able to classify the tile I did use for training. I guess I used not the proper params and scales. Just if you could please share the type of data and may be the geoemtric features used. tx

Re: Use GPU instead of CPU during training and classification

Posted: Fri Jan 19, 2024 3:46 pm
by mletard
SjorsJessen wrote: Wed Nov 22, 2023 12:43 pm Hi there,

Firstly, 3DMASC is a great plugin which has delivered us accurate results so far!

The one issue we've been running into is that during training or classification the main load seems to go to the CPU, resulting in very long waiting times where often CloudCompare freezes and in some cases even our machine.

So, I was wondering if somehow it's possible to put the load on the GPU instead of the CPU? Or if there are other configuration options which would speed up the process?

Thanks!

Kind regards,
Sjors Jessen
Hi,
An option to speed up the process and not freeze your computer can also be to use 3DMASC in python for the training and application parts, and in the command line for feature computation.

Re: Use GPU instead of CPU during training and classification

Posted: Mon Feb 12, 2024 10:01 pm
by Dimitri
Hi,

The bottleneck at training is due to the random forest algorithm not being parallelized in the openCV library that we use. It's too bad because it's an algorithm that is well suited for parallelization, but there does not seem to be a project to get this part of the openCV library improved.

Now, so far we found that we don't need a lot of samples (i.e., 1000 per class) to get very good results, and not too many scales. But as Mathilde suggests, if your proficient in Python, just call 3DMASC in command line for the feature computation, and train with scikit learn where the random forest implementation is super fast

Cheers