MCPcopy Create free account
hub / github.com/apple/ARKitScenes / raw_files

Function raw_files

download_data.py:23–48  ·  view source on GitHub ↗
(video_id, assets, metadata)

Source from the content-addressed store, hash-verified

21
22
23def raw_files(video_id, assets, metadata):
24 file_names = []
25 for asset in assets:
26 if HIGRES_DEPTH_ASSET_NAME == asset:
27 in_upsampling = metadata.loc[metadata['video_id'] == float(video_id), ['is_in_upsampling']].iat[0, 0]
28 if not in_upsampling:
29 print(f"Skipping asset {asset} for video_id {video_id} - Video not in upsampling dataset")
30 continue # highres_depth asset only available for video ids from upsampling dataset
31
32 if asset in ['confidence', 'highres_depth', 'lowres_depth', 'lowres_wide', 'lowres_wide_intrinsics',
33 'ultrawide', 'ultrawide_intrinsics', 'vga_wide', 'vga_wide_intrinsics']:
34 file_names.append(asset + '.zip')
35 elif asset == 'mov':
36 file_names.append(f'{video_id}.mov')
37 elif asset == 'mesh':
38 if video_id not in missing_3dod_assets_video_ids:
39 file_names.append(f'{video_id}_3dod_mesh.ply')
40 elif asset == 'annotation':
41 if video_id not in missing_3dod_assets_video_ids:
42 file_names.append(f'{video_id}_3dod_annotation.json')
43 elif asset == 'lowres_wide.traj':
44 if video_id not in missing_3dod_assets_video_ids:
45 file_names.append('lowres_wide.traj')
46 else:
47 raise Exception(f'No asset = {asset} in raw dataset')
48 return file_names
49
50
51def download_file(url, file_name, dst):

Callers 1

download_dataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected