视觉关系检测使用说明
1. 算法描述
该算法用于图像中的视觉关系检测(VRD)。该算法基于PyTorch框架开发,输入一张图片,算法会检测图片中的视觉关系对。
2. 依赖及安装
CUDA版本: 11.3 其他依赖库的安装命令如下:
conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=11.3 -c pytorch -c conda-forge
可使用如下命令下载安装算法包:
pip install -U mmkg-vrd
3. 使用示例及运行参数说明
需要准备 pretrained_ckpt, labelmap_file, freq_prior 三个文件,可以通过 mmkg-vrd 上所提供的链接进行下载
from mmkg_vrd import VRD
vrd = VRD(
pretrained_ckpt='custom_io/ckpt/RX152FPN_reldn_oi_best.pth',
labelmap_file='custom_io/ji_vrd_labelmap.json',
freq_prior='custom_io/vrd_frequency_prior_include_background.npy',
)
vrd.det_and_vis(
img_file='custom_io/imgs/1024px-Gen_Robert_E_Lee_on_Traveler_at_Gettysburg_Pa.jpg',
save_file='custom_io/out/1024px-Gen_Robert_E_Lee_on_Traveler_at_Gettysburg_Pa.reldn_relation.jpg')
print('all done')
Metadata
Release files for mmkg-vrd 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mmkg_vrd-0.2.0-cp37-cp37m-manylinux1_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.5+ x86-64 | Details for mmkg_vrd-0.2.0-cp37-cp37m-manylinux1_x86_64.whl |
Release files / mmkg_vrd-0.2.0-cp37-cp37m-manylinux1_x86_64.whl
| Download URL | mmkg_vrd-0.2.0-cp37-cp37m-manylinux1_x86_64.whl |
|---|---|
| Size | 5.5 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 |
|
SHA-256 checksum How to use checksums |
c93e6e55b9f653b83c6e30043b2c0a11dbb6a9879d337322620a84020e3e9154
|
|
BLAKE2b-256 checksum How to use checksums |
5509db93129e22e4150f5a829b5a0ec399213f74e6198c4ebe4d5a477da97966
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.16
|
Security for mmkg-vrd 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.