GithubHelp home page GithubHelp logo

label-studio_upload_scripts's Introduction

一些为了label-studio写的脚本

文件说明

deve.py

  • 开发测试使用,忽略即可

projectCreator.py

  • 中间件
  • 读取预定义的tsv文件,根据其中预定义的项目名称创建足够的项目,并返回项目id列表

upload_audio.py

  • @Author:lovemefan
  • 上传一个音频文件作为任务到指定项目
  • 事实上上传的是一个路径,而非真实文件
  • 可以携带预标记
  • 可以根据本地文件自动获取文件持续时间

main.py

  • 当前项目主入口文件
  • 根据预定义tsv文件创建足够的项目并按照平均分配进行语料切割,上传到对应的项目中
  • 详细参数参照文件内注释

config.py

  • 项目配置文件,仓库内未给出,如要使用本项目,请自行定义

  • 文件结构

  • class Config:
        URL = "string" -> label-studio地址
        TOKEN = "string" -> 创建者的token
        PROJETCS_DESP = "string" -> 新建项目的详细描述NullableLABEL_CONFIG = "string" -> xml格式的项目预定义config参考label-studio官方文档
        LOG_FILE = "string" -> 日志输出文件

Usage

所有使用都必须进行的操作

  • 创建并定义上述config.py文件

上传待标记语料

  • 修改main.py文件中所示参数
  • 在同级目录下创建需要新建的项目名称tsv文件
  • python main.py等待执行完毕

导出已标记语料

  • 修改export.py中所示参数
  • 同级目录下创建包含项目id的tsv文件
  • python export.py等待执行完毕

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.