Code Monkey home page Code Monkey logo

claspy_t's People

Contributors

dependabot[bot] avatar laurent124 avatar trickypells avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ytkz11

claspy_t's Issues

Rewrite code with classes

Rewrite the basic of cLASpy_T (common.py, training.py, predict.py) using classes to have a more comprehensive code and easier to maintain.

Fenêtre d'accueil

enlever "about" car il est déjà en haut à gauche pour plus de lisibilité, corriger les addresses email de laurent et christophe

Bug: "run" button

First run with the "run" button. Did not get any results. Will try again with different examples.

C:\Users\laurent\AppData\Local\Programs\Python\Python38\python.exe G:/WORK/machine_learning/code_xavier_150720/cLASpy_T/cLASpy_GUI.py

Process finished with exit code -1073740791 (0xC0000409)

Estimator failed / Nan created

[laurent@hulk cLASpy_T-Formation-CNRS]$ source .venv/claspy_venv/bin/activate
(claspy_venv) [laurent@hulk cLASpy_T-Formation-CNRS]$ python cLASpy_T.py train --train_r=0.1 -a=gb -i=/home/laurent/machine/xavier_orne/130525_1Mpts.las -f=['Anisotropy_(5)','Anisotropy_(10)','Anisotropy_(25)','Anisotropy_(50)','Eigenentropy_(5)','Eigenentropy_(10)','Eigenentropy_(25)','Eigenentropy_(50)','Eigenvalues_sum_(5)','Eigenvalues_sum_(10)','Eigenvalues_sum_(25)','Eigenvalues_sum_(50)','linearity_(5)','linearity_(10)','linearity_(25)','linearity_(50)','Omnivariance_(5)','Omnivariance_(10)','Omnivariance_(25)','Omnivariance_(50)','PCA1_(5)','PCA1_(10)','PCA1_(25)','PCA1_(50)','PCA2_(5)','PCA2_(10)','PCA2_(25)','PCA2_(50)','Planarity_(5)','Planarity_(10)','Planarity_(25)','Planarity_(50)','Roughness_(5)','Roughness_(10)','Roughness_(25)','Roughness_(50)','Sphericity_(5)','Sphericity_(10)','Sphericity_(25)','Sphericity_(50)','Surface_variation_(5)','Surface_variation_(10)','Surface_variation_(25)','Surface_variation_(50)','Verticality_(5)','Verticality_(10)','Verticality_(25)','Verticality_(50)','Verticality_(5)','Verticality_(10)','Verticality_(25)','Verticality_(50)'] -p="{'n_estimators':100,'max_depth':20,'min_samples_leaf':100}"

####### POINT CLOUD CLASSIFICATION #######
Algorithm used: GradientBoostingClassifier
Path to LAS file: /home/laurent/machine/xavier_orne/130525_1Mpts.las

Create a new folder to store the result files... Folder already exists.

Step 1/7: Formatting data as pandas.Dataframe...
LAS Version: 1.2
LAS point format: 1
Number of points: 1,000,000
/home/laurent/machine/cLASpy_T-Formation-CNRS/common.py:276: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling frame.insert many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use newframe = frame.copy()
frame[dim] = las.get_reader().get_dimension(dim)

