从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第三方库


热门话题
使用php调用java web服务时无法获取输出   java Netbeans:安装IMlet时出错。。。。仿真器错误   初始化期间Eclipse Juno SR 2中的java堆栈溢出   java在3d中寻找两个任意立方体的交集   代码中显示java“org.openqa.selenium.WebDriverException”错误   java使用AtomicInteger作为可变整数的替代品是一种好的做法吗?   当以编程方式设置背景颜色时,java版面在更新后会自动复制   java将字符串拆分为一个带有数字数据的字符串和另一个带有非数字数据的字符串   带有SSL协议的java AsyncHttpClient   C++服务器HTTN到java NtoHS客户端转换   java内存分配是基于引用类还是实例类?   java使用ProjectLombok安全吗?   grails“java版本”在命令提示符下不工作   java无法使用axis2实例化类型ADBDataSource   在Play Framework 2中进行多文件上传的java示例   java如何将二进制补码字符串转换为负十进制数?   windows 7在Java中获取不正确的操作系统名称   java如何禁用p:commandButton的enter键?   java如何从main方法加载servlet   java如何从imageView获取二进制位图