HumanSignal / label-studio-converter

Tools for converting Label Studio annotations into common dataset formats
https://labelstud.io/
255 stars 132 forks source link

How to add filter on export the project #181

Closed AimannKhan closed 1 year ago

AimannKhan commented 1 year ago

I want to download separate files of JSON for each Labeled file, moreover also want to download the Labeled text file, how should it do on LS?

makseq commented 1 year ago

Sorry, your question is unclear.

  1. why are you talking about "filter on export" in the title?
  2. what are "separate files of JSON for each Labeled file"?

It's better to show how your export JSON looks like.

AimannKhan commented 1 year ago

Hi, Thank you for your response I want to export each txt file json, by this I need to create different projects. I need to put multiple text files in one project and then add a filter that exports individual json for each text file. Is it possible? it is a requirement that's why I ask that question I tried and searched but it is not done

On Thu, Jan 19, 2023 at 7:27 AM Max Tkachenko @.***> wrote:

Sorry, your question is unclear.

  1. why are you talking about "filter on export" in the title?
  2. what are "separate files of JSON for each Labeled file"?

It's better to show how your export JSON looks like.

— Reply to this email directly, view it on GitHub https://github.com/heartexlabs/label-studio-converter/issues/181#issuecomment-1396361417, or unsubscribe https://github.com/notifications/unsubscribe-auth/A44KCM5GTOQMVKMFR523HDTWTCRADANCNFSM6AAAAAATXW3IZE . You are receiving this because you authored the thread.Message ID: @.***>

makseq commented 1 year ago

The first option is to use easy export API call https://labelstud.io/sdk/project.html#label_studio_sdk.project.Project.export_tasks you can specify task ids there.

The second option is to use export snapshots API, where you can pass tab id and tasks from this tab will be taken for the export: https://github.com/heartexlabs/label-studio-sdk/blob/72c6279ea494674e7db1d83e599106d4c5c2dafb/examples/export_snapshots.py#L30 In the DM tab you can setup filters as you want to make a task slice.

AimannKhan commented 1 year ago

Thank you!

On Thu, Mar 9, 2023 at 8:35 AM Max Tkachenko @.***> wrote:

Closed #181 https://github.com/heartexlabs/label-studio-converter/issues/181 as completed.

— Reply to this email directly, view it on GitHub https://github.com/heartexlabs/label-studio-converter/issues/181#event-8702853345, or unsubscribe https://github.com/notifications/unsubscribe-auth/A44KCM2JTKQMMOV7M2G6X73W3FFXHANCNFSM6AAAAAATXW3IZE . You are receiving this because you authored the thread.Message ID: <heartexlabs/label-studio-converter/issue/181/issue_event/8702853345@ github.com>