Get selected features:

  • Anisotropy_(5) asked --> Anisotropy_(5) found
  • Anisotropy_(10) asked --> Anisotropy_(10) found
  • Anisotropy_(25) asked --> Anisotropy_(25) found
  • Anisotropy_(50) asked --> Anisotropy_(50) found
  • Eigenentropy_(5) asked --> Eigenentropy_(5) found
  • Eigenentropy_(10) asked --> Eigenentropy_(10) found
  • Eigenentropy_(25) asked --> Eigenentropy_(25) found
  • Eigenentropy_(50) asked --> Eigenentropy_(50) found
  • Eigenvalues_sum_(5) asked --> Eigenvalues_sum_(5) found
  • Eigenvalues_sum_(10) asked --> Eigenvalues_sum_(10) found
  • Eigenvalues_sum_(25) asked --> Eigenvalues_sum_(25) found
  • Eigenvalues_sum_(50) asked --> Eigenvalues_sum_(50) found
  • linearity_(5) asked --> Linearity_(5) found
  • linearity_(10) asked --> Linearity_(10) found
  • linearity_(25) asked --> Linearity_(25) found
  • linearity_(50) asked --> Linearity_(50) found
  • Omnivariance_(5) asked --> Omnivariance_(5) found
  • Omnivariance_(10) asked --> Omnivariance_(10) found
  • Omnivariance_(25) asked --> Omnivariance_(25) found
  • Omnivariance_(50) asked --> Omnivariance_(50) found
  • PCA1_(5) asked --> PCA1_(5) found
  • PCA1_(10) asked --> PCA1_(10) found
  • PCA1_(25) asked --> PCA1_(25) found
  • PCA1_(50) asked --> PCA1_(50) found
  • PCA2_(5) asked --> PCA2_(5) found
  • PCA2_(10) asked --> PCA2_(10) found
  • PCA2_(25) asked --> PCA2_(25) found
  • PCA2_(50) asked --> PCA2_(50) found
  • Planarity_(5) asked --> Planarity_(5) found
  • Planarity_(10) asked --> Planarity_(10) found
  • Planarity_(25) asked --> Planarity_(25) found
  • Planarity_(50) asked --> Planarity_(50) found
  • Roughness_(5) asked --> Roughness_(5) found
  • Roughness_(10) asked --> Roughness_(10) found
  • Roughness_(25) asked --> Roughness_(25) found
  • Roughness_(50) asked --> Roughness_(50) found
  • Sphericity_(5) asked --> Sphericity_(5) found
  • Sphericity_(10) asked --> Sphericity_(10) found
  • Sphericity_(25) asked --> Sphericity_(25) found
  • Sphericity_(50) asked --> Sphericity_(50) found
  • Surface_variation_(5) asked --> Surface_variation_(5) found
  • Surface_variation_(10) asked --> Surface_variation_(10) found
  • Surface_variation_(25) asked --> Surface_variation_(25) found
  • Surface_variation_(50) asked --> Surface_variation_(50) found
  • Verticality_(5) asked --> Verticality_(5) found
  • Verticality_(10) asked --> Verticality_(10) found
  • Verticality_(25) asked --> Verticality_(25) found
  • Verticality_(50) asked --> Verticality_(50) found
  • Verticality_(5) asked --> Verticality_(5) found
  • Verticality_(10) asked --> Verticality_(10) found
  • Verticality_(25) asked --> Verticality_(25) found
  • Verticality_(50) asked --> Verticality_(50) found

Number of wanted features: 52
Number of final selected features: 52

--> All required features are present!

/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/pandas/core/generic.py:6392: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
return self._update_inplace(result)
/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/pandas/core/frame.py:5177: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
downcast=downcast,

Step 2/7: Splitting data in train and test sets...
Random_state to split data: 0
Number of used points: 1 000 000 pts
Size of train|test datasets: 100 000 pts | 900 000 pts

Step 3/7: Scaling data...

Step 4/7: Training model with cross validation...

Random_state for the StratifiedShuffleSplit: 0
[Parallel(n_jobs=-1)]: Using backend LokyBackend with 24 concurrent workers.
/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/model_selection/_validation.py:619: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details:
Traceback (most recent call last):
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/model_selection/_validation.py", line 598, in _fit_and_score
estimator.fit(X_train, y_train, **fit_params)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/pipeline.py", line 346, in fit
self._final_estimator.fit(Xt, y, **fit_params_last_step)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/ensemble/_gb.py", line 413, in fit
dtype=DTYPE, multi_output=True)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/base.py", line 433, in _validate_data
X, y = check_X_y(X, y, **check_params)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 878, in check_X_y
estimator=estimator)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 721, in check_array
allow_nan=force_all_finite == 'allow-nan')
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 106, in _assert_all_finite
msg_dtype if msg_dtype is not None else X.dtype)
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').

FitFailedWarning)
[CV] END .................................................... total time= 0.2s
/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/model_selection/_validation.py:619: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details:
Traceback (most recent call last):
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/model_selection/_validation.py", line 598, in _fit_and_score
estimator.fit(X_train, y_train, **fit_params)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/pipeline.py", line 346, in fit
self._final_estimator.fit(Xt, y, **fit_params_last_step)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/ensemble/_gb.py", line 413, in fit
dtype=DTYPE, multi_output=True)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/base.py", line 433, in _validate_data
X, y = check_X_y(X, y, **check_params)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 878, in check_X_y
estimator=estimator)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 721, in check_array
allow_nan=force_all_finite == 'allow-nan')
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 106, in _assert_all_finite
msg_dtype if msg_dtype is not None else X.dtype)
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').

