forked from pfmephisto/ReUseX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
47 lines (29 loc) · 988 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import os
import sys
import datetime
# import scipy
print(os.getpid())
print(datetime.datetime.now())
sys.path.insert(
0, '/home/mephisto/repos/linkml_cpp/build/')
import linkml_py
from linkml_py import *
print("LinkML-Py loaded")
def chunks(lst, n):
"""Yield successive n-sized chunks from lst."""
for i in range(0, len(lst), n):
yield lst[i:i + n]
#dataset = Dataset("/home/mephisto/server_data/stray_scans/7092626a22/")
#parse_dataset(dataset, "./clouds/", step=4)
#clouds = PointCloudsOnDisk("./one_room/")
#clouds = PointCloudsInMemory("./one_room/")
#for idx, subset in enumerate(chunks(clouds, 1000)):
# subset.annotate("./yolov8x-seg.onnx", dataset)
# print(f"Annotated {idx+1}th subset of {len(clouds)/1000} subsets")
#clouds.register()
#cloud = clouds.merge().downsample(0.02)
path = "./CPH_office_downsampled.pcd"
#path = "./one_room_downsampled.pcd"
PointCloud(path).clustering().save(path).display()
#clouds.display()
print("Done")