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

[AI-1486] fix darwin py 0835 bug loading version in videos #752

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ChristofferEdlund
Copy link
Contributor

@ChristofferEdlund ChristofferEdlund commented Dec 13, 2023

Problem

There are a few updates in latest darwin-py that breaks other parts of the code.

First, the get_darwin_json_version method assumes a flat structure of json files. Which is not true when we download with folders and/or video.

with open(next(annotations_dir.glob("*.json")), "r") as file:

Secondly, the compute_distributions will now add an extra .json on top of what is now the fill file path (with suffix).

def compute_distributions(

Example usage:

from darwin.dataset.split_manager import split_dataset
from darwin.dataset.utils import compute_distributions
p = Path(p)
split_path = split_dataset(
    p,
    release_name="example",
    val_percentage=0.2,
    test_percentage=0.2,
    stratified_types=["polygon"],
)

split_name = split_path.name

distributions = compute_distributions(p, split_path)

Thirdly, the get_image_path_from_stream` has now additional required arguments. This function is being used since before in _map_annotations_to_images and that one has not been updated to take the new arguments into account.

Solution

  • TBD, this is just a DRAFT

Changelog

(Will appear in release docs)

Copy link

linear bot commented Dec 13, 2023

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.

None yet

1 participant