Skip to content

Commit

Permalink
modif
Browse files Browse the repository at this point in the history
  • Loading branch information
adamvln committed May 14, 2024
1 parent 0523085 commit 114e188
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

# Text / html
*.csv
*.pkl
# *.txt
*.html
.blend
.*blend
# Geo data
*.gml
*.shp
Expand Down
8 changes: 6 additions & 2 deletions configs/config_Streetlights3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ConfigStreetlights3D:

batch_size = 3 # batch_size during training
val_batch_size = 16 # batch_size during validation and test
test_batch_size = 3 # batch_size during inference
test_batch_size = 16 # batch_size during inference
train_steps = 148 # Number of steps per epochs
val_steps = 4 # Number of validation steps per epoch

Expand All @@ -52,4 +52,8 @@ class ConfigStreetlights3D:
# Validation files, used in training step
val_files = ['bb_100', 'bb_111', 'bb_119', 'bb_130', 'bb_144', 'bb_148', 'bb_149', 'bb_160', 'bb_166', 'bb_167', 'bb_183', 'bb_184', 'bb_186', 'bb_193', 'bb_196', 'bb_202', 'bb_221', 'bb_231', 'bb_249', 'bb_25', 'bb_254', 'bb_256', 'bb_26', 'bb_268', 'bb_273', 'bb_286', 'bb_290', 'bb_31', 'bb_313', 'bb_325', 'bb_343', 'bb_363', 'bb_367', 'bb_370', 'bb_389', 'bb_403', 'bb_407', 'bb_411', 'bb_474', 'bb_484', 'bb_495', 'bb_501', 'bb_504', 'bb_507', 'bb_509', 'bb_51', 'bb_542', 'bb_551', 'bb_553', 'bb_59', 'bb_65', 'bb_75', 'bb_82', 'bb_91', 'bb_98']
#val_files for old data
# val_files = ['bb_119', 'bb_132', 'bb_136', 'bb_147', 'bb_152', 'bb_159', 'bb_161', 'bb_166', 'bb_170', 'bb_176', 'bb_177', 'bb_186', 'bb_196', 'bb_209', 'bb_212', 'bb_220', 'bb_227', 'bb_229', 'bb_230', 'bb_231', 'bb_236', 'bb_239', 'bb_270', 'bb_291', 'bb_315', 'bb_4', 'bb_44', 'bb_51', 'bb_52', 'bb_6', 'bb_62', 'bb_65', 'bb_68', 'bb_74']
# val_files = ['bb_119', 'bb_132', 'bb_136', 'bb_147', 'bb_152', 'bb_159', 'bb_161', 'bb_166', 'bb_170', 'bb_176', 'bb_177', 'bb_186', 'bb_196', 'bb_209', 'bb_212', 'bb_220', 'bb_227', 'bb_229', 'bb_230', 'bb_231', 'bb_236', 'bb_239', 'bb_270', 'bb_291', 'bb_315', 'bb_4', 'bb_44', 'bb_51', 'bb_52', 'bb_6', 'bb_62', 'bb_65', 'bb_68', 'bb_74']
#testing for new data
# val_files = ['bb_114', 'bb_122', 'bb_135', 'bb_15', 'bb_152', 'bb_16', 'bb_176', 'bb_204', 'bb_211', 'bb_23', 'bb_239', 'bb_244', 'bb_264', 'bb_269', 'bb_285', 'bb_291', 'bb_3', 'bb_319', 'bb_32', 'bb_320', 'bb_326', 'bb_328', 'bb_33', 'bb_334', 'bb_35', 'bb_352', 'bb_366', 'bb_371', 'bb_391', 'bb_395', 'bb_400', 'bb_401', 'bb_422', 'bb_43', 'bb_433', 'bb_443', 'bb_461', 'bb_467', 'bb_476', 'bb_479', 'bb_482', 'bb_487', 'bb_515', 'bb_516', 'bb_521', 'bb_523', 'bb_547', 'bb_559', 'bb_67', 'bb_69', 'bb_7', 'bb_77', 'bb_80', 'bb_88', 'bb_89', 'bb_99']

# val_files = ['bb_106', 'bb_11', 'bb_13', 'bb_137', 'bb_14', 'bb_142', 'bb_143', 'bb_144', 'bb_153', 'bb_189', 'bb_198', 'bb_208', 'bb_224', 'bb_235', 'bb_241', 'bb_244', 'bb_27', 'bb_272', 'bb_278', 'bb_281', 'bb_289', 'bb_290', 'bb_296', 'bb_310', 'bb_43', 'bb_48', 'bb_49', 'bb_57', 'bb_71', 'bb_83', 'bb_90', 'bb_93', 'bb_96']
2 changes: 1 addition & 1 deletion core/helpers/helper_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def grid_sub_sampling(points, features=None, labels=None, grid_size=0.1, verbose
def get_class_weights(dataset_name, class_weights):
# pre-calculate the number of points in each category
num_per_class = []
if dataset_name == 'Amsterdam3D' or dataset_name == 'AHNTrees':
if dataset_name == 'Amsterdam3D' or dataset_name == 'AHNTrees' or dataset_name == 'Streetlights3D' or dataset_name == 'Streetlights3D_val':
num_per_class = np.array(class_weights)
weight = num_per_class / float(sum(num_per_class))
ce_label_weight = 1 / (weight + 0.02)
Expand Down
1 change: 1 addition & 0 deletions core/models/RandLANet.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import numpy as np
import time
import sys
import os

BASE_DIR = dirname(abspath(__file__))
sys.path.append(BASE_DIR)
Expand Down
4 changes: 2 additions & 2 deletions src/compute_normals.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import open3d as o3d

# Define input and output directories
input_dir = "data/datasets_for_models/new_full_dataset/train/"
output_dir = "data/datasets_for_models/new_full_dataset_with_normals/train/"
input_dir = "data/train_val"
output_dir = "data/train_val_normals"

# Ensure the output directory exists
os.makedirs(output_dir, exist_ok=True)
Expand Down
Binary file not shown.
1 change: 1 addition & 0 deletions train_logs/log_train_RGBN_2024-05-14_14-08-13.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
****EPOCH 0****
7 changes: 7 additions & 0 deletions utils/compile_op copy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cd nearest_neighbors
python setup.py install --home="."
cd ../

cd cpp_wrappers
sh compile_wrappers.sh
cd ../../

0 comments on commit 114e188

Please sign in to comment.