FitFailedWarning)
[CV] END .................................................... total time= 0.2s
/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/model_selection/_validation.py:619: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details:
Traceback (most recent call last):
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/model_selection/_validation.py", line 598, in _fit_and_score
estimator.fit(X_train, y_train, **fit_params)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/pipeline.py", line 346, in fit
self._final_estimator.fit(Xt, y, **fit_params_last_step)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/ensemble/_gb.py", line 413, in fit
dtype=DTYPE, multi_output=True)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/base.py", line 433, in _validate_data
X, y = check_X_y(X, y, **check_params)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 878, in check_X_y
estimator=estimator)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 721, in check_array
allow_nan=force_all_finite == 'allow-nan')
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 106, in _assert_all_finite
msg_dtype if msg_dtype is not None else X.dtype)
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').

FitFailedWarning)
[CV] END .................................................... total time= 0.2s
[Parallel(n_jobs=-1)]: Done 3 out of 5 | elapsed: 2.1s remaining: 1.4s
/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/model_selection/_validation.py:619: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details:
Traceback (most recent call last):
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/model_selection/_validation.py", line 598, in _fit_and_score
estimator.fit(X_train, y_train, **fit_params)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/pipeline.py", line 346, in fit
self._final_estimator.fit(Xt, y, **fit_params_last_step)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/ensemble/_gb.py", line 413, in fit
dtype=DTYPE, multi_output=True)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/base.py", line 433, in _validate_data
X, y = check_X_y(X, y, **check_params)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 878, in check_X_y
estimator=estimator)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 721, in check_array
allow_nan=force_all_finite == 'allow-nan')
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 106, in _assert_all_finite
msg_dtype if msg_dtype is not None else X.dtype)
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').

FitFailedWarning)
[CV] END .................................................... total time= 0.2s
/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/model_selection/_validation.py:619: FitFailedWarning: Estimator fit failed. The score on this train-test partition for these parameters will be set to nan. Details:
Traceback (most recent call last):
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/model_selection/_validation.py", line 598, in _fit_and_score
estimator.fit(X_train, y_train, **fit_params)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/pipeline.py", line 346, in fit
self._final_estimator.fit(Xt, y, **fit_params_last_step)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/ensemble/_gb.py", line 413, in fit
dtype=DTYPE, multi_output=True)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/base.py", line 433, in _validate_data
X, y = check_X_y(X, y, **check_params)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 878, in check_X_y
estimator=estimator)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 721, in check_array
allow_nan=force_all_finite == 'allow-nan')
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 106, in _assert_all_finite
msg_dtype if msg_dtype is not None else X.dtype)
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').

FitFailedWarning)
[CV] END .................................................... total time= 0.2s
[Parallel(n_jobs=-1)]: Done 5 out of 5 | elapsed: 2.2s finished

    Training model scores with cross-validation:
    [nan nan nan nan nan]

Model trained!

Step 5/7: Creating confusion matrix...
Traceback (most recent call last):
File "cLASpy_T.py", line 300, in
args.func(args)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/training.py", line 520, in train
y_test_pred = model.predict(x_test)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/metaestimators.py", line 120, in
out = lambda *args, **kwargs: self.fn(obj, *args, **kwargs)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/pipeline.py", line 419, in predict
return self.steps[-1][-1].predict(Xt, **predict_params)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/ensemble/_gb.py", line 1188, in predict
raw_predictions = self.decision_function(X)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/ensemble/_gb.py", line 1143, in decision_function
X = check_array(X, dtype=DTYPE, order="C", accept_sparse='csr')
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 721, in check_array
allow_nan=force_all_finite == 'allow-nan')
File "/home/laurent/machine/cLASpy_T-Formation-CNRS/.venv/claspy_venv/lib64/python3.7/site-packages/sklearn/utils/validation.py", line 106, in _assert_all_finite
msg_dtype if msg_dtype is not None else X.dtype)
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').
(claspy_venv) [laurent@hulk cLASpy_T-Formation-CNRS]$

logo cLASpy_T ?

add a logo
suggestion: a snake (python) navigation through a point cloud !

ValueError: cannot reshape array of size 458 into shape (432468,)

Program stops at step " 2. Splitting data in train and test sets..."
"
Traceback (most recent call last):
File "cLASpy_T.py", line 212, in
samples=nbr_pts)
File "G:\WORK\machine_learning\code_xavier_150720\cLASpy_T\training.py", line 71, in split_dataset
target_train = target_train.reshape(train_size)
ValueError: cannot reshape array of size 458 into shape (432468,)
"

ValueError: seek out of range (Version LAS 1.4 not 1.2)

