Skip to content

Add functions to extract first frame labels from cliplabels#64

Open
sharmishtaa wants to merge 10 commits into
mainfrom
feat_extract_start_frame_label
Open

Add functions to extract first frame labels from cliplabels#64
sharmishtaa wants to merge 10 commits into
mainfrom
feat_extract_start_frame_label

Conversation

@sharmishtaa

Copy link
Copy Markdown
Collaborator

Adds two new functions to extract only the first frame's labels from cliplabels.json files:

  • extract_start_frames_label: processes local files
  • extract_start_frames_label_s3: processes files on S3 (requires boto3)

Both functions read *_cliplabels.json files and create corresponding *_startlabels.json files containing only labels for frame id=0.

Before submitting a pull request (PR), please read the contributing guide.

Please fill out as much of this template as you can, but if you have any problems or questions, just leave a comment and we will help out :)

Description

What is this PR

  • Bug fix
  • [X ] Addition of a new feature
  • Other

Why is this PR needed?

This PR addresses the first step in the issue #63 which is a script for copying benchmark data from the temporary location to the benchmark location.

What does this PR do?
This script adds a function forstripping the cliplabels file and creating a new file that only contains the first label of the frame which will be shared in the benchmark for the Test data.

References

#63

How has this PR been tested?

Please explain how any new code has been tested, and how you have ensured that no existing functionality has changed.

Is this a breaking change?

No

Does this PR require an update to the documentation?

If any features have changed, or have been added. Please explain how the
documentation has been updated.

Checklist:

  • [ X] The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

sharmishtaa and others added 2 commits July 8, 2026 16:59
Adds two new functions to extract only the first frame's labels from
cliplabels.json files:
- extract_start_frames_label: processes local files
- extract_start_frames_label_s3: processes files on S3 (requires boto3)

Both functions read *_cliplabels.json files and create corresponding
*_startlabels.json files containing only labels for frame id=0.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@sharmishtaa

Copy link
Copy Markdown
Collaborator Author

I noticed that Matt had already generated startframe_labels.json but SWC and Allen had not, so we need to functionality to do this either locally or on s3. In general I will also add the script for copying data here, so will plan to update pyproject.toml with the boto installation. Just wanted to flag that in case you had other thoughts.

@sharmishtaa sharmishtaa requested review from niksirbi and sfmig July 9, 2026 00:07
@niksirbi

niksirbi commented Jul 9, 2026

Copy link
Copy Markdown
Member

Thanks for the PR @sharmishtaa ! I will make sure to take a look at this next week when I'm back from FENS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants