Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to save off .pose files for each segment #5

Merged

Conversation

cleong110
Copy link
Contributor

No description provided.

sign_language_segmentation/bin.py Outdated Show resolved Hide resolved
sign_language_segmentation/bin.py Outdated Show resolved Hide resolved
sign_language_segmentation/bin.py Outdated Show resolved Hide resolved
sign_language_segmentation/bin.py Outdated Show resolved Hide resolved
Copy link
Contributor

@AmitMY AmitMY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there!

sign_language_segmentation/bin.py Outdated Show resolved Hide resolved
sign_language_segmentation/bin.py Outdated Show resolved Hide resolved
sign_language_segmentation/bin.py Outdated Show resolved Hide resolved
…ines/whitespace, and opening with a specific encoding
Copy link
Contributor

@AmitMY AmitMY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just types left :)

@cleong110
Copy link
Contributor Author

All right, I think we're about good, though there's probably more stylistic improvements to be made.
pylint doesn't like how long main is, there's some missing output annotations, and we could refactor some functions, but I think those might jobs for another day

ChatGPT has these suggestions: https://chatgpt.com/share/675065df-c64c-800e-b171-5486a47eb024

for segment in segments:
eaf.add_annotation(tier_id, int(segment["start"] / fps * 1000), int(segment["end"] / fps * 1000))
# convert frame numbers to millisecond timestamps, for Elan
start_frame_time = int(segment["start"] / fps * frames_per_millisecond)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this implementation is now wrong.
Was:

segment["start"] / fps * 1000

Now:

segment["start"] / fps * fps * 1000

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest

start_time = int(segment["start"] / fps * 1000)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, it was wrong indeed! Fixed now

@AmitMY AmitMY merged commit 1891628 into sign-language-processing:main Dec 4, 2024
0 of 2 checks passed
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.

2 participants