diff --git a/README.md b/README.md index c1cb364..f259a71 100644 --- a/README.md +++ b/README.md @@ -314,16 +314,16 @@ Only bbox and polygon annotation types are supported. In the case of a task divided under the following conditions. -dataset slug: image -object name: cat.jpg -split count: 3×3 +- Dataset slug: `image` +- Object name: `cat.jpg` +- Split count: `3×3` Objects are registered in the data set in the following form. - image/cat/1.jpg - image/cat/2.jpg - image/cat/3.jpg -(omit) +- (omit) - image/cat/9.jpg @@ -740,6 +740,33 @@ task_id = client.update_video_task( }] ) ``` +#### Integrate Video + +This function is alpha version. It is subject to major changes in the future. + +Integration is possible only when tasks are registered from the objects divided by the dataset. + +In the case of a task divided under the following conditions. + +- Dataset slug: `video` +- Object name: `cat.mp4` +- Split count: `3` + +Objects are registered in the data set in the following form. + +- video/cat/1.mp4 +- video/cat/2.mp4 +- video/cat/3.mp4 + + +In this case, SPLIT_VIDEO_TASK_NAME_PREFIX specifies `video/cat`. + +```python +task = client.find_integrated_video_task_by_prefix( + project="YOUR_PROJECT_SLUG", + prefix="SPLIT_VIDEO_TASK_NAME_PREFIX", +) +``` #### Response @@ -1172,9 +1199,9 @@ Integration is possible only when tasks are registered from the objects divided In the case of a task divided under the following conditions. -dataset slug: audio -object name: voice.mp3 -split count: 3 +- Dataset slug: `audio` +- Object name: `voice.mp3` +- Split count: `3` Objects are registered in the data set in the following form. diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index f308346..6826cee 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -1590,6 +1590,21 @@ def find_integrated_image_task_by_prefix( return self.api.get_request(endpoint, params=params) + def find_integrated_video_task_by_prefix( + self, + project: str, + prefix: str, + ) -> dict: + """ + Returns a integrate video task. + + project is slug of your project (Required). + prefix is a prefix of task name (Required). + """ + endpoint = "tasks/integrate/videos" + params = {"project": project, "prefix": prefix} + + return self.api.get_request(endpoint, params=params) def find_integrated_audio_task_by_prefix( self,