(claspy_venv) D:\Ayoub\cLaspy_T>python cLASpy_T.py predict -i "D:\Ayoub\4classe_nuage_de_points\MACHINE_Learning_4classes\211103_10Mpts_target_4classes.las" -m "D:\Ayoub\4classe_nuage_de_points\MACHINE_Learning_4classes\211103_300kpts_target_4classes\train_rf300kpts_0322_1339.model" -o "D:\Ayoub\4classe_nuage_de_points\MACHINE_Learning_4classes\nuage"

# # # # # # # # # cLASpy_T # # # # # # # # # # #

                • PREDICT MODE - - - - - - - - - -
        • Point Cloud Classification * * * * * *

Step 1/6: Loading model...

    Any PCA data to load from model.

Algorithm used: RandomForestClassifier
Path to LAS file: D:\Ayoub\4classe_nuage_de_points\MACHINE_Learning_4classes\211103_10Mpts_target_4classes.las

Create a new folder to store the result files... Folder already exists.

LAS Version: 1.4
LAS point format: 7
Number of points: 10,000,000

Step 2/6: Formatting data as pandas.DataFrame...

Get selected features: - B asked --> B found

  • G asked --> G found
  • Planarity_(0.05) asked --> Planarity_(0.05) found
  • Planarity_(0.5) asked --> Planarity_(0.5) found
  • Planarity_(1) asked --> Planarity_(1) found
  • R asked --> R found
  • Sphericity_(0.05) asked --> Sphericity_(0.05) found
  • Sphericity_(0.5) asked --> Sphericity_(0.5) found
  • Sphericity_(1) asked --> Sphericity_(1) found
  • Verticality_(0.05) asked --> Verticality_(0.05) found
  • Verticality_(0.5) asked --> Verticality_(0.5) found
  • Verticality_(1) asked --> Verticality_(1) found
  • Volume_density_(0.05) asked --> Volume_density_(0.05) found
  • Volume_density_(0.5) asked --> Volume_density_(0.5) found
  • Volume_density_(1) asked --> Volume_density_(1) found

Number of wanted features: 15
Number of final selected features: 15
--> All required features are present!

Step 3/6: Scaling data...

Scale dataset with Scaler transform

Step 4/6: Making predictions for entire dataset...

Target field find -> Create confusion matrix

          precision    recall  f1-score   support

     0.0       0.95      0.89      0.92   2284104
     1.0       0.91      0.96      0.94   3450827
     2.0       0.95      0.97      0.96   2793397
     3.0       0.93      0.87      0.90   1471672

accuracy                           0.93  10000000

macro avg 0.94 0.92 0.93 10000000
weighted avg 0.93 0.93 0.93 10000000

