MatterPort3D 数据集下载

下载数据集分两个:
一是场景数据集
二是任务数据集

方法一:
github下载场景和任务数据集
1.下载MatterPort3D–15GB的场景数据集
在这里插入图片描述
2.下载任务数据集
根据自己需求下载Object goal navigation或者Point goal navigation任务数据集
在这里插入图片描述

方法二
1.conda创建python2.7虚拟环境

conda create -n py27 python=2.7

2.进入虚拟环境

conda activate py27

3.运行download_mp.py

python download_mp.py --task habitat -o ./data
# --task habitat:指定任务为 habitat,这是脚本支持的一个任务类型(具体作用需参考脚本的实现)。
# -o ./data:指定输出目录为当前路径下的 data 文件夹,下载的内容会保存到此目录。

创建download_mp.py后执行上面命令:

#!/usr/bin/env python
# Downloads MP public data release
# Run with ./download_mp.py (or python download_mp.py on Windows)
# -*- coding: utf-8 -*-
import argparse
import collections
import os
import tempfile
import urllib

BASE_URL = 'http://kaldir.vc.in.tum.de/matterport/'
RELEASE = 'v1/scans'
RELEASE_TASKS = 'v1/tasks/'
RELEASE_SIZE = '1.3TB'
TOS_URL = BASE_URL + 'MP_TOS.pdf'
FILETYPES = [
    'cameras',
    'matterport_camera_intrinsics',
    'matterport_camera_poses',
    'matterport_color_images',
    'matterport_depth_images',
    'matterport_hdr_images',
    'matterport_mesh',
    'matterport_skybox_images',
    'undistorted_camera_parameters',
    'undistorted_color_images',
    'undistorted_depth_images',
    'undistorted_normal_images',
    'house_segmentations',
    'region_segmentations',
    'image_overlap_data',
    'poisson_meshes',
    'sens'
]
TASK_FILES = {
    'keypoint_matching_data': ['keypoint_matching/data.zip'],
    'keypoint_matching_models': ['keypoint_matching/models.zip'],
    'surface_normal_data': ['surface_normal/data_list.zip'],
    'surface_normal_models': ['surface_normal/models.zip'],
    'region_classification_data': ['region_classification/data.zip'],
    'region_classification_models': ['region_classification/models.zip'],
    'semantic_voxel_label_data': ['semantic_voxel_label/data.zip'],
    'semantic_voxel_label_models': ['semantic_voxel_label/models.zip'],
    'minos': ['mp3d_minos.zip'],
    'gibson': ['mp3d_for_gibson.tar.gz'],
    'habitat': ['mp3d_habitat.zip'],
    'pixelsynth': ['mp3d_pixelsynth.zip'],
    'igibson': ['mp3d_for_igibson.zip'],
    'mp360': ['mp3d_360/data_00.zip', 'mp3d_360/data_01.zip', 'mp3d_360/data_02.zip', 'mp3d_360/data_03.zip', 'mp3d_360/data_04.zip', 'mp3d_360/data_05.zip', 'mp3d_360/data_06.zip']
}


def get_release_scans(release_file):
    scan_lines = urllib.urlopen(release_file)
    scans = []
    for scan_line in scan_lines:
        scan_id = scan_line.rstrip('\n')
        scans.append(scan_id)
    return scans


def download_release(release_scans, out_dir, file_types):
    print('Downloading MP release to ' + out_dir + '...')
    for scan_id in release_scans:
        scan_out_dir = os.path.join(out_dir, scan_id)
        download_scan(scan_id, scan_out_dir, file_types)
    print('Downloaded MP release.')


def download_file(url, out_file):
    out_dir = os.path.dirname(out_file)
    if not os.path.isfile(out_file):
        print '\t' + url + ' > ' + out_file
        fh, out_file_tmp = tempfile.mkstemp(dir=out_dir)
        f = os.fdopen(fh, 'w')
        f.close()
        urllib.urlretrieve(url, out_file_tmp)
        os.rename(out_file_tmp, out_file)
    else:
        print('WARNING: skipping download of existing file ' + out_file)

