Datasets:

Languages:
Afar
ArXiv:
License:
lifuguan commited on
Commit
4cae1a3
·
verified ·
1 Parent(s): 66b5f3b

Add files using upload-large-folder tool

Browse files
Files changed (50) hide show
  1. .vscode/launch.json +7 -0
  2. 00777c41d4/scene_iphone_metadata.npz +3 -0
  3. 00a231a370/scene_iphone_metadata.npz +3 -0
  4. 00dd871005/scene_iphone_metadata.npz +3 -0
  5. 01ce24e652/scene_iphone_metadata.npz +3 -0
  6. 020312de8d/scene_iphone_metadata.npz +3 -0
  7. 0271889ec0/scene_iphone_metadata.npz +3 -0
  8. 027cd6ea0f/scene_iphone_metadata.npz +3 -0
  9. 02c2ddee2a/scene_iphone_metadata.npz +3 -0
  10. 02f25e5fee/scene_iphone_metadata.npz +3 -0
  11. 033d0b9343/scene_iphone_metadata.npz +3 -0
  12. 036bce3393/scene_dslr_metadata.npz +3 -0
  13. 036bce3393/scene_iphone_metadata.npz +3 -0
  14. 0373d65cce/scene_iphone_metadata.npz +3 -0
  15. 0452249a1e/scene_iphone_metadata.npz +3 -0
  16. 04c23ccd1d/scene_iphone_metadata.npz +3 -0
  17. 04d0dc245b/scene_iphone_metadata.npz +3 -0
  18. 04df8734b7/scene_iphone_metadata.npz +3 -0
  19. 052d72e137/scene_iphone_metadata.npz +3 -0
  20. 053a94cf68/scene_iphone_metadata.npz +3 -0
  21. 05d3c8c6f0/scene_iphone_metadata.npz +3 -0
  22. 062e5a23a6/scene_iphone_metadata.npz +3 -0
  23. 0658da5bc0/scene_iphone_metadata.npz +3 -0
  24. 067e2e4e61/scene_iphone_metadata.npz +3 -0
  25. 06bd2cf800/scene_iphone_metadata.npz +3 -0
  26. 076c822ecc/scene_iphone_metadata.npz +3 -0
  27. 0796447f4b/scene_iphone_metadata.npz +3 -0
  28. 079a326597/scene_dslr_metadata.npz +3 -0
  29. 07e6f56969/scene_iphone_metadata.npz +3 -0
  30. 07f5b601ee/scene_dslr_metadata.npz +3 -0
  31. 086f09d6e3/scene_iphone_metadata.npz +3 -0
  32. 08bbbdcc3d/scene_dslr_metadata.npz +3 -0
  33. delete_tmp.py +21 -0
  34. error_scenes.txt +343 -0
  35. pth_2_npy.py +273 -0
  36. read_npy.py +46 -0
  37. read_png.py +11 -0
  38. remove_files.py +20 -0
  39. splits/1.txt +40 -0
  40. splits/2.txt +40 -0
  41. splits/3.txt +40 -0
  42. splits/4.txt +40 -0
  43. splits/5.txt +40 -0
  44. splits/6.txt +40 -0
  45. splits/7.txt +40 -0
  46. splits/nvs_sem_train.txt +230 -0
  47. splits/nvs_sem_val.txt +50 -0
  48. splits/nvs_test.txt +50 -0
  49. splits/sem_test.txt +50 -0
  50. splits/splits.py +30 -0
