Skip to main content

api handle for data transform

Project description

Auchor

  • 西安三重像素科技有限公司
  • Xi'an Triple Pixel Technology Co.,
  • @PIPIPINoBrain
  • 联系方式:PIPIPINoBrain@163.com

Mtripix.Mutils.Mtrans(usage)

安装方式

pip install Mtripix

使用示例

import Mtripix.Mutils.Mtrans as Mt

idxs = [1,2,3]
labels = ["dog", "cat", "person"]
d = Mt.labels2dict(labels, idxs)
path_xml = "C:\Users\18829\Desktop\MTP\A.xml" path_txt = "C:\Users\18829\Desktop\MTP\A1.txt"
Mt.xml2yoloobb(path_xml, path_txt, d)

Environment

  • json
  • numpy
  • Lxml

Mtripix Function

Mtripix.Mutils(lists)

Mtripix.Mutils.Mtrans(lists)

Mtripix.Mutils.Mtrans(intrudction)

Mtripix.Mutils.Mtrans.labels2dict(labels, idxs)

@input:

  • labels(list/tuple): 标签名 里边都是str
  • idxs(list/tuple): 类别名 里边都是str

@return:

  • namedict(dict) 标签与类别对应的字典

Mtripix.Mutils.Mtrans.voc2yolo(path_xml, path_txt, namedict)

@input:

  • path_xml(str): xml文件地址
  • path_txt(str): 生成的yolo的txt地址
  • namedict(dict): 标签和类别对应的字典

@return:

  • 0

Mtripix.Mutils.Mtrans.json2yolo(path_json, path_txt, namedict, mode)

@input:

  • path_json(str): json文件地址
  • path_txt(str): 生成的yolo的txt地址
  • namedict(dict): 标签和类别对应的字典
  • mode(str): 一共可填两种模式“detection”和“segmentation”, 分别对应yolo检测和分割的文件,默认是“detection”

@return:

  • 0

Mtripix.Mutils.Mtrans.voc2dotaobb(path_xml, path_txt)

@input:

  • pathxml(str): xml文件地址
  • path_txt(str): 生成的DOTA的txt地址

@return:

  • 0

Mtripix.Mutils.Mtrans.voc2yoloobb(path_xml, path_txt, namedict)

@input:

  • path_xml(str): xml文件地址
  • path_txt(str): 生成的yoloobb的txt地址
  • namedict(dict): 标签和类别对应的字典

@return:

  • 0

Mtripix.Mutils.Mtrans.yolo2voc(path_img, path_txt, path_xml, namedict)

@input:

  • path_img(str): 图像地址
  • path_txt(str): 图像的yolo格式txt地址
  • path_xml(str): 生成的xml地址
  • namedict(dict): 类别和标签对应的字典

@return:

  • 0

Project details


Download files

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

Source Distribution

Mtripix-0.0.6.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

Mtripix-0.0.6-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file Mtripix-0.0.6.tar.gz.

File metadata

  • Download URL: Mtripix-0.0.6.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.18

File hashes

Hashes for Mtripix-0.0.6.tar.gz
Algorithm Hash digest
SHA256 57d8d5ccad475247149b976b8402d3e6fa03a0ea93b0fb139c8e12d2cc210914
MD5 2aeab4e339ece4b6cb2088658853b57d
BLAKE2b-256 9cd0804cda09d7b339d7d319f284c6ba76d112aba42e0fbde339ff8facf6afa1

See more details on using hashes here.

File details

Details for the file Mtripix-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: Mtripix-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.18

File hashes

Hashes for Mtripix-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 db4f26081abaae34adc9c3729ee13e133d5dda341d94fe85aef1f6e203cc7892
MD5 0d8477ca19bd766cbed89e5298d2413c
BLAKE2b-256 6dfefe3eaca6cc74793ef6cc3e316e3d02fd14aeb35732cd7d2bc8e763f858b4

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