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

sampled timepoint gaps are vastly off from set frame sample rate #90

Closed
keighrim opened this issue Apr 2, 2024 · 0 comments · Fixed by #91
Closed

sampled timepoint gaps are vastly off from set frame sample rate #90

keighrim opened this issue Apr 2, 2024 · 0 comments · Fixed by #91
Labels
🐛B Something isn't working

Comments

@keighrim
Copy link
Member

keighrim commented Apr 2, 2024

Bug Description

When calling the app with a sampling rate of 1000 ms (default value), the output TimePoint are actually annotating frames sampled at ~967 due to the loss of decimal point precision in the upstream SDK code. This was introduced in 1953bab and only v4.2 is affected.

Reproduction steps

Here's an example MMIF output snippet

      "annotations": [
        {
          "@type": "http://mmif.clams.ai/vocabulary/TimePoint/v2",
          "properties": {
            "timePoint": 0,
            "label": "B",
            "classification": {
                ...
            },
            "id": "tp_1"
          }
        },
        {
          "@type": "http://mmif.clams.ai/vocabulary/TimePoint/v2",
          "properties": {
            "timePoint": 967,
            "label": "B",
            "classification": {
                ...
            },
            "id": "tp_2"
          }
        },
        {
          "@type": "http://mmif.clams.ai/vocabulary/TimePoint/v2",
          "properties": {
            "timePoint": 1935,
            "label": "B",
            "classification": {
                ...
            },
            "id": "tp_3"
          }
        },
        {
          "@type": "http://mmif.clams.ai/vocabulary/TimePoint/v2",
          "properties": {
            "timePoint": 2902,
            "label": "B",
            "classification": {
                ...
            },
            "id": "tp_4"
          }
        },
        {
          "@type": "http://mmif.clams.ai/vocabulary/TimePoint/v2",
          "properties": {
            "timePoint": 3870,
            "label": "B",
            "classification": {
                ...
            },
            "id": "tp_5"
          }
        },

Expected behavior

No response

Log output

No response

Screenshots

No response

Additional context

new version of mmif-python (1.0.13) includes a patch to support sample frames with fractional sampling rate (directly re-using video FPS value)

@keighrim keighrim added the 🐛B Something isn't working label Apr 2, 2024
@keighrim keighrim changed the title sampled timepoints are vastly off from set f sampled timepoint gaps are vastly off from set frame sample rate Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛B Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant