Skip to content

Commit d94f14a

Browse files
authored
Merge pull request #121 from fastlabel/integrate-video
add integrate video
2 parents 843e6e6 + c3aa109 commit d94f14a

File tree

2 files changed

+49
-7
lines changed

2 files changed

+49
-7
lines changed

README.md

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -314,16 +314,16 @@ Only bbox and polygon annotation types are supported.
314314

315315
In the case of a task divided under the following conditions.
316316

317-
dataset slug: image
318-
object name: cat.jpg
319-
split count: 3×3
317+
- Dataset slug: `image`
318+
- Object name: `cat.jpg`
319+
- Split count: `3×3`
320320

321321
Objects are registered in the data set in the following form.
322322

323323
- image/cat/1.jpg
324324
- image/cat/2.jpg
325325
- image/cat/3.jpg
326-
(omit)
326+
- (omit)
327327
- image/cat/9.jpg
328328

329329

@@ -742,6 +742,33 @@ task_id = client.update_video_task(
742742
}]
743743
)
744744
```
745+
#### Integrate Video
746+
747+
This function is alpha version. It is subject to major changes in the future.
748+
749+
Integration is possible only when tasks are registered from the objects divided by the dataset.
750+
751+
In the case of a task divided under the following conditions.
752+
753+
- Dataset slug: `video`
754+
- Object name: `cat.mp4`
755+
- Split count: `3`
756+
757+
Objects are registered in the data set in the following form.
758+
759+
- video/cat/1.mp4
760+
- video/cat/2.mp4
761+
- video/cat/3.mp4
762+
763+
764+
In this case, SPLIT_VIDEO_TASK_NAME_PREFIX specifies `video/cat`.
765+
766+
```python
767+
task = client.find_integrated_video_task_by_prefix(
768+
project="YOUR_PROJECT_SLUG",
769+
prefix="SPLIT_VIDEO_TASK_NAME_PREFIX",
770+
)
771+
```
745772

746773
#### Response
747774

@@ -1174,9 +1201,9 @@ Integration is possible only when tasks are registered from the objects divided
11741201

11751202
In the case of a task divided under the following conditions.
11761203

1177-
dataset slug: audio
1178-
object name: voice.mp3
1179-
split count: 3
1204+
- Dataset slug: `audio`
1205+
- Object name: `voice.mp3`
1206+
- Split count: `3`
11801207

11811208
Objects are registered in the data set in the following form.
11821209

fastlabel/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,6 +1590,21 @@ def find_integrated_image_task_by_prefix(
15901590

15911591
return self.api.get_request(endpoint, params=params)
15921592

1593+
def find_integrated_video_task_by_prefix(
1594+
self,
1595+
project: str,
1596+
prefix: str,
1597+
) -> dict:
1598+
"""
1599+
Returns a integrate video task.
1600+
1601+
project is slug of your project (Required).
1602+
prefix is a prefix of task name (Required).
1603+
"""
1604+
endpoint = "tasks/integrate/videos"
1605+
params = {"project": project, "prefix": prefix}
1606+
1607+
return self.api.get_request(endpoint, params=params)
15931608

15941609
def find_integrated_audio_task_by_prefix(
15951610
self,

0 commit comments

Comments
 (0)