This commit is contained in:
hofee 2024-10-06 17:48:06 +08:00
parent 2af52c64e2
commit 8f96fae3ce
3 changed files with 21 additions and 21 deletions

View File

@ -28,8 +28,8 @@ runner:
datasets: datasets:
OmniObject3d: OmniObject3d:
#"/media/hofee/data/data/temp_output" #"/media/hofee/data/data/temp_output"
root_dir: "/media/hofee/repository/new_full_box_data" root_dir: "/media/hofee/data/tempdir/test_real_output"
model_dir: "/media/hofee/data/data/scaled_object_meshes" model_dir: "/media/hofee/data/tempdir/test_real"
from: 0 from: 0
to: -1 # -1 means end to: -1 # -1 means end
#output_dir: "/media/hofee/data/data/label_output" #output_dir: "/media/hofee/data/data/label_output"

View File

@ -8,11 +8,11 @@ runner:
root_dir: experiments root_dir: experiments
generate: generate:
port: 5004 port: 5004
from: 4000 from: 0
to: -1 # -1 means all to: 1 # -1 means all
object_dir: /media/hofee/data/data/scaled_object_meshes object_dir: /media/hofee/data/tempdir/test_real
table_model_path: /media/hofee/data/data/others/table.obj table_model_path: /media/hofee/data/data/others/table.obj
output_dir: /media/hofee/repository/new_data_with_normal output_dir: /media/hofee/data/tempdir/test_real_output
binocular_vision: true binocular_vision: true
plane_size: 10 plane_size: 10
max_views: 512 max_views: 512
@ -20,13 +20,13 @@ runner:
random_view_ratio: 0.2 random_view_ratio: 0.2
min_cam_table_included_degree: 20 min_cam_table_included_degree: 20
max_diag: 0.7 max_diag: 0.7
min_diag: 0.1 min_diag: 0.01
random_config: random_config:
display_table: display_table:
min_height: 0.05 min_height: 0.05
max_height: 0.15 max_height: 0.15
min_radius: 0.3 min_radius: 0.2
max_radius: 0.5 max_radius: 0.3
display_object: display_object:
min_x: 0 min_x: 0
max_x: 0.03 max_x: 0.03
@ -44,7 +44,7 @@ runner:
far_plane: 5 far_plane: 5
fov_vertical: 25 fov_vertical: 25
resolution: [1280,800] resolution: [1280,800]
eye_distance: 0.15 eye_distance: 0.10
eye_angle: 25 eye_angle: 25
Light: Light:
location: [0,0,3.5] location: [0,0,3.5]

View File

@ -67,7 +67,7 @@ def save_scene_data(root, scene, scene_idx=0, scene_total=1,file_type="txt"):
voxel_size=0.002 voxel_size=0.002
filter_degree = 75 filter_degree = 75
min_z = 0.2 min_z = 0.2
max_z = 0.45 max_z = 0.5
''' scan points ''' ''' scan points '''
display_table_info = DataLoadUtil.get_display_table_info(root, scene) display_table_info = DataLoadUtil.get_display_table_info(root, scene)
@ -138,16 +138,16 @@ def save_scene_data(root, scene, scene_idx=0, scene_total=1,file_type="txt"):
if __name__ == "__main__": if __name__ == "__main__":
#root = "/media/hofee/repository/new_data_with_normal" #root = "/media/hofee/repository/new_data_with_normal"
root = r"/media/hofee/repository/new_data_with_normal" root = r"/media/hofee/data/tempdir/test_real_output"
list_path = r"/media/hofee/repository/full_list.txt" # list_path = r"/media/hofee/repository/full_list.txt"
scene_list = [] # scene_list = []
with open(list_path, "r") as f: # with open(list_path, "r") as f:
for line in f: # for line in f:
scene_list.append(line.strip()) # scene_list.append(line.strip())
scene_list = os.listdir(root)
from_idx = 1000 from_idx = 0 # 1000
to_idx = 1500 to_idx = 1 # 1500
cnt = 0 cnt = 0
@ -155,7 +155,7 @@ if __name__ == "__main__":
total = to_idx - from_idx total = to_idx - from_idx
for scene in scene_list[from_idx:to_idx]: for scene in scene_list[from_idx:to_idx]:
start = time.time() start = time.time()
save_scene_data(root, scene, cnt, total, "npy") save_scene_data(root, scene, cnt, total, "txt")
cnt+=1 cnt+=1
end = time.time() end = time.time()
print(f"Time cost: {end-start}") print(f"Time cost: {end-start}")