diff --git a/cfg/GroundSegmentation.cfg b/cfg/GroundSegmentation.cfg
index b074ada0832caaeb941852e0c686657c1a80f027..6505d99ad9a14d68729b4a94ddec1e317fb56a22 100644
--- a/cfg/GroundSegmentation.cfg
+++ b/cfg/GroundSegmentation.cfg
@@ -68,6 +68,9 @@ gen.add("use_neural_network", bool_t, 0, "uses neural network to segmentate grou
 gen.add("extract_data_to_external_training_of_the_network", bool_t, 0, "Extract features to external file to train with Matlab", False);
 gen.add("dataset_filename_with_global_path",  str_t,  0, "name of the file where dump the features for neural net training in matlab", "");
 gen.add("neural_net_filename_with_global_path",  str_t,  0, "name of the file containing the neural net weights", "");
+gen.add("neural_net_number_of_features",    int_t,    0, "Size of the input layer", 9,  1, 100);
+gen.add("neural_net_number_of_neurons_in_hidden_layer",    int_t,    0, "Size of the hidden layer", 25,  1, 100);
+gen.add("neural_net_number_of_neurons_in_output_layer",    int_t,    0, "Size of the output layer", 2,   1, 100);
 
 # labeling parameters
 gen.add("max_pred_std_dev_for_labelling", double_t, 0, "To give up trying to label ground points if we don't have enough confidence in our predictions", 0.3, 0.01, 1.0);
diff --git a/params/iri_ground_segmentation.yaml b/params/iri_ground_segmentation.yaml
index 333ac40bd2f199fcae8de5811def8bf8833aafaa..d70c1265058182369b61b554499b80dd1da5b535 100644
--- a/params/iri_ground_segmentation.yaml
+++ b/params/iri_ground_segmentation.yaml
@@ -7,12 +7,12 @@ iri_ground_segmentation: {
 
   # Parameters affecting the exploration of the pointcloud
   ROI_delta_x_and_y: 3.0,    ## This value sets the size of the ROIs: ROI_size = (2*ROI_delta_x_and_y)^2
-  ROI_shadow_area: 5.5,     ## This value is the same that the above, but only used in the root vertex to overcome the shadow area
+  ROI_shadow_area: 5.5, #6.0, #5.5,     ## This value is the same that the above, but only used in the root vertex to overcome the shadow area
 
-  ground_reference_search_resolution_deg: 40.0, #12.00, ## It is the angular resolution when generating new ground references (graph nodes),
+  ground_reference_search_resolution_deg: 40.0, #20.0, #40 #12.00, ## It is the angular resolution when generating new ground references (graph nodes),
                                                         ## it will affect the number of nodes in the graph: lower values generate more nodes
 
-  elevation_grid_resolution: 2.1, #1.0 #0.5,   ## This value is used to create the "elevation point cloud" which is a reduction of the original pointcloud, where
+  elevation_grid_resolution: 2.1, #1.5, #2.1, #1.0 #0.5,   ## This value is used to create the "elevation point cloud" which is a reduction of the original pointcloud, where
                                           ## only the lowest z values in each cell are stored (along with a vector of indexes pointing to the remaining points
                                           ## in the cell, so that the original pointcloud can be recovered or labeled using the info in the "elevation cloud").
                                           ## Big values can speed up the algorithm but generates a lower resolution ground model, on the other hand, small values
@@ -38,14 +38,17 @@ iri_ground_segmentation: {
   # Neural Network related parameters
   use_neural_network: true,
   extract_data_to_external_training_of_the_network: false,
-  dataset_filename_with_global_path: '/home/idelpino/Documentos/dataset.txt',
-  neural_net_filename_with_global_path: '/media/sf_virtual_box_shared/ten_neurons_sse.csv',
+  dataset_filename_with_global_path: '/home/idelpino/Documentos/dataset_rgb_hsv_olbp_10_frame_inc.csv',
+  neural_net_filename_with_global_path: '/media/sf_virtual_box_shared/neural_networks/five_classes_13_features_39_neurons.csv',
+  neural_net_number_of_features: 13,
+  neural_net_number_of_neurons_in_hidden_layer: 39,
+  neural_net_number_of_neurons_in_output_layer: 5,
   
   # labeling parameters
   max_pred_std_dev_for_labelling: 0.5,                   ## ONLY IN USE TO GIVE COLOUR TO DENSE RECONSTRUCTION
   score_threshold: 0.0,                                  ## for assigning ground class label: one means maha. dist. equal to zero, zero means mahalanobis dist equal to maha. thres
   classify_not_labeled_points_as_obstacles: true,        ## when a point has no reference satisfying the max_pred_std_dev_for_labelling threshold we can leave as unknown or label it as obstacle
-  ground_threshold_in_not_analyzed_areas: 0.0,           ## when it is not possible to make a local analysis of the data, we will use the lowest point (the one in elevation_cloud) as ground height, and
+  ground_threshold_in_not_analyzed_areas: 0.1,           ## when it is not possible to make a local analysis of the data, we will use the lowest point (the one in elevation_cloud) as ground height, and
                                                          ## all the points above it and below this threshold will be classified as ground 
                                                          
   # visualization and debug parameters
diff --git a/src/ground_segmentation_alg_node.cpp b/src/ground_segmentation_alg_node.cpp
index 1b86f967b696eeec78e2f0407bebb601090bbf88..a79fb569f59ab8515d094a77726d126f6f86c2cd 100644
--- a/src/ground_segmentation_alg_node.cpp
+++ b/src/ground_segmentation_alg_node.cpp
@@ -151,6 +151,36 @@ GroundSegmentationAlgNode::GroundSegmentationAlgNode(void) :
     this->alg_.filtering_configuration_.neural_net_filename_with_global_path =
         config_.neural_net_filename_with_global_path;
 
+  if (!this->private_node_handle_.getParam("neural_net_number_of_features",
+                                           this->config_.neural_net_number_of_features))
+  {
+    ROS_WARN(
+        "GroundSegmentationAlgNode::GroundSegmentationAlgNode: param 'neural_net_number_of_features' not found");
+  }
+  else
+    this->alg_.filtering_configuration_.neural_net_number_of_features =
+        config_.neural_net_number_of_features;
+
+  if (!this->private_node_handle_.getParam("neural_net_number_of_neurons_in_hidden_layer",
+                                           this->config_.neural_net_number_of_neurons_in_hidden_layer))
+  {
+    ROS_WARN(
+        "GroundSegmentationAlgNode::GroundSegmentationAlgNode: param 'neural_net_number_of_neurons_in_hidden_layer' not found");
+  }
+  else
+    this->alg_.filtering_configuration_.neural_net_number_of_neurons_in_hidden_layer =
+        config_.neural_net_number_of_neurons_in_hidden_layer;
+
+  if (!this->private_node_handle_.getParam("neural_net_number_of_neurons_in_output_layer",
+                                           this->config_.neural_net_number_of_neurons_in_output_layer))
+  {
+    ROS_WARN(
+        "GroundSegmentationAlgNode::GroundSegmentationAlgNode: param 'neural_net_number_of_neurons_in_output_layer' not found");
+  }
+  else
+    this->alg_.filtering_configuration_.neural_net_number_of_neurons_in_output_layer =
+        config_.neural_net_number_of_neurons_in_output_layer;
+
   ////////////////// labeling parameters
   if (!this->private_node_handle_.getParam("max_pred_std_dev_for_labelling",
                                            this->config_.max_pred_std_dev_for_labelling))