Giter Club home page Giter Club logo

Comments (2)

hogepodge avatar hogepodge commented on June 8, 2024

Hi @JaviMota, can you help provide us with more information to help reproduce the issue? A label config, sample data, and steps to reproduce would help us determine if it's a bug.

from label-studio.

JaviMota avatar JaviMota commented on June 8, 2024

Hi
This is the code Im using:

LABEL_STUDIO_URL = os.getenv('LABEL_STUDIO_URL', default='http://virt-entw02.xxx.net:8080')
API_KEY = "xxx"
PROJECT_ID = 6

// connect to Label Studio
ls = Client(url=LABEL_STUDIO_URL, api_key=API_KEY)
ls.check_connection()

// get existing project
project = ls.get_project(PROJECT_ID)

filters=Filters.create(Filters.OR, [Filters.item(Column.annotations_results, Operator.CONTAINS, Type.String, Filters.value("Person"))])
tasks = project.get_tasks(filters=filters)
id_filtered_list = [d["id"] for d in tasks]

project.export_tasks(export_type="YOLO", download_all_tasks=False, download_resources=True, ids=id_filtered_list, export_location="~/label_studio_sdk/export_data")

This is the label configuration:

<View>
  <Image name="image" value="$image" zoom="true"/>

  <Header value="RectangleLabels"/>
  <RectangleLabels name="label" toName="image">
  <Label value="Person" background="#FFA39E"/><Label value="Car" background="#729fcf"/><Label value="Bus" background="#8ae234"/><Label value="Truck" background="#a40000"/><Label value="Motorcycle" background="#e9b96e"/><Label value="Bicycle" background="#ad7fa8"/></RectangleLabels>
</View>

The idea is to filter the images containing a label and download the images and the labels. It would be also nice to be able to download a single label info even if we have multiple labels in the dataset.

Thank you.

from label-studio.

Related Issues (20)

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.