def download_scan(scan_id, out_dir, file_types):
    print('Downloading MP scan ' + scan_id + ' ...')
    if not os.path.isdir(out_dir):
        os.makedirs(out_dir)
    for ft in file_types:
        url = BASE_URL + RELEASE + '/' + scan_id + '/' + ft + '.zip'
        out_file = out_dir + '/' + ft + '.zip'
        download_file(url, out_file)
    print('Downloaded scan ' + scan_id)


def download_task_data(task_data, out_dir):
    print('Downloading MP task data for ' + str(task_data) + ' ...')
    for task_data_id in task_data:
        if task_data_id in TASK_FILES:
            file = TASK_FILES[task_data_id]
            for filepart in file:
                url = BASE_URL + RELEASE_TASKS + '/' + filepart
                localpath = os.path.join(out_dir, filepart)
                localdir = os.path.dirname(localpath)
                if not os.path.isdir(localdir):
                    os.makedirs(localdir)
                    download_file(url, localpath)
                    print('Downloaded task data ' + task_data_id)


def main():
    parser = argparse.ArgumentParser(description=
        '''
        Downloads MP public data release.
        Example invocation:
          python download_mp.py -o base_dir --id ALL --type object_segmentations --task_data semantic_voxel_label_data semantic_voxel_label_models
        The -o argument is required and specifies the base_dir local directory.
        After download base_dir/v1/scans is populated with scan data, and base_dir/v1/tasks is populated with task data.
        Unzip scan files from base_dir/v1/scans and task files from base_dir/v1/tasks/task_name.
        The --type argument is optional (all data types are downloaded if unspecified).
        The --id ALL argument will download all house data. Use --id house_id to download specific house data.
        The --task_data argument is optional and will download task data and model files.
        ''',
        formatter_class=argparse.RawTextHelpFormatter)
    parser.add_argument('-o', '--out_dir', required=True, help='directory in which to download')
    parser.add_argument('--task_data', default=[], nargs='+', help='task data files to download. Any of: ' + ','.join(TASK_FILES.keys()))
    parser.add_argument('--id', default='ALL', help='specific scan id to download or ALL to download entire dataset')
    parser.add_argument('--type', nargs='+', help='specific file types to download. Any of: ' + ','.join(FILETYPES))
    args = parser.parse_args()

    print('By pressing any key to continue you confirm that you have agreed to the MP terms of use as described at:')
    print(TOS_URL)
    print('***')
    print('Press any key to continue, or CTRL-C to exit.')
    key = raw_input('')

    release_file = BASE_URL + RELEASE + '.txt'
    release_scans = get_release_scans(release_file)
    file_types = FILETYPES

    # download task data
    if args.task_data:
        print(args.task_data)
        if set(args.task_data) & set(TASK_FILES.keys()):  # download task data
            out_dir = os.path.join(args.out_dir, RELEASE_TASKS)
            download_task_data(args.task_data, out_dir)
        else:
            print('ERROR: Unrecognized task data id: ' + args.task_data)
        print('Done downloading task_data for ' + str(args.task_data))
        key = raw_input('Press any key to continue on to main dataset download, or CTRL-C to exit.')

    # download specific file types?
    if args.type:
        if not set(args.type) & set(FILETYPES):
            print('ERROR: Invalid file type: ' + file_type)
            return
        file_types = args.type

    if args.id and args.id != 'ALL':  # download single scan
        scan_id = args.id
        if scan_id not in release_scans:
            print('ERROR: Invalid scan id: ' + scan_id)
        else:
            out_dir = os.path.join(args.out_dir, RELEASE, scan_id)
            download_scan(scan_id, out_dir, file_types)
    elif 'minos' not in args.task_data and args.id == 'ALL' or args.id == 'all':  # download entire release
        if len(file_types) == len(FILETYPES):
            print('WARNING: You are downloading the entire MP release which requires ' + RELEASE_SIZE + ' of space.')
        else:
            print('WARNING: You are downloading all MP scans of type ' + file_types[0])
        print('Note that existing scan directories will be skipped. Delete partially downloaded directories to re-download.')
        print('***')
        print('Press any key to continue, or CTRL-C to exit.')
        key = raw_input('')
        out_dir = os.path.join(args.out_dir, RELEASE)
        download_release(release_scans, out_dir, file_types)

