Skip to main content

Visual Ground

Project description

视觉-文本实体链接使用说明

1. 环境依赖

CUDA版本: 11.7 其他依赖库的安装命令如下:

conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia

2. 下载安装

可使用如下命令下载安装算法包:

pip install ThreeDVG

3. 使用示例及运行参数说明

输入:

data_dict: dict { point_clouds, lang_feat }

point_clouds: Variable(torch.cuda.FloatTensor) (B, N, 3 + input_channels) tensor Point cloud to run predicts on Each point in the point-cloud MUST be formated as (x, y, z, features...)

随机数据测试:

import os
import torch
import argparse
import numpy as np
from ThreeDVG  import MM3DVG
os.environ["CUDA_VISIBLE_DEVICES"] = "6"

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("--num_proposals", type=int, default=256, help="Proposal number [default: 256]")
    parser.add_argument("--no_lang_cls", action="store_true", help="Do NOT use language classifier.")
    parser.add_argument("--use_bidir", action="store_true", help="Use bi-directional GRU.")
    parser.add_argument("--no_height", action="store_true", help="Do NOT use height signal in input.")
    parser.add_argument("--use_color", action="store_true", help="Use RGB color in input.")
    parser.add_argument("--use_normal", action="store_true", help="Use RGB color in input.")
    parser.add_argument("--use_multiview", action="store_true", help="Use multiview images.")

    args = parser.parse_args()

    data_dict = {}
    point_clouds = torch.ones([1, 10, 4]).cuda()
    data_dict['point_clouds'] = point_clouds

    data_dict["lang_num"] = 1
    data_dict["lang_feat_list"] = torch.zeros([1, 1, 126, 300]).cuda()
    data_dict["lang_len_list"] = torch.Tensor([10]).cuda()
    data_dict["main_lang_feat_list"] = torch.zeros([1, 1, 126, 300]).cuda()
    data_dict["main_lang_len_list"] = torch.Tensor([10]).cuda()
    data_dict["first_obj_list"] = torch.Tensor([0]).cuda()
    data_dict["unk_list"] = torch.zeros([1, 300]).cuda()
    data_dict["unk"] = torch.zeros([1, 300]).cuda()
    data_dict["istrain"] = torch.Tensor([0]).cuda()
    GLOVE_PICKLE = "/data/zhaoyj/mmkg-3d-3dvg/glove.p"
    bbox = MM3DVG(args=args).inference(data_dict=data_dict)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ThreeDVG-0.1.10-py3-none-any.whl (142.7 kB view details)

Uploaded Python 3

File details

Details for the file ThreeDVG-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: ThreeDVG-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 142.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.7

File hashes

Hashes for ThreeDVG-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 ea8425639ab86faa940ee62d6868107d266a25e0110bb0c384a0b23d39ba6118
MD5 50900346b3912098c481135cebf10fc4
BLAKE2b-256 32249119918c6f6501151b15a480b1bef91b60137f5519d045260050817cd377

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page