File tree Expand file tree Collapse file tree 3 files changed +30
-2
lines changed Expand file tree Collapse file tree 3 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 41
41
HEIGHT_KEY = "height"
42
42
IGNORED_ITEMS = "ignored_items"
43
43
IMAGE_KEY = "image"
44
+ IMAGE_LOCATION_KEY = "image_location"
44
45
IMAGE_URL_KEY = "image_url"
45
46
INDEX_KEY = "index"
46
47
ITEMS_KEY = "items"
Original file line number Diff line number Diff line change 7
7
METADATA_KEY ,
8
8
REFERENCE_ID_KEY ,
9
9
POINTCLOUD_LOCATION_KEY ,
10
+ IMAGE_LOCATION_KEY ,
10
11
)
11
12
from .annotation import is_local_path
12
13
from .dataset_item import DatasetItemType , DatasetItem
@@ -174,8 +175,15 @@ def check_all_scene_paths_remote(scenes: List[LidarScene]):
174
175
for scene in scenes :
175
176
for frame in scene .frames_dict .values ():
176
177
for item in frame .items .values ():
177
- if is_local_path (getattr (item , POINTCLOUD_LOCATION_KEY )):
178
+ pointcloud_location = getattr (item , POINTCLOUD_LOCATION_KEY )
179
+ if pointcloud_location and is_local_path (pointcloud_location ):
178
180
raise ValueError (
179
- f"All paths for DatasetItems in a Scene must be remote, but { item .url } is either "
181
+ f"All paths for DatasetItems in a Scene must be remote, but { item .pointcloud_location } is either "
182
+ "local, or a remote URL type that is not supported."
183
+ )
184
+ image_location = getattr (item , IMAGE_LOCATION_KEY )
185
+ if image_location and is_local_path (image_location ):
186
+ raise ValueError (
187
+ f"All paths for DatasetItems in a Scene must be remote, but { item .image_location } is either "
180
188
"local, or a remote URL type that is not supported."
181
189
)
Original file line number Diff line number Diff line change 37
37
"reference_id" : "lidar_frame_1" ,
38
38
"metadata" : {},
39
39
},
40
+ "camera" : {
41
+ "image_url" : TEST_IMG_URLS [0 ],
42
+ "reference_id" : "camera_frame_1" ,
43
+ "metadata" : {
44
+ "camera_params" : {
45
+ "position" : {"x" : 0 , "y" : 0 , "z" : 0 },
46
+ "heading" : {
47
+ "w" : 0.6 ,
48
+ "x" : - 0.6 ,
49
+ "y" : 0.3 ,
50
+ "z" : - 0.3 ,
51
+ },
52
+ "fx" : 1000 ,
53
+ "fy" : 1000 ,
54
+ "cx" : 1000 ,
55
+ "cy" : 500 ,
56
+ }
57
+ },
58
+ },
40
59
}
41
60
],
42
61
"metadata" : {},
You can’t perform that action at this time.
0 commit comments