Step 5/6: Saving classified point cloud:
Traceback (most recent call last):
File "cLASpy_T.py", line 592, in
predict(args)
File "cLASpy_T.py", line 526, in predict
step5 = predicter.save_predictions(verbose=True)
File "D:\Ayoub\cLaspy_T\cLASpy_Classes.py", line 1142, in save_predictions
output_las = laspy.file.File(self.report_filename + '.las', mode="w", header=las.header)
File "D:\Ayoub\cLaspy_T.venv\claspy_venv\lib\site-packages\laspy\file.py", line 64, in init
self.open()
File "D:\Ayoub\cLaspy_T.venv\claspy_venv\lib\site-packages\laspy\file.py", line 121, in open
self._writer = base.Writer(self.filename, mode = "w",
File "D:\Ayoub\cLaspy_T.venv\claspy_venv\lib\site-packages\laspy\base.py", line 338, in init
self.setup_write(header, vlrs, evlrs)
File "D:\Ayoub\cLaspy_T.venv\claspy_venv\lib\site-packages\laspy\base.py", line 435, in setup_write
self.populate_evlrs()
File "D:\Ayoub\cLaspy_T.venv\claspy_venv\lib\site-packages\laspy\base.py", line 607, in populate_evlrs
self.seek(self.header.start_first_evlr, rel = False)
File "D:\Ayoub\cLaspy_T.venv\claspy_venv\lib\site-packages\laspy\base.py", line 529, in seek
self.data_provider._mmap.seek(bytes, 0)
ValueError: seek out of range

--n_jobs option

--n_jobs option does not respect the number of CPU chosen by the user.
Raised by Laurent124

Fenêtre d'accueil

Bug lorsque l'on coche "ne plus afficher la fenêtre"

Lors du prochain lancement, le logiciel plante à la ligne 312:
self.pythonPath = self.options_dict['python_path']

avec le message suivant dans le terminal

C:\Users\laurent\AppData\Local\Programs\Python\Python38\python.exe "C:\Program Files\JetBrains\PyCharm Community Edition 2019.2.1\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 63501 --file E:/Formation_CNRS/Contenu/cLASpy_T-dev/cLASpy_T-dev/cLASpy_GUI.py
pydev debugger: process 9860 is connecting

Connected to pydev debugger (build 192.7142.79)
Traceback (most recent call last):
File "E:/Formation_CNRS/Contenu/cLASpy_T-dev/cLASpy_T-dev/cLASpy_GUI.py", line 312, in init
self.pythonPath = self.options_dict['python_path']
KeyError: 'python_path'
Backend Qt5Agg is interactive backend. Turning interactive mode on.

Update README.md

Rewrite README.md according the changes made by the claspy_gui branch.

Error for prediction for data with no target field

Traceback (most recent call last):
    File "C:\Programs\cLASpy_T\cLASpy_T.py", line 593, in <module>
      predict(args)
    File "C:\Programs\cLASpy_T\cLASpy_T.py", line 512, in predict
      step2 = predicter.format_dataset(verbose=True)
    File "C:\Programs\cLASpy_T\cLASpy_Classes.py", line 810, in format_dataset
      self.data, self.target = self.load_data_las()
    File "C:\Programs\cLASpy_T\cLASpy_Classes.py", line 763, in load_data_las
      data.drop(columns=self.target_name, inplace=True)  # Drop target field from data
    File "c:\Users\Admin_Xav\Venvs\claspy_t\lib\site-packages\pandas\util\_decorators.py", line 311, in wrapper
      return func(*args, **kwargs)
    File "c:\Users\Admin_Xav\Venvs\claspy_t\lib\site-packages\pandas\core\frame.py", line 4957, in drop
      return super().drop(
    File "c:\Users\Admin_Xav\Venvs\claspy_t\lib\site-packages\pandas\core\generic.py", line 4259, in drop
      raise ValueError(
ValueError: Need to specify at least one of 'labels', 'index' or 'columns'

Slow-down due to config files

Launching a training with claspy_t with a config file took about 48h whereas the same run would last 4h30 using direct commands. I m attaching the config files (one with plot and one without) as well as the direct command line. I renamed the .json files into .txt files as github forbids uploading .json files.

[P2_cas23.txt](https://github.co
run23_command.txt
m/TrickyPells/cLASpy_T/files/8024732/P2_cas23.txt)
P2_cas23_no_plot.txt

Error with features when no feature selected

Step 1/7: Formatting data as pandas.Dataframe...
LAS Version: 1.2
LAS point format: 2
Number of points: 820,731
All features in input_data will be used!
Traceback (most recent call last):
File "cLASpy_T.py", line 300, in
args.func(args)
File "C:\cLASpy_T\training.py", line 432, in train
data, target = format_dataset(data_path, mode=mode, features=args.features)
File "C:\cLASpy_T\common.py", line 372, in format_dataset
selected_features.remove(field)
ValueError: list.remove(x): x not in list

n_jobs

while using RF with Gridsearch in tab_modes, n_jobs RF makes the program crash while using n_jobs_CV only works

Add requirements.txt

Add all required packages in requirements file to install all dependencies automatically with pip.

Error Loading CSV file

Step 1/7: Formatting data as pandas.DataFrame...
Traceback (most recent call last):
  File "cLASpy_T.py", line 591, in <module>
    train(args)
  File "cLASpy_T.py", line 444, in train
    step1 = trainer.format_dataset(verbose=True)
  File "D:\01-SAVED\Code_Source\Repositories\cLASpy_T\cLASpy_Classes.py", line 807, in format_dataset
    self.data, self.target = self.load_data_csv()
  File "D:\01-SAVED\Code_Source\Repositories\cLASpy_T\cLASpy_Classes.py", line 731, in load_data_csv
    target = pd.DataFrame.loc[:, self.target_name]  # use dtype uint8
TypeError: 'property' object is not subscriptable

List missing features

For Prediction, if one or more features are missing, the Warning Box could list all missing features.

Clash between feature importances and PCA

save_feature_importance() function try to plot Principal Component but only find the feature names. So it raises KeyError with the feature name of the number_components + 1.
"Traceback (most recent call last):
File "cLASpy_T.py", line 301, in

args.func(args)

File "D:\Code_Source\Repositories\cLASpy_T\training.py", line 517, in train
save_feature_importance(model, feature_names, feat_imp_filename)
File "D:\Code_Source\Repositories\cLASpy_T\common.py", line 651, in save_feature_importance
importances_sorted.append(feature_imp_dict[key])
KeyError: 'B'"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.