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

[DOCS] Is there a documentation for converting video dataset into frames or images and vice versa? #5427

Open
1 of 3 tasks
DWSuryo opened this issue Jan 23, 2025 · 3 comments
Labels
documentation Documentation work

Comments

@DWSuryo
Copy link

DWSuryo commented Jan 23, 2025

URL(s) with the issue

https://docs.voxel51.com/recipes/convert_datasets.html

Description of proposal (what needs changing)

Title. As the link I refer, there are some things I want to talk. I think this documentation only covers the dataset conversion for the same media type, for example, image to image. With that, I want to ask:

  1. Is there a documentation or at least a tutorial to convert the video to image dataset and vice versa?
  2. At that link, looks like the notebook heavily uses CLI commands. Is there a python friendly tutorial that reduces CLI usage?

That is all I can say for now. I will update later.

Willingness to contribute

The FiftyOne Community encourages documentation contributions. Would you or another member of your organization be willing to contribute a fix for this documentation issue to the FiftyOne codebase?

  • Yes. I can contribute a documentation fix independently
  • Yes. I would be willing to contribute a documentation fix with guidance from the FiftyOne community
  • No. I cannot contribute a documentation fix at this time
@DWSuryo DWSuryo added the documentation Documentation work label Jan 23, 2025
@DWSuryo
Copy link
Author

DWSuryo commented Jan 25, 2025

Update: I've tested myself a code for extracting video to frame.

Here's the code: Copy_of_FiftyOne_quickstart_video.ipynb

First thing I can do is just converting video to video dataset. Not sure for video to image dataset.

It's still rough and barebones though. The target is to make a label for each frame. I think I need help for this one.

Update (Jan 25, 2025): I've updated the code as suggested by using clone().to_frames to duplicate dataset and convert into frames at once

@swheaton
Copy link
Contributor

I think you are looking for to_frames() ! This will give you a view into your dataset. You could save this view to easily pull it up again, or if you want a separate dataset, clone() the view into a new dataset.

https://docs.voxel51.com/user_guide/using_views.html#frame-views

@DWSuryo
Copy link
Author

DWSuryo commented Jan 25, 2025

Nice! I overlooked this one as I came back to use the tutorial I'd mentioned before. So, in updated code (Jan 25, 2025), I've updated that it can convert into COCO and YOLOv5 (Ultralyticss) dataset. If I recall correctly, COCO uses one json for all annotations whereas Ultralytics separates the annotation per image. Am I correct at this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation work
Projects
None yet
Development

No branches or pull requests

2 participants