从Labelbox导出到其他公共论坛的转换器

LBExporters的Python项目详细描述


labelbox脚本

用法

设置

测试了Python3.6.4。安装到site-packages以供使用:

python setup.py install

labelbox json到coco

将labelbox json导出文件转换为coco格式。

# import labelbox2coco libraryimportlabelbox2cocoaslb2co# set labeled_data to the file path of the Labelbox JSON exportlabeled_data='test-fixtures/labelbox_1.json'# set coco_output to the file name you want the COCO data to be written tococo_output='lb2co_1.json'# call the Labelbox to COCO conversionlb2co.from_json(labeled_data=labeled_data,coco_output=coco_output)

labelbox json到pascal voc

将labelbox json导出文件转换为pascal voc格式。

# import labelbox2pascal libraryimportlabelbox2pascalaslb2pa# set labeled_data to the file path of the Labelbox JSON exportlabeled_data='test-fixtures/labelbox_1.json'# set ann_output_dir to the file path of the directory to write Pascal VOC# annotation files. The directory must exist.ann_output_dir='./Annotations'# set images_output_dir to the file path of the directory to write images.# The directory must exist.images_output_dir='./Images'# call the Labelbox to Pascal conversion# NOTE: make sure to specify the correct label_format based on the export#  format chosen on Labelbox; 'WKT' or 'XY'.lb2pa.from_json(labeled_data=labeled_data,ann_output_dir=ann_output_dir,images_output_dir=images_output_dir,label_format='WKT')

开发

pipenv用于管理虚拟机和依赖项。

要设置:

pipenv install --dev -e '.[dev]'

运行测试:

pipenv run pytest

为向后兼容生成requirements.txt

pipenv lock -r --dev

释放

pipenv run python setup.py sdist bdist_wheel
twine upload 'dist/*'

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
playframework Play Framework 2.5表单对象bean(Java)中的依赖项注入   java从javascript触发小程序按钮   JavaGWT:如何创建我自己的异步方法?   对于JTA事务类型,java JPA更改不会持久化   java如何使用预定义的甲板类制作Black Jack游戏   带有数组的java HashMap find()   从Java中的另一个类接收对象数组的参数?   java IntelliJ错误:Scala 145,错误:scalac:找不到Scala编译器JAR   java Eclipse 404请求的资源不可用   java Chuck没有界限   java阅读行每隔一行跳过一行   java如何访问我的EAR部署信息   Java中的正则表达式,其中执行搜索的文本是动态变化的   java我需要优化BigInteger的toString()方法   java Google Map Api V2,自定义路线标记   java如何在Java8中与LocalDate实现更少的需求和更高的质量   EclipseUML插件生成Java源代码   将数据库列绑定到java jComboBox和JList   java如何将两个图像合并为PDF