if __name__ == "__main__": main()

### 回答1: Matterport数据集是一个大规模的三维室内场景数据集,可以用于深度学习、计算机视觉等领域的研究和应用。要下载Matterport数据集,可以按照以下步骤操作: 1. 前往Matterport数据集官方网站,创建一个账户。 2. 在网站上选择需要下载数据集,比如“Matterport3D Dataset”或“Matterport3D Mask Dataset”。 3. 选择需要下载的数据格式,比如OBJ、PLY、RGB等格式。 4. 根据网站提示选择下载方式,可以选择直接下载、使用wget命令下载、使用AWS S3下载等方式。 需要注意的是,Matterport数据集非常大,下载可能需要较长时间和较大的存储空间。同时,该数据集有一定的使用限制,需要在使用前仔细阅读官方文档,了解相关条款和规定。 ### 回答2: 要下载Matterport数据集,首先需要访问Matterport的官方网站,注册一个账号。在注册后,可以通过网站上提供的下载链接来获取所需的数据集Matterport提供了几种类型的数据集,包括室内场景、家具模型、三维模型等。根据自己的需求,选择适合的数据集进行下载。 在数据集下载页面,可以看到数据集的详细描述和相关信息。此外,还可以预览图像和模型,以便更好地了解数据集的内容和质量。 在下载数据集之前,确认自己有足够的存储空间,并且网络连接稳定。有时候,较大的数据集可能需要较长的时间来下载,因此需要耐心等待。 下载数据集时,可以选择下载整个数据集或者只下载特定的文件。在选择下载选项后,点击下载按钮开始下载下载完成后,解压缩相关文件,可以获得包含图像、模型和其他相关文件的文件夹。根据自己的需要,可以使用这些数据进行各种计算机视觉和虚拟现实项目。 总而言之,要下载Matterport数据集,注册一个账号,选择适合的数据集进行下载,确保有足够的存储空间和稳定的网络连接,下载完成后解压缩文件,即可开始使用这些数据进行相关项目的开发和研究。 ### 回答3: Matterport数据集是一个用于三维视觉和室内建筑领域的公开数据集。它包含了大量室内环境的三维扫描、图像和其他相关数据,可以用于室内导航、建筑设计、虚拟现实等应用。 要下载Matterport数据集,可以按照以下步骤进行: 1. 访问Matterport数据集官方网站(https://matterport.com/research/cvpr-2017)。 2. 在该网站上,您可以找到数据集下载链接。点击链接,您将被重定向到Matterport GitHub页面。 3. 在GitHub页面上,您可以找到具体的数据集下载链接。这些链接通常会提供不同格式的数据集,如3D模型、图像、点云数据等。 4. 选择您需要的数据集格式。如果您对三维建模感兴趣,可以选择下载3D模型。如果您对图像处理感兴趣,可以选择下载图像数据集。 5. 点击所选数据集下载链接,将开始下载过程。请注意,由于数据集的大小可能很大,下载过程可能需要一些时间。 6. 下载完成后,您可以将数据集解压到您选择的存储位置。根据下载数据集格式,您可能需要安装相应的软件或库来处理数据。 7. 一旦数据集解压完成,您可以开始使用该数据集进行您感兴趣的研究、开发或应用。 值得一提的是,Matterport数据集是一个较大的数据集,需要合适的计算资源和存储空间来处理和存储。使用该数据集时,请遵循相关的数据使用规范和法律要求,以确保合法合规。 总而言之,从Matterport官方网站下载数据集是一个简单的过程,只需几个步骤即可获得所需的数据,这将为您的项目提供宝贵的资源和支持。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值