Trimble Business Center

 View Only

 Train Custom Point Cloud Classification Models

Michal Rendla's profile image
Michal Rendla posted 04-22-2024 22:41

Hi,

 im trying to train my classification model for pointclouds. And always get a error message "Training process failed. I have 4 training files and 2 validation files. Can someone look at log file what am i doing wrong please. 

Thank you 

Michal

Albert Olivier's profile image
Albert Olivier

Hi Michal

Please reach out to me via my email, albert_olivier@trimble.com. I will assist you with this workflow as it's easier to do via email.

Regards

ian bissonnette's profile image
ian bissonnette

albert, i would be interested in hearing about this as well, if you don't mind sharing. currently we have been pretty happy with the new 'ai' classification that tbc has going. in fact i would say that this is the best enhancement we have seen ever from tbc (but we mostly run tbc for processing, not drafting or calculations). that being said i do not understand how we can leverage the ai out of tbc. is it in fact learning from all projects that everyone processes? or do we need to train it as michal is suggesting. or are there two styles of classifiers, one the ai style and one trained from projects that we submit to it. i know that other software like cloud compare has many classifiers and the user gets to choose which one to run, not really sure what tbc is doing?

again, so far the ai tbc is using seems great. i did run into one glitch when cleaning up a cloud, the selection tool would select the whole visible cloud when only a few points were selected and this inadvertently made me move more points to a class than i wanted to. and made cleanup take longer than needed to.

thanks

Taylor Carpenter's profile image
Taylor Carpenter

I am also in the process of attempting to train for new point cloud regions. However, you have to have training and validation files. For instance, we don't already have classification for exposed pipes say at a WWTP (wastewater treatment plant), so I'd like to train my data for that, but I don't have a large enough set of .las files to even attempt it. So, an archive where we could pitch in and submit data would be handy.

I believe I understand the process and seems simple enough to follow, I just can't complete the process with limited .las files.

Thanks ahead of time for any light you shed on it.

Brendon Edge's profile image
Brendon Edge

Taylor Carpenter - you could try with a few different slices of a single trench to train your Classification. E.g. if you had 10-20m of exposed pipe in a point cloud you could slice it up into 6-8 different segments and use them for your Training & Validation files. I had limited data for my first attempt at training the Classification and did the best I could with changing the saved Clouds a bit.  Ultimately you are training the AI to differentiate a feature from it's surrounds (or at least that's my simple-minds interpretation of what the AI is doing).

Pipe could be difficult though as it's so uniform and how well exposed it is will vary in a trench and based on your scan angles. 

I do like your idea about a repository for Sharing data too. Not sure how we easily facilitate that at this stage though.

Taylor Carpenter's profile image
Taylor Carpenter

I'm getting this in my Log File and am not sure what it means... But I can't go through the training process and am not sure what I need to do...

Traceback (most recent call last):
  File "<frozen __main__>", line 3, in <module>
  File "<frozen run_pipeline>", line 306, in <module>
regular arguments
addon_model: null
batch_size: null
cache_dir: null
cfg_dataset: null
cfg_file: C:\ProgramData\Trimble\PythonDL\training-env\ml3d/configs/fkaconv_customtraining_updated.yml
cfg_model: null
cfg_pipeline: null
ckpt_path: null
dataset: null
dataset_path: null
device: gpu
framework: tf
fused_model_path: null
gpus: 0
grid_size: null
label_map: null
label_smoothing: null
main_log_dir: null
max_epochs: null
mode: null
model: null
model_save_dir: null
pipeline: SemanticSegmentation
seed: 0
split: train
steps_per_epoch_train: null
test_files: null
train_files: null
extra arguments
{}
  File "<frozen run_pipeline>", line 95, in main_spawn
  File "<frozen run_pipeline>", line 176, in main
  File "<frozen models.fkaconv>", line 36, in __init__
  File "<frozen models.base_model>", line 20, in __init__
  File "C:\ProgramData\Trimble\PythonDL\training-env\Lib\site-packages\tensorflow\python\trackable\base.py", line 205, in _method_wrapper
    result = method(self, *args, **kwargs)
  File "C:\ProgramData\Trimble\PythonDL\training-env\Lib\site-packages\keras\utils\traceback_utils.py", line 70, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "C:\ProgramData\Trimble\PythonDL\training-env\Lib\site-packages\tensorflow\python\eager\context.py", line 622, in ensure_initialized
    context_handle = pywrap_tfe.TFE_NewContext(opts)
tensorflow.python.framework.errors_impl.InternalError: cudaGetDevice() failed. Status: initialization error

Brendon Edge's profile image
Brendon Edge

@Taylor Carpenter - I recall various similar errors when I attempted to use too little training data (I think I reused the same files for Training & Validation first time and it failed). The Webinar that the Product team put on was what I needed to see how to set up the Custom model correctly (file quantity and recommended settings). If you haven't seen that I recommend you do.

If you continue to have issues reach out to your Reseller. They can collect all the needed info and pass onto the Support team if that's what is required.