Compare commits
3 Commits
d098c9f951
...
dc79f4b313
Author | SHA1 | Date | |
---|---|---|---|
dc79f4b313 | |||
4e170445dd | |||
9d6d36f5c2 |
@ -7,9 +7,9 @@ runner:
|
|||||||
name: debug
|
name: debug
|
||||||
root_dir: experiments
|
root_dir: experiments
|
||||||
generate:
|
generate:
|
||||||
port: 5002
|
port: 5004
|
||||||
from: 2200
|
from: 4000
|
||||||
to: 2300 # -1 means all
|
to: -1 # -1 means all
|
||||||
object_dir: /media/hofee/data/data/scaled_object_meshes
|
object_dir: /media/hofee/data/data/scaled_object_meshes
|
||||||
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/repository/new_data_with_normal
|
||||||
@ -49,4 +49,4 @@ runner:
|
|||||||
Light:
|
Light:
|
||||||
location: [0,0,3.5]
|
location: [0,0,3.5]
|
||||||
orientation: [0,0,0]
|
orientation: [0,0,0]
|
||||||
power: 150
|
power: 150
|
@ -74,7 +74,7 @@ def get_scan_points_indices(scan_points, mask, display_table_mask_label, cam_int
|
|||||||
return selected_points_indices
|
return selected_points_indices
|
||||||
|
|
||||||
|
|
||||||
def save_scene_data(root, scene, scene_idx=0, scene_total=1):
|
def save_scene_data(root, scene, scene_idx=0, scene_total=1,file_type="txt"):
|
||||||
|
|
||||||
''' configuration '''
|
''' configuration '''
|
||||||
target_mask_label = (0, 255, 0, 255)
|
target_mask_label = (0, 255, 0, 255)
|
||||||
@ -94,7 +94,11 @@ def save_scene_data(root, scene, scene_idx=0, scene_total=1):
|
|||||||
''' read frame data(depth|mask|normal) '''
|
''' read frame data(depth|mask|normal) '''
|
||||||
frame_num = DataLoadUtil.get_scene_seq_length(root, scene)
|
frame_num = DataLoadUtil.get_scene_seq_length(root, scene)
|
||||||
for frame_id in range(frame_num):
|
for frame_id in range(frame_num):
|
||||||
|
|
||||||
|
|
||||||
print(f"[scene({scene_idx}/{scene_total})|frame({frame_id}/{frame_num})]Processing {scene} frame {frame_id}")
|
print(f"[scene({scene_idx}/{scene_total})|frame({frame_id}/{frame_num})]Processing {scene} frame {frame_id}")
|
||||||
|
if frame_id != 126:
|
||||||
|
continue
|
||||||
path = DataLoadUtil.get_path(root, scene, frame_id)
|
path = DataLoadUtil.get_path(root, scene, frame_id)
|
||||||
cam_info = DataLoadUtil.load_cam_info(path, binocular=True)
|
cam_info = DataLoadUtil.load_cam_info(path, binocular=True)
|
||||||
depth_L, depth_R = DataLoadUtil.load_depth(
|
depth_L, depth_R = DataLoadUtil.load_depth(
|
||||||
@ -163,6 +167,8 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
from_idx = 0
|
from_idx = 0
|
||||||
to_idx = len(scene_list)
|
to_idx = len(scene_list)
|
||||||
|
|
||||||
|
|
||||||
cnt = 0
|
cnt = 0
|
||||||
import time
|
import time
|
||||||
total = to_idx - from_idx
|
total = to_idx - from_idx
|
||||||
@ -171,4 +177,4 @@ if __name__ == "__main__":
|
|||||||
save_scene_data(root, scene, cnt, total)
|
save_scene_data(root, scene, cnt, total)
|
||||||
cnt+=1
|
cnt+=1
|
||||||
end = time.time()
|
end = time.time()
|
||||||
print(f"Time cost: {end-start}")
|
print(f"Time cost: {end-start}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user