.vscode/launch.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ // 使用 IntelliSense 了解相关属性。
3
+ // 悬停以查看现有属性的描述。
4
+ // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": []
7
+ }
00777c41d4/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4c4795a58fe010d7ff581b753827989439a44462ab141adf67ad7fd448c7d493
3
+ size 243390
00a231a370/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3389ac721c2bc80e939ec4df73ba76ca0627fda180cc5984b3975dbc56540c32
3
+ size 153102
00dd871005/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c3e639f88bf7257aa3f0c21630ed9c9f00fd22ce8eada93f7a4665029c318a9
3
+ size 197190
01ce24e652/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e161a691e271fbc78d2e8e2e7df3d087ad920cd1d3d28d4964914924887bf17
3
+ size 414726
020312de8d/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a11b0e917898d055396fcabc36eb0b52714108164ef09e2d0d3495f92b36dfac
3
+ size 219894
0271889ec0/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc77a5b0a9d0b95b4325fc238a87df1bd8e2da2543f4fe0ad9274174d297e72c
3
+ size 309390
027cd6ea0f/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60881443ac38a2d5a3add917a222bf51bd63d66f7601107cc5754cad3a5b143e
3
+ size 366414
02c2ddee2a/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b387fc0ca4c714c2f46529ff7ae1bfeae6332a7784af7192f131328e90a5d3a4
3
+ size 86310
02f25e5fee/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:46d4f16044a5349c6c79b12787106a80c08604cc7f644a63d10706d42c5e0781
3
+ size 198510
033d0b9343/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a2fc728019ed0e73e406e76ac763b7f560c608fb7cb517533c9c809026d1a077
3
+ size 94230
036bce3393/scene_dslr_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7aed9eecd2ab8dca8b9bc9a76f2db2e2b7ba273fa180a226ce4b53df775cb420
3
+ size 196694
036bce3393/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28b266ecccf9a6fefe176d76a90dd9adfd417b66a42a15c14771923cd05d439a
3
+ size 168942
0373d65cce/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0abb6672bc1c122ecfceeabfeb7533710321dfb1e12812d4ed1ce8d83a8bcc48
3
+ size 130398
0452249a1e/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6898aa7af251b0cf98aa95190c872035c26164c25d2d8b3de36e42c584eef18f
3
+ size 215406
04c23ccd1d/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d488b2748a2761a28a3cf8417e2fe53a02e7784f7efce1fc9f99d0ccf309cbd
3
+ size 229926
04d0dc245b/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93a5224211067efa6210a260acf472dbf3680d71efed0eb2150dd77ec61fc140
3
+ size 72582
04df8734b7/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5458116bfdd00610bd795a350fb7b68725bd8209193d570efe5edf42c50489c7
3
+ size 310446
052d72e137/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1a8ae8462bc1712f069cb88a77cd9cfcd7caec0ca17ca5f3c1733978f715e9f
3
+ size 341862
053a94cf68/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:75ef953b501621eab7568eee2b130564ff49ae460be0284a6a19797bc5a2f26b
3
+ size 175806
05d3c8c6f0/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:452304cf2c67fc25b994345062be3b70256d174ddfb1dbc3da87210bc9f9177d
3
+ size 327342
062e5a23a6/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6eb42d016f5abf9fc4b67c367937e21b4ecdb59be866ff9232cba1a96cc6e1e2
3
+ size 165246
0658da5bc0/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5624a9de73ecf3c5bc5305f72b65e70a4bb358be029083ef4b31ea8e6b1f886c
3
+ size 192966
067e2e4e61/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3d18f5468c5059158dbf9486e22a6b632ef46e7fda9de71fa3192603b8987ffc
3
+ size 221478
06bd2cf800/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8de0d392d869d7b34574db1819a83d29c76e94e44d49cf23a84feae4f1c8ddc2
3
+ size 261078
076c822ecc/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:070278e22fa63a307ccbcbe39de16b332f6d12549cbbd125b3fdfad8424e6f2f
3
+ size 98454
0796447f4b/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:182d1c119ff722226993e67803662dac87c8d5cf6697d52e9e5be7500c549a3c
3
+ size 192438
079a326597/scene_dslr_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3bd9cc481887061cc0b2b5f855df9e9c6bc23ff55c00d09f4805c21caf3afe6f
3
+ size 77158
07e6f56969/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:61417b81f2cbe36095320db0373d1acdf2545a74436935a6d75c59a1474d72b8
3
+ size 120630
07f5b601ee/scene_dslr_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b10ff232dc9e3ecaf2f563e0eb1025186714a2e73244c204df84580ee046e4be
3
+ size 87078
086f09d6e3/scene_iphone_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:80ef3c7c4898166f90ada369fdd492053e30cf4ed21ce4e8001357be907d945f
3
+ size 195606
08bbbdcc3d/scene_dslr_metadata.npz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:377e21e8e49a6114d8ff8ea2754dc2f3e1dd61c10bf49500acf3a3ad868d3b2b
3
+ size 69222
delete_tmp.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ def delete_tmp_npy(root_dir="."):
4
+ """
5
+ 遍历 root_dir 下所有文件,删除以 `.tmp.npy` 结尾的残留文件
6
+ """
7
+ deleted = 0
8
+ for dirpath, _, filenames in os.walk(root_dir):
9
+ for file in filenames:
10
+ if file.endswith(".tmp.npy"):
11
+ full_path = os.path.join(dirpath, file)
12
+ try:
13
+ os.remove(full_path)
14
+ print(f"🗑️ 删除: {full_path}")
15
+ deleted += 1
16
+ except Exception as e:
17
+ print(f"❌ 删除失败: {full_path}, 原因: {e}")
18
+ print(f"\n完成清理,共删除 {deleted} 个 .tmp.npy 文件")
19
+
20
+ if __name__ == "__main__":
21
+ delete_tmp_npy(".")
error_scenes.txt ADDED
@@ -0,0 +1,343 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 00a231a370 [Errno 2] No such file or directory: '/mnt/juicefs/datasets/vanilla_scannetpp/scannetpp_v2/data/00a231a370/iphone/rgb_masks/frame_006050.png'
2
+ 00dd871005 [Errno 2] No such file or directory: '/mnt/juicefs/datasets/vanilla_scannetpp/scannetpp_v2/data/00dd871005/iphone/rgb_masks/frame_000040.png'
3
+ c29b5e479c GLError(
4
+ err = 1281,
5
+ baseOperation = glBufferData,
6
+ pyArgs = (
7
+ GL_ARRAY_BUFFER,
8
+ 3278864160,
9
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
10
+ 1. ], shape=(819716040,), dtype...,
11
+ GL_STATIC_DRAW,
12
+ ),
13
+ cArgs = (
14
+ GL_ARRAY_BUFFER,
15
+ 3278864160,
16
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
17
+ 1. ], shape=(819716040,), dtype...,
18
+ GL_STATIC_DRAW,
19
+ ),
20
+ cArguments = (
21
+ GL_ARRAY_BUFFER,
22
+ 3278864160,
23
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
24
+ 1. ], shape=(819716040,), dtype...,
25
+ GL_STATIC_DRAW,
26
+ )
27
+ )
28
+ 00a231a370 [Errno 2] No such file or directory: '/mnt/juicefs/datasets/vanilla_scannetpp/scannetpp_v2/data/00a231a370/iphone/rgb_masks/frame_006050.png'
29
+ 00dd871005 [Errno 2] No such file or directory: '/mnt/juicefs/datasets/vanilla_scannetpp/scannetpp_v2/data/00dd871005/iphone/rgb_masks/frame_000040.png'
30
+ c29b5e479c GLError(
31
+ err = 1281,
32
+ baseOperation = glBufferData,
33
+ pyArgs = (
34
+ GL_ARRAY_BUFFER,
35
+ 3278864160,
36
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
37
+ 1. ], shape=(819716040,), dtype...,
38
+ GL_STATIC_DRAW,
39
+ ),
40
+ cArgs = (
41
+ GL_ARRAY_BUFFER,
42
+ 3278864160,
43
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
44
+ 1. ], shape=(819716040,), dtype...,
45
+ GL_STATIC_DRAW,
46
+ ),
47
+ cArguments = (
48
+ GL_ARRAY_BUFFER,
49
+ 3278864160,
50
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
51
+ 1. ], shape=(819716040,), dtype...,
52
+ GL_STATIC_DRAW,
53
+ )
54
+ )
55
+ c29b5e479c GLError(
56
+ err = 1281,
57
+ baseOperation = glBufferData,
58
+ pyArgs = (
59
+ GL_ARRAY_BUFFER,
60
+ 3278864160,
61
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
62
+ 1. ], shape=(819716040,), dtype...,
63
+ GL_STATIC_DRAW,
64
+ ),
65
+ cArgs = (
66
+ GL_ARRAY_BUFFER,
67
+ 3278864160,
68
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
69
+ 1. ], shape=(819716040,), dtype...,
70
+ GL_STATIC_DRAW,
71
+ ),
72
+ cArguments = (
73
+ GL_ARRAY_BUFFER,
74
+ 3278864160,
75
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
76
+ 1. ], shape=(819716040,), dtype...,
77
+ GL_STATIC_DRAW,
78
+ )
79
+ )
80
+ c29b5e479c GLError(
81
+ err = 1281,
82
+ baseOperation = glBufferData,
83
+ pyArgs = (
84
+ GL_ARRAY_BUFFER,
85
+ 3278864160,
86
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
87
+ 1. ], shape=(819716040,), dtype...,
88
+ GL_STATIC_DRAW,
89
+ ),
90
+ cArgs = (
91
+ GL_ARRAY_BUFFER,
92
+ 3278864160,
93
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
94
+ 1. ], shape=(819716040,), dtype...,
95
+ GL_STATIC_DRAW,
96
+ ),
97
+ cArguments = (
98
+ GL_ARRAY_BUFFER,
99
+ 3278864160,
100
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
101
+ 1. ], shape=(819716040,), dtype...,
102
+ GL_STATIC_DRAW,
103
+ )
104
+ )
105
+ c29b5e479c GLError(
106
+ err = 1281,
107
+ baseOperation = glBufferData,
108
+ pyArgs = (
109
+ GL_ARRAY_BUFFER,
110
+ 3278864160,
111
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
112
+ 1. ], shape=(819716040,), dtype...,
113
+ GL_STATIC_DRAW,
114
+ ),
115
+ cArgs = (
116
+ GL_ARRAY_BUFFER,
117
+ 3278864160,
118
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
119
+ 1. ], shape=(819716040,), dtype...,
120
+ GL_STATIC_DRAW,
121
+ ),
122
+ cArguments = (
123
+ GL_ARRAY_BUFFER,
124
+ 3278864160,
125
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
126
+ 1. ], shape=(819716040,), dtype...,
127
+ GL_STATIC_DRAW,
128
+ )
129
+ )
130
+ c29b5e479c startswith first arg must be bytes or a tuple of bytes, not str
131
+ c29b5e479c GLError(
132
+ err = 1281,
133
+ baseOperation = glBufferData,
134
+ pyArgs = (
135
+ GL_ARRAY_BUFFER,
136
+ 3278864160,
137
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
138
+ 1. ], shape=(819716040,), dtype...,
139
+ GL_STATIC_DRAW,
140
+ ),
141
+ cArgs = (
142
+ GL_ARRAY_BUFFER,
143
+ 3278864160,
144
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
145
+ 1. ], shape=(819716040,), dtype...,
146
+ GL_STATIC_DRAW,
147
+ ),
148
+ cArguments = (
149
+ GL_ARRAY_BUFFER,
150
+ 3278864160,
151
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
152
+ 1. ], shape=(819716040,), dtype...,
153
+ GL_STATIC_DRAW,
154
+ )
155
+ )
156
+ c29b5e479c GLError(
157
+ err = 1281,
158
+ baseOperation = glBufferData,
159
+ pyArgs = (
160
+ GL_ARRAY_BUFFER,
161
+ 3278864160,
162
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
163
+ 1. ], shape=(819716040,), dtype...,
164
+ GL_STATIC_DRAW,
165
+ ),
166
+ cArgs = (
167
+ GL_ARRAY_BUFFER,
168
+ 3278864160,
169
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
170
+ 1. ], shape=(819716040,), dtype...,
171
+ GL_STATIC_DRAW,
172
+ ),
173
+ cArguments = (
174
+ GL_ARRAY_BUFFER,
175
+ 3278864160,
176
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
177
+ 1. ], shape=(819716040,), dtype...,
178
+ GL_STATIC_DRAW,
179
+ )
180
+ )
181
+ c29b5e479c GLError(
182
+ err = 1281,
183
+ description = b'invalid value',
184
+ baseOperation = glBufferData,
185
+ pyArgs = (
186
+ GL_ARRAY_BUFFER,
187
+ 3278864160,
188
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
189
+ 1. ], shape=(819716040,), dtype...,
190
+ GL_STATIC_DRAW,
191
+ ),
192
+ cArgs = (
193
+ GL_ARRAY_BUFFER,
194
+ 3278864160,
195
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
196
+ 1. ], shape=(819716040,), dtype...,
197
+ GL_STATIC_DRAW,
198
+ ),
199
+ cArguments = (
200
+ GL_ARRAY_BUFFER,
201
+ 3278864160,
202
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
203
+ 1. ], shape=(819716040,), dtype...,
204
+ GL_STATIC_DRAW,
205
+ )
206
+ )
207
+ c29b5e479c GLError(
208
+ err = 1281,
209
+ description = b'invalid value',
210
+ baseOperation = glBufferData,
211
+ pyArgs = (
212
+ GL_ARRAY_BUFFER,
213
+ 3278864160,
214
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
215
+ 1. ], dtype=float32),
216
+ GL_STATIC_DRAW,
217
+ ),
218
+ cArgs = (
219
+ GL_ARRAY_BUFFER,
220
+ 3278864160,
221
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
222
+ 1. ], dtype=float32),
223
+ GL_STATIC_DRAW,
224
+ ),
225
+ cArguments = (
226
+ GL_ARRAY_BUFFER,
227
+ 3278864160,
228
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
229
+ 1. ], dtype=float32),
230
+ GL_STATIC_DRAW,
231
+ )
232
+ )
233
+ c29b5e479c GLError(
234
+ err = 1281,
235
+ description = b'invalid value',
236
+ baseOperation = glBufferData,
237
+ pyArgs = (
238
+ GL_ARRAY_BUFFER,
239
+ 3278864160,
240
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
241
+ 1. ], dtype=float32),
242
+ GL_STATIC_DRAW,
243
+ ),
244
+ cArgs = (
245
+ GL_ARRAY_BUFFER,
246
+ 3278864160,
247
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
248
+ 1. ], dtype=float32),
249
+ GL_STATIC_DRAW,
250
+ ),
251
+ cArguments = (
252
+ GL_ARRAY_BUFFER,
253
+ 3278864160,
254
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
255
+ 1. ], dtype=float32),
256
+ GL_STATIC_DRAW,
257
+ )
258
+ )
259
+ c29b5e479c GLError(
260
+ err = 1281,
261
+ description = b'invalid value',
262
+ baseOperation = glBufferData,
263
+ pyArgs = (
264
+ GL_ARRAY_BUFFER,
265
+ 3278864160,
266
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
267
+ 1. ], shape=(819716040,), dtype...,
268
+ GL_STATIC_DRAW,
269
+ ),
270
+ cArgs = (
271
+ GL_ARRAY_BUFFER,
272
+ 3278864160,
273
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
274
+ 1. ], shape=(819716040,), dtype...,
275
+ GL_STATIC_DRAW,
276
+ ),
277
+ cArguments = (
278
+ GL_ARRAY_BUFFER,
279
+ 3278864160,
280
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
281
+ 1. ], shape=(819716040,), dtype...,
282
+ GL_STATIC_DRAW,
283
+ )
284
+ )
285
+ c29b5e479c GLError(
286
+ err = 1281,
287
+ description = b'invalid value',
288
+ baseOperation = glBufferData,
289
+ pyArgs = (
290
+ GL_ARRAY_BUFFER,
291
+ 3278864160,
292
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
293
+ 1. ], shape=(819716040,), dtype...,
294
+ GL_STATIC_DRAW,
295
+ ),
296
+ cArgs = (
297
+ GL_ARRAY_BUFFER,
298
+ 3278864160,
299
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
300
+ 1. ], shape=(819716040,), dtype...,
301
+ GL_STATIC_DRAW,
302
+ ),
303
+ cArguments = (
304
+ GL_ARRAY_BUFFER,
305
+ 3278864160,
306
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
307
+ 1. ], shape=(819716040,), dtype...,
308
+ GL_STATIC_DRAW,
309
+ )
310
+ )
311
+ c29b5e479c No module named 'fast_simplification'
312
+ c29b5e479c You may specify ``target_reduction`` or ``target_count``, but not both
313
+ c29b5e479c Trimesh.simplify_quadric_decimation() got an unexpected keyword argument 'target_count'
314
+ c29b5e479c ``target_reduction`` must be between 0 and 1
315
+ c29b5e479c You may specify ``target_reduction`` or ``target_count``, but not both
316
+ c29b5e479c ``target_reduction`` must be between 0 and 1
317
+ c29b5e479c name 'pyrender_scene' is not defined
318
+ c29b5e479c GLError(
319
+ err = 1281,
320
+ description = b'invalid value',
321
+ baseOperation = glBufferData,
322
+ pyArgs = (
323
+ GL_ARRAY_BUFFER,
324
+ 3278864160,
325
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
326
+ 1. ], shape=(819716040,), dtype...,
327
+ GL_STATIC_DRAW,
328
+ ),
329
+ cArgs = (
330
+ GL_ARRAY_BUFFER,
331
+ 3278864160,
332
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
333
+ 1. ], shape=(819716040,), dtype...,
334
+ GL_STATIC_DRAW,
335
+ ),
336
+ cArguments = (
337
+ GL_ARRAY_BUFFER,
338
+ 3278864160,
339
+ array([1.4931395 , 9.968557 , 5.0007644 , ..., 0.65882355, 0.8901961 ,
340
+ 1. ], shape=(819716040,), dtype...,
341
+ GL_STATIC_DRAW,
342
+ )
343
+ )
pth_2_npy.py ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import numpy as np
4
+ import torch
5
+ from concurrent.futures import ProcessPoolExecutor, as_completed
6
+ from functools import partial
7
+ from collections import deque
8
+ from tqdm import tqdm
9
+
10
+ # 用 imageio 保存 PNG(支持 8/16 bit)
11
+ import imageio.v2 as imageio
12
+
13
+ def _register_torch_safe_globals():
14
+ """
15
+ 兼容老的 .pth:torch>=2.6 在 weights_only/安全反序列化下,
16
+ 一些历史 .pth 会引用 numpy 的内部对象(如 numpy.core.multiarray._reconstruct)。
17
+ 这里把这些对象加入 torch 的安全白名单后再重试加载。
18
+ """
19
+ try:
20
+ from torch.serialization import add_safe_globals
21
+ except Exception:
22
+ return
23
+ import importlib
24
+ candidates = []
25
+ for dotted in (
26
+ "numpy.core.multiarray._reconstruct",
27
+ "numpy._core.multiarray._reconstruct",
28
+ ):
29
+ try:
30
+ mod_path, attr = dotted.rsplit(".", 1)
31
+ mod = importlib.import_module(mod_path)
32
+ obj = getattr(mod, attr, None)
33
+ if obj is not None:
34
+ candidates.append(obj)
35
+ except Exception:
36
+ pass
37
+ if candidates:
38
+ try:
39
+ add_safe_globals(candidates)
40
+ except Exception:
41
+ pass
42
+
43
+ def extract_array(obj):
44
+ """从 pth 中提取 numpy 数组(tensor / ndarray / dict / list)"""
45
+ if isinstance(obj, torch.Tensor):
46
+ return obj.detach().cpu().numpy()
47
+ elif isinstance(obj, np.ndarray):
48
+ return obj
49
+ elif isinstance(obj, dict):
50
+ for v in obj.values():
51
+ arr = extract_array(v)
52
+ if arr is not None:
53
+ return arr
54
+ elif isinstance(obj, (list, tuple)):
55
+ items = [extract_array(x) for x in obj]
56
+ try:
57
+ if all(isinstance(x, np.ndarray) for x in items if x is not None):
58
+ return np.stack(items)
59
+ except Exception:
60
+ pass
61
+ return np.array(items, dtype=object)
62
+ return None
63
+
64
+ def _to_hw_or_hwc(arr: np.ndarray) -> np.ndarray:
65
+ """
66
+ 尽量把任意形状的数组转成 HxW 或 HxWxC 以便存 PNG。
67
+ 规则:
68
+ - 去掉所有长度为1的维度(squeeze)
69
+ - (C,H,W) -> (H,W,C)
70
+ - (H,W,1) -> (H,W)
71
+ - 前面都不满足:如果维度>3,优先取前面的第一个切片直到<=3维
72
+ """
73
+ a = np.array(arr) # 拷贝一层引用
74
+ # 先 squeeze
75
+ a = np.squeeze(a)
76
+ # 若仍然超过3维,逐步取第0索引切片直到<=3维
77
+ while a.ndim > 3:
78
+ a = a[0]
79
+ a = np.squeeze(a)
80
+ # (C,H,W) -> (H,W,C)
81
+ if a.ndim == 3 and a.shape[0] in (1, 3):
82
+ a = np.transpose(a, (1, 2, 0))
83
+ # (H,W,1) -> (H,W)
84
+ if a.ndim == 3 and a.shape[2] == 1:
85
+ a = a[:, :, 0]
86
+ # 最终只接受 2D 或 3D(HWC);否则再硬切
87
+ if a.ndim == 0:
88
+ a = a.reshape(1, 1)
89
+ elif a.ndim == 1:
90
+ # 1D 转成“条形图”
91
+ a = a.reshape(1, -1)
92
+ return a
93
+
94
+ def _to_png_dtype(a: np.ndarray) -> (np.ndarray, str):
95
+ """
96
+ 将任意数值数组转为 PNG 友好 dtype:
97
+ - 若是整数:
98
+ * max<=255 -> uint8
99
+ * max<=65535 -> uint16(单通道/多通道 imageio 通常也能写)
100
+ * 其余 -> clip 到 16位并转 uint16
101
+ - 若是浮点:
102
+ * 若 min>=0 且 max<=1 -> 直接 0..1 线性放大为 0..255 uint8
103
+ * 否则 min/max 归一化到 0..255(全常数则全0)
104
+ - 若是 bool -> uint8(0/255)
105
+ 返回:(数组, '8bit' or '16bit')
106
+ """
107
+ a = np.asarray(a)
108
+
109
+ # 布尔
110
+ if a.dtype == np.bool_:
111
+ return (a.astype(np.uint8) * 255, "8bit")
112
+
113
+ # 整数
114
+ if np.issubdtype(a.dtype, np.integer):
115
+ maxv = int(a.max()) if a.size else 0
116
+ minv = int(a.min()) if a.size else 0
117
+ if maxv <= 65535 and minv >= 0:
118
+ return (a.astype(np.uint16), "16bit")
119
+ else:
120
+ # 夹到 [0, 65535] 再转 16bit
121
+ a = np.clip(a, 0, 65535).astype(np.uint16)
122
+ return (a, "16bit")
123
+
124
+ # 其他类型,转 uint8(尽力而为)
125
+ return (a.astype(np.uint8, copy=False), "16bit")
126
+
127
+ def _pth_to_png_path(pth_path: str) -> str:
128
+ """
129
+ 将 .../frame_XXXXX.jpg.pth -> .../frame_XXXXX.png
130
+ 其他 .../xxx.pth -> .../xxx.png
131
+ """
132
+ base = os.path.splitext(pth_path)[0] # 去掉 .pth
133
+ # 去掉 .jpg / .jpeg 尾巴
134
+ for ext in (".jpg", ".jpeg", ".JPG", ".JPEG"):
135
+ if base.endswith(ext):
136
+ base = base[: -len(ext)]
137
+ break
138
+ return base + ".png"
139
+
140
+ def process_one_to_png(pth_path: str, overwrite: bool, weights_only: bool):
141
+ """
142
+ 子进程:加载 pth -> 提取 -> 保存 PNG(直接保存在源目录,命名同上)
143
+ """
144
+ try:
145
+ png_path = _pth_to_png_path(pth_path)
146
+ if (not overwrite) and os.path.exists(png_path):
147
+ return (pth_path, png_path, "skip-exist", None)
148
+
149
+ # 加载 .pth(兼容处理)
150
+ try:
151
+ data = torch.load(pth_path, map_location="cpu", weights_only=weights_only)
152
+ except TypeError:
153
+ data = torch.load(pth_path, map_location="cpu")
154
+ except Exception as e1:
155
+ _register_torch_safe_globals()
156
+ try:
157
+ data = torch.load(pth_path, map_location="cpu", weights_only=False)
158
+ except Exception as e2:
159
+ return (pth_path, png_path, "fail", f"{type(e1).__name__}: {e1} | fallback: {type(e2).__name__}: {e2}")
160
+
161
+ arr = extract_array(data)
162
+ if arr is None:
163
+ return (pth_path, png_path, "no-array", None)
164
+
165
+ # 变成可保存的 HxW 或 HxWxC
166
+ img = _to_hw_or_hwc(arr)
167
+ # 转到 8bit/16bit 合理类型
168
+ img, bit = _to_png_dtype(img)
169
+
170
+ # 确保目录存在(一般是原目录,稳妥起见保留)
171
+ os.makedirs(os.path.dirname(png_path) or ".", exist_ok=True)
172
+
173
+ # 保存 PNG
174
+ imageio.imwrite(png_path, img)
175
+
176
+ shape_info = img.shape if hasattr(img, "shape") else None
177
+ return (pth_path, png_path, "ok", f"{shape_info}, {bit}")
178
+ except Exception as e:
179
+ return (pth_path, "", "fail", str(e))
180
+
181
+ def collect_pth_files(root_dir="."):
182
+ """
183
+ 收集所有 obj_ids 目录下的 *.pth(直接在源目录保存 PNG)
184
+ """
185
+ paths = []
186
+ for dirpath, dirnames, filenames in os.walk(root_dir):
187
+ if os.path.basename(dirpath) == "refined_ins_ids":
188
+ for file in filenames:
189
+ if file.endswith(".pth"):
190
+ paths.append(os.path.join(dirpath, file))
191
+ return paths
192
+
193
+ if __name__ == "__main__":
194
+ root_dir = "."
195
+ max_workers = max(1, os.cpu_count() // 2) # 并发进程数
196
+ inflight_factor = 8 # 每个进程的在飞任务基数
197
+ max_inflight = max_workers * inflight_factor
198
+ weights_only = False # 兼容性优先;如需更安全可设 True
199
+ overwrite = False # 不覆盖已存在 PNG
200
+
201
+ pth_list = collect_pth_files(root_dir)
202
+ if not pth_list:
203
+ print("未找到任何 obj_ids/*.pth 任务")
204
+ sys.exit(0)
205
+
206
+ # 预过滤:跳过已存在 PNG
207
+ pending = []
208
+ pre_skipped = 0
209
+ for p in pth_list:
210
+ target = _pth_to_png_path(p)
211
+ if (not overwrite) and os.path.exists(target):
212
+ pre_skipped += 1
213
+ else:
214
+ pending.append(p)
215
+
216
+ if not pending:
217
+ print(f"全部已存在 PNG,无需处理(共 {len(pth_list)} 个,预跳过 {pre_skipped} 个)。")
218
+ sys.exit(0)
219
+
220
+ print(f"共 {len(pth_list)} 个 .pth,其中待处理 {len(pending)} 个,预跳过 {pre_skipped} 个;"
221
+ f"使用 {max_workers} 个进程并行转换…")
222
+ # 展示前 5 个待处理任务
223
+ preview = 5
224
+ for i, pp in enumerate(pending[:preview], 1):
225
+ print(f" [{i}] {pp} -> {_pth_to_png_path(pp)}")
226
+ if len(pending) > preview:
227
+ print(f" ... 其余 {len(pending)-preview} 个略")
228
+
229
+ fn = partial(process_one_to_png, overwrite=overwrite, weights_only=weights_only)
230
+
231
+ ok = skip = fail = noarr = 0
232
+ task_queue = deque(pending)
233
+ inflight = set()
234
+
235
+ with ProcessPoolExecutor(max_workers=max_workers) as ex, tqdm(total=len(pending), desc="Converting to PNG", smoothing=0.1) as pbar:
236
+ # 先填满在飞
237
+ while task_queue and len(inflight) < max_inflight:
238
+ fut = ex.submit(fn, task_queue.popleft())
239
+ inflight.add(fut)
240
+
241
+ while inflight:
242
+ done = []
243
+ for fut in as_completed(inflight, timeout=None):
244
+ done.append(fut)
245
+ try:
246
+ pth_path, png_path, status, info = fut.result()
247
+ if status == "ok":
248
+ ok += 1
249
+ print(f"✅ 转换成功: {pth_path} -> {png_path} {info}", flush=True)
250
+ elif status == "skip-exist":
251
+ skip += 1
252
+ print(f"⏭️ 已存在,跳过: {pth_path}", flush=True)
253
+ elif status == "no-array":
254
+ noarr += 1
255
+ print(f"⚠️ 无可转换数组: {pth_path}", flush=True)
256
+ else:
257
+ fail += 1
258
+ print(f"❌ 失败: {pth_path}\n 原因: {info}", flush=True)
259
+ except Exception as e:
260
+ fail += 1
261
+ print(f"❌ 失败(执行期异常): {e}", flush=True)
262
+ finally:
263
+ pbar.update(1)
264
+
265
+ # 补充新的任务
266
+ if task_queue:
267
+ fut_new = ex.submit(fn, task_queue.popleft())
268
+ inflight.add(fut_new)
269
+
270
+ for f in done:
271
+ inflight.discard(f)
272
+
273
+ print(f"\n完成。成功 {ok},预跳过 {pre_skipped},运行中跳过 {skip},无数组 {noarr},失败 {fail}")
read_npy.py ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # save as pth2png_raw.py
3
+ import argparse
4
+ import numpy as np
5
+ import torch
6
+ import imageio.v3 as iio
7
+
8
+ def main():
9
+ ap = argparse.ArgumentParser(description="Convert 2D .pth matrix to uint16 PNG (no scaling)")
10
+ ap.add_argument("--input_pth", help=".pth 文件路径",default="0a5c013435/refined_ins_ids/frame_000000.jpg.pth")
11
+ ap.add_argument("--output_png", help="输出 PNG 路径",default="out_png/frame_000000.jpg.png")
12
+ ap.add_argument("--key", help="当 .pth 是字典时,指定键名")
13
+ ap.add_argument("--clip", action="store_true",
14
+ help="可选:仅做区间裁剪到 [0, 65535],不缩放")
15
+ args = ap.parse_args()
16
+
17
+ obj = torch.load(args.input_pth, map_location="cpu")
18
+ if args.key is not None:
19
+ obj = obj[args.key]
20
+
21
+ if isinstance(obj, torch.Tensor):
22
+ arr = obj.detach().cpu().numpy()
23
+ else:
24
+ arr = np.array(obj)
25
+
26
+ arr = np.squeeze(arr)
27
+ if arr.ndim != 2:
28
+ raise ValueError(f"期望二维矩阵,实际为 {arr.shape}")
29
+
30
+ # 处理 NaN/Inf → 0(不属于缩放)
31
+ bad = ~np.isfinite(arr)
32
+ if bad.any():
33
+ arr = np.where(bad, 0, arr)
34
+
35
+ # 可选:只裁剪到合法的 uint16 区间,避免溢出回绕(仍不做缩放)
36
+ if args.clip:
37
+ arr = np.clip(arr, 0, 65535)
38
+
39
+ # 仅类型转换为 uint16(不缩放)
40
+ u16 = arr.astype(np.uint16)
41
+
42
+ # 保存为 16-bit 灰度 PNG
43
+ iio.imwrite(args.output_png, u16)
44
+
45
+ if __name__ == "__main__":
46
+ main()
read_png.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from PIL import Image
2
+ import numpy as np
3
+
4
+ # 打开 PNG 文件
5
+ img = Image.open("out_png/frame_000000.jpg.png")
6
+
7
+ # 转换为 numpy 数组
8
+ arr = np.array(img)
9
+
10
+ print(arr.shape, arr.dtype)
11
+ print(arr)
remove_files.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import shutil
3
+
4
+ def remove_obj_ids_npy(root_dir="."):
5
+ """
6
+ 递归删除 root_dir 下所有 obj_ids_npy 文件夹
7
+ """
8
+ for dirpath, dirnames, filenames in os.walk(root_dir, topdown=False):
9
+ for dirname in dirnames:
10
+ if dirname == "obj_ids":
11
+ target = os.path.join(dirpath, dirname)
12
+ try:
13
+ shutil.rmtree(target)
14
+ print(f"🗑️ 已删除: {target}")
15
+ except Exception as e:
16
+ print(f"⚠️ 删除失败 {target}: {e}")
17
+
18
+ if __name__ == "__main__":
19
+ root_dir = "." # 可以改成你的根目录路径
20
+ remove_obj_ids_npy(root_dir)
splits/1.txt ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 036bce3393
2
+ 09c1414f1b
3
+ 0d2ee665be
4
+ 1366d5ae89
5
+ 1ada7a0617
6
+ 210f741378
7
+ 27dd4da69e
8
+ 2970e95b65
9
+ 30f4a2b44d
10
+ 3864514494
11
+ 3db0a1c8f3
12
+ 410c470782
13
+ 47b37eb6f9
14
+ 4ea827f5a1
15
+ 56a0ec536c
16
+ 5eb31827b7
17
+ 646af5e14b
18
+ 6cc2231b9c
19
+ 75d29d69b8
20
+ 7e09430da7
21
+ 825d228aec
22
+ 893fb90e89
23
+ 8e00ac7f59
24
+ 95d525fbfd
25
+ 9f139a318d
26
+ a1d9da703c
27
+ aaa11940d3
28
+ ad2d07fd11
29
+ b26e64c4b0
30
+ bc400d86e1
31
+ bfd3fd54d2
32
+ c47168fab2
33
+ c856c41c99
34
+ d2f44bf242
35
+ d918af9c5f
36
+ e0de253456
37
+ e8e81396b6
38
+ ed2216380b
39
+ f2dc06b1d2
40
+ f8f12e4e6b
splits/2.txt ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 076c822ecc
2
+ 0a184cf634
3
+ 0e75f3c4d9
4
+ 13c3e046d7
5
+ 1ae9e5d2a6
6
+ 21d970d8de
7
+ 280b83fcf3
8
+ 2a496183e1
9
+ 31a2c91c43
10
+ 38d58a7a31
11
+ 3e8bba0176
12
+ 419cbe7c11
13
+ 480ddaadc0
14
+ 50809ea0d8
15
+ 5748ce6f01
16
+ 5ee7c22ba0
17
+ 66c98f4a9b
18
+ 6d89a7320d
19
+ 7831862f02
20
+ 7e7cd69a59
21
+ 85251de7d1
22
+ 8a20d62ac0
23
+ 8e6ff28354
24
+ 961911d451
25
+ 9f21bdec45
26
+ a24f64f7fb
27
+ ab046f8faf
28
+ ada5304e41
29
+ b5918e4637
30
+ bcd2436daf
31
+ c06a983e63
32
+ c49a8c6cff
33
+ c8f2218ee2
34
+ d415cc449b
35
+ daffc70503
36
+ e1b1d9de55
37
+ e8ea9b4da8
38
+ ef18cf0708
39
+ f34d532901
40
+ f9f95681fd
splits/3.txt ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 079a326597
2
+ 0a5c013435
3
+ 104acbf7d2
4
+ 16c9bd2e1e
5
+ 1b75758486
6
+ 251443268c
7
+ 281ba69af1
8
+ 2b1dc6d6a5
9
+ 320c3af000
10
+ 3928249b53
11
+ 3e928dc2f6
12
+ 41b00feddb
13
+ 484ad681df
14
+ 52599ae063
15
+ 578511c8a9
16
+ 5f99900f09
17
+ 67d702f2e8
18
+ 6ee2fc1070
19
+ 785e7504b9
20
+ 7eac902fd5
21
+ 87f6d7d564
22
+ 8a35ef3cfe
23
+ 8f82c394d6
24
+ 9859de300f
25
+ 9f79564dbf
26
+ a29cccc784
27
+ ab11145646
28
+ b08a908f0f
29
+ b73f5cdc41
30
+ bd7375297e
31
+ c0c863b72d
32
+ c4c04e6d6c
33
+ c9abde4c4b
34
+ d6702c681d
35
+ dc263dfbf0
36
+ e398684d27
37
+ e91722b5a3
38
+ ef25276c25
39
+ f3685d06a9
40
+ faec2f0468
splits/4.txt ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 07f5b601ee
2
+ 0a76e06478
3
+ 108ec0b806
4
+ 1831b3823a
5
+ 1b9692f0c7
6
+ 25927bb04c
7
+ 281bc17764
8
+ 2e74812d00
9
+ 32280ecbca
10
+ 394a542a19
11
+ 3f15a9266d
12
+ 4318f8bb3c
13
+ 49a82360aa
14
+ 54b6127146
15
+ 5942004064
16
+ 5fb5d2dbf2
17
+ 6855e1ac32
18
+ 6f1848d1e3
19
+ 7977624358
20
+ 7f4d173c9c
21
+ 88627b561e
22
+ 8b2c0938d6
23
+ 9071e139d9
24
+ 98b4ec142f
25
+ a003a6585e
26
+ a4e227f506
27
+ ab6983ae6c
28
+ b09431c547
29
+ b97261909e
30
+ bd9305480d
31
+ c0f5742640
32
+ c50d2d1d42
33
+ cbd4b3055e
34
+ d6cbe4b28b
35
+ dfac5b38df
36
+ e3ecd49e2b
37
+ e9ac2fc517
38
+ ef69d58016
39
+ f3d64c30f8
40
+ fb05e13ad1
splits/5.txt ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 07ff1c45bb
2
+ 0a7cc12c0e
3
+ 116456116b
4
+ 1841a0b525
5
+ 1c4b893630
6
+ 25f3b7a318
7
+ 286b55a2bf
8
+ 302a7f6b67
9
+ 324d07a5b3
10
+ 39e6ee46df
11
+ 3f1e1610de
12
+ 4422722c49
13
+ 4a1a3a7dc5
14
+ 55b2bf8036
15
+ 59e3f1ea37
16
+ 6115eddb86
17
+ 689fec23d7
18
+ 7079b59642
19
+ 7b6477cb95
20
+ 80ffca8a48
21
+ 8890d0a267
22
+ 8b5caf3398
23
+ 9460c8889d
24
+ 98fe276aa8
25
+ a05ee63164
26
+ a5114ca13d
27
+ ac48a9b736
28
+ b0a08200c9
29
+ bb87c292ad
30
+ bde1e479ad
31
+ c173f62b15
32
+ c5439f4607
33
+ cc5237fd77
34
+ d6d9ddb03f
35
+ e01b287af5
36
+ e7ac609391
37
+ e9e16b6043
38
+ f07340dfea
39
+ f5401524e5
40
+ fb5a96b1a2
splits/6.txt ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 08bbbdcc3d
2
+ 0b031f3119
3
+ 1204e08f17
4
+ 1a130d092a
5
+ 1d003b07bd
6
+ 260db9cf5a
7
+ 28a9ee4557
8
+ 303745abc7
9
+ 355e5e32db
10
+ 39f36da05b
11
+ 40aec5fffa
12
+ 45b0dac5e3
13
+ 4ba22fa7e4
14
+ 5654092cc2
15
+ 5a269ba6fe
16
+ 61adeff7d5
17
+ 69e5939669
18
+ 709ab5bffe
19
+ 7bc286c1b6
20
+ 8133208cb6
21
+ 88cf747085
22
+ 8be0cd3817
23
+ 9471b8d485
24
+ 99fa5c25e1
25
+ a08d9a2476
26
+ a8bf42d646
27
+ acd69a1746
28
+ b1d75ecd55
29
+ bc03d88fc3
30
+ be0ed6b33c
31
+ c24f94007b
32
+ c545851c4f
33
+ ccfd3ed9c7
34
+ d755b3d9d8
35
+ e050c15a8d
36
+ e7af285f7d
37
+ eb4bc76767
38
+ f248c2bcdc
39
+ f6659a3107
40
+ fd361ab85f
splits/7.txt ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 09bced689e
2
+ 0cf2e9402d
3
+ 13285009a4
4
+ 1a8e0d78c0
5
+ 1f7cbbdde1
6
+ 260fa55d50
7
+ 290ef3f2c9
8
+ 30966f4c6e
9
+ 37ea1c52f0
10
+ 3c95c89d61
11
+ 40b56bf310
12
+ 45d2e33be1
13
+ 4c5c60fa76
14
+ 5656608266
15
+ 5d152fab1b
16
+ 6464461276
17
+ 6b40d1a939
18
+ 712dc47104
19
+ 7cd2ac43b4
20
+ 824d9cfa6e
21
+ 89214f3ca0
22
+ 8d563fc2cc
23
+ 94ee15e8ba
24
+ 9b74afd2d2
25
+ a08dda47a8
26
+ a980334473
27
+ acd95847c5
28
+ b20a261fdf
29
+ bc2fce1d81
30
+ bf6e439e38
31
+ c413b34238
32
+ c5f701a8c7
33
+ cf1ffd871d
34
+ d7abfc4b17
35
+ e0abd740ba
36
+ e898c76c1f
37
+ ebc200e928
38
+ f25f5e6f63
39
+ f8062cb7ce
40
+ fe1733741f
splits/nvs_sem_train.txt ADDED
@@ -0,0 +1,230 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 56a0ec536c
2
+ 8b5caf3398
3
+ 41b00feddb
4
+ 98b4ec142f
5
+ fe1733741f
6
+ b20a261fdf
7
+ 5fb5d2dbf2
8
+ f8f12e4e6b
9
+ e9ac2fc517
10
+ 0b031f3119
11
+ 40b56bf310
12
+ e3ecd49e2b
13
+ 9f139a318d
14
+ 419cbe7c11
15
+ 39f36da05b
16
+ 7cd2ac43b4
17
+ fb05e13ad1
18
+ bc03d88fc3
19
+ f34d532901
20
+ 75d29d69b8
21
+ c413b34238
22
+ ccfd3ed9c7
23
+ aaa11940d3
24
+ 4a1a3a7dc5
25
+ 8d563fc2cc
26
+ 1841a0b525
27
+ 07f5b601ee
28
+ 28a9ee4557
29
+ 785e7504b9
30
+ 1366d5ae89
31
+ d2f44bf242
32
+ 2e74812d00
33
+ 0cf2e9402d
34
+ 2a496183e1
35
+ 281bc17764
36
+ bc400d86e1
37
+ 30966f4c6e
38
+ 260fa55d50
39
+ 8b2c0938d6
40
+ e050c15a8d
41
+ a4e227f506
42
+ 59e3f1ea37
43
+ ef18cf0708
44
+ 036bce3393
45
+ faec2f0468
46
+ 9b74afd2d2
47
+ 4ba22fa7e4
48
+ 302a7f6b67
49
+ 49a82360aa
50
+ 824d9cfa6e
51
+ 25927bb04c
52
+ 4c5c60fa76
53
+ 1a8e0d78c0
54
+ 394a542a19
55
+ e0abd740ba
56
+ 260db9cf5a
57
+ e9e16b6043
58
+ 8e00ac7f59
59
+ c0c863b72d
60
+ a1d9da703c
61
+ ad2d07fd11
62
+ c24f94007b
63
+ a05ee63164
64
+ e1b1d9de55
65
+ f07340dfea
66
+ d6d9ddb03f
67
+ cbd4b3055e
68
+ acd69a1746
69
+ bf6e439e38
70
+ 52599ae063
71
+ 55b2bf8036
72
+ 303745abc7
73
+ 8a20d62ac0
74
+ c545851c4f
75
+ b08a908f0f
76
+ 7e7cd69a59
77
+ 961911d451
78
+ 50809ea0d8
79
+ e91722b5a3
80
+ 30f4a2b44d
81
+ 1204e08f17
82
+ 94ee15e8ba
83
+ e8e81396b6
84
+ 2b1dc6d6a5
85
+ 1d003b07bd
86
+ a08dda47a8
87
+ b5918e4637
88
+ f8062cb7ce
89
+ e898c76c1f
90
+ 689fec23d7
91
+ 210f741378
92
+ ab6983ae6c
93
+ 355e5e32db
94
+ d6702c681d
95
+ 37ea1c52f0
96
+ bc2fce1d81
97
+ 1b75758486
98
+ 7977624358
99
+ ed2216380b
100
+ f25f5e6f63
101
+ 646af5e14b
102
+ dfac5b38df
103
+ ef25276c25
104
+ 116456116b
105
+ 1ae9e5d2a6
106
+ 47b37eb6f9
107
+ 712dc47104
108
+ 80ffca8a48
109
+ 07ff1c45bb
110
+ f6659a3107
111
+ daffc70503
112
+ 076c822ecc
113
+ 5a269ba6fe
114
+ 89214f3ca0
115
+ 9471b8d485
116
+ 45d2e33be1
117
+ 08bbbdcc3d
118
+ 69e5939669
119
+ dc263dfbf0
120
+ 98fe276aa8
121
+ 9859de300f
122
+ b73f5cdc41
123
+ ada5304e41
124
+ f5401524e5
125
+ d415cc449b
126
+ bd9305480d
127
+ 1831b3823a
128
+ ebc200e928
129
+ 66c98f4a9b
130
+ 87f6d7d564
131
+ 0a5c013435
132
+ 2970e95b65
133
+ 0e75f3c4d9
134
+ 480ddaadc0
135
+ 4ea827f5a1
136
+ be0ed6b33c
137
+ 88627b561e
138
+ 13285009a4
139
+ 108ec0b806
140
+ 3e928dc2f6
141
+ b1d75ecd55
142
+ b97261909e
143
+ 88cf747085
144
+ 6cc2231b9c
145
+ b09431c547
146
+ c9abde4c4b
147
+ c8f2218ee2
148
+ e01b287af5
149
+ 85251de7d1
150
+ 1b9692f0c7
151
+ 16c9bd2e1e
152
+ a08d9a2476
153
+ 290ef3f2c9
154
+ 61adeff7d5
155
+ a5114ca13d
156
+ 6f1848d1e3
157
+ 281ba69af1
158
+ 104acbf7d2
159
+ 8890d0a267
160
+ c0f5742640
161
+ 67d702f2e8
162
+ 1f7cbbdde1
163
+ 079a326597
164
+ 0a184cf634
165
+ 7f4d173c9c
166
+ a29cccc784
167
+ 3f1e1610de
168
+ 709ab5bffe
169
+ 6464461276
170
+ 7e09430da7
171
+ 324d07a5b3
172
+ bb87c292ad
173
+ 8a35ef3cfe
174
+ 9460c8889d
175
+ 3c95c89d61
176
+ d918af9c5f
177
+ ab11145646
178
+ 7eac902fd5
179
+ d6cbe4b28b
180
+ ef69d58016
181
+ 8be0cd3817
182
+ 8f82c394d6
183
+ 5d152fab1b
184
+ 6d89a7320d
185
+ 0a7cc12c0e
186
+ 4318f8bb3c
187
+ 893fb90e89
188
+ c47168fab2
189
+ 8133208cb6
190
+ 280b83fcf3
191
+ 410c470782
192
+ e7ac609391
193
+ 4422722c49
194
+ 9f79564dbf
195
+ f248c2bcdc
196
+ 5654092cc2
197
+ ab046f8faf
198
+ 95d525fbfd
199
+ 8e6ff28354
200
+ c173f62b15
201
+ c856c41c99
202
+ d7abfc4b17
203
+ 32280ecbca
204
+ 6855e1ac32
205
+ 5656608266
206
+ 0a76e06478
207
+ 39e6ee46df
208
+ e0de253456
209
+ a003a6585e
210
+ 6b40d1a939
211
+ eb4bc76767
212
+ cf1ffd871d
213
+ b26e64c4b0
214
+ e8ea9b4da8
215
+ bd7375297e
216
+ 54b6127146
217
+ 6ee2fc1070
218
+ bfd3fd54d2
219
+ 484ad681df
220
+ 7079b59642
221
+ 9f21bdec45
222
+ 1c4b893630
223
+ 251443268c
224
+ fd361ab85f
225
+ 320c3af000
226
+ c5f701a8c7
227
+ 3928249b53
228
+ c06a983e63
229
+ 09bced689e
230
+ 1a130d092a
splits/nvs_sem_val.txt ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 7b6477cb95
2
+ c50d2d1d42
3
+ cc5237fd77
4
+ acd95847c5
5
+ fb5a96b1a2
6
+ a24f64f7fb
7
+ 1ada7a0617
8
+ 5eb31827b7
9
+ 3e8bba0176
10
+ 3f15a9266d
11
+ 21d970d8de
12
+ 5748ce6f01
13
+ c4c04e6d6c
14
+ 7831862f02
15
+ bde1e479ad
16
+ 38d58a7a31
17
+ 5ee7c22ba0
18
+ f9f95681fd
19
+ 3864514494
20
+ 40aec5fffa
21
+ 13c3e046d7
22
+ e398684d27
23
+ a8bf42d646
24
+ 45b0dac5e3
25
+ 31a2c91c43
26
+ e7af285f7d
27
+ 286b55a2bf
28
+ 7bc286c1b6
29
+ f3685d06a9
30
+ b0a08200c9
31
+ 825d228aec
32
+ a980334473
33
+ f2dc06b1d2
34
+ 5942004064
35
+ 25f3b7a318
36
+ bcd2436daf
37
+ f3d64c30f8
38
+ 0d2ee665be
39
+ 3db0a1c8f3
40
+ ac48a9b736
41
+ c5439f4607
42
+ 578511c8a9
43
+ d755b3d9d8
44
+ 99fa5c25e1
45
+ 09c1414f1b
46
+ 5f99900f09
47
+ 9071e139d9
48
+ 6115eddb86
49
+ 27dd4da69e
50
+ c49a8c6cff
splits/nvs_test.txt ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ca0e09014e
2
+ beb802368c
3
+ ebff4de90b
4
+ d228e2d9dd
5
+ 9e019d8be1
6
+ 11b696efba
7
+ 471cc4ba84
8
+ f20e7b5640
9
+ dfe9cbd72a
10
+ ccdc33dc2a
11
+ 124974734e
12
+ c0cbb1fea1
13
+ 047fb766c4
14
+ 7b37cccb03
15
+ 8283161f1b
16
+ c3e279be54
17
+ 5a14f9da39
18
+ cd7973d92b
19
+ 5298ec174f
20
+ e0e83b4ca3
21
+ 64ea6b73c2
22
+ f00bd5fa8a
23
+ 02a980c994
24
+ be91f7884d
25
+ 1c876c250f
26
+ 15155a88fb
27
+ 633f9a9f06
28
+ d6419f6478
29
+ f0b0a42ba3
30
+ a46b21d949
31
+ 74ff105c0d
32
+ 77596f5d2a
33
+ ecb5d01065
34
+ c9bf4c8b62
35
+ b074ca565a
36
+ 49c758655e
37
+ d4d2019f5d
38
+ 319787e6ec
39
+ 84b48f2614
40
+ bee11d6a41
41
+ 9a9e32c768
42
+ 9b365a9b68
43
+ 54e7ffaea3
44
+ 7d72f01865
45
+ 252652d5ba
46
+ 651dc6b4f1
47
+ 03f7a0e617
48
+ fe94fc30cf
49
+ d1b9dff904
50
+ 4bc04e0cde
splits/sem_test.txt ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ be2e10f16a
2
+ 497588b572
3
+ 02455b3d20
4
+ 3e6ceea56c
5
+ f7a60ba2a2
6
+ 2a1a3afad9
7
+ 3a161a857d
8
+ 0529d56cce
9
+ 6ebe30292e
10
+ 7dfdff1b7d
11
+ be66c57b92
12
+ be6205d016
13
+ 569f99f881
14
+ da8043d54e
15
+ 06a3d79b68
16
+ f94c225e84
17
+ a24858e51e
18
+ cd2994fcc1
19
+ a897272241
20
+ 285efbc7cf
21
+ 2e67a32314
22
+ dffce1cf9a
23
+ e6afbe3753
24
+ d070e22e3b
25
+ 9f7641ce94
26
+ aa6e508f0c
27
+ 5371eff4f9
28
+ cd88899edb
29
+ 21532e059d
30
+ 47eb87b5bb
31
+ d662592b54
32
+ 68739bdf1f
33
+ accad58571
34
+ 4ef75031e3
35
+ 1be2c31cac
36
+ 9663292843
37
+ 7ffc86edf4
38
+ 54bca9597e
39
+ 728daff2a3
40
+ 18fd041970
41
+ eeddfe67f5
42
+ b09b119466
43
+ ab252b28c0
44
+ cc49215f67
45
+ 154c3e10d9
46
+ 29b607c6d5
47
+ ba414a3e6f
48
+ 954633ea01
49
+ 6f12492455
50
+ ea15f3457c
splits/splits.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pathlib import Path
2
+
3
+ # 输入文件路径
4
+ train_file = Path("/mnt/juicefs/datasets/vanilla_scannetpp/splits/nvs_sem_train.txt")
5
+ val_file = Path("/mnt/juicefs/datasets/vanilla_scannetpp/splits/nvs_sem_val.txt")
6
+
7
+ # 读取两个文件内容
8
+ with open(train_file, "r") as f:
9
+ train_ids = [line.strip() for line in f if line.strip()]
10
+
11
+ with open(val_file, "r") as f:
12
+ val_ids = [line.strip() for line in f if line.strip()]
13
+
14
+ # 合并并去重
15
+ all_ids = sorted(set(train_ids + val_ids))
16
+
17
+ # 分成 7 份
18
+ chunks = [[] for _ in range(7)]
19
+ for idx, scene_id in enumerate(all_ids):
20
+ chunks[idx % 7].append(scene_id)
21
+
22
+ # 输出保存为 1.txt 到 7.txt
23
+ output_dir = Path("/mnt/juicefs/datasets/vanilla_scannetpp/splits")
24
+ output_dir.mkdir(parents=True, exist_ok=True)
25
+
26
+ for i, chunk in enumerate(chunks):
27
+ with open(output_dir / f"{i+1}.txt", "w") as f:
28
+ f.write("\n".join(chunk) + "\n")
29
+
30
+ print(f"✅ Done. Saved {len(all_ids)} scenes into 7 files in {output_dir}")