From 2de3e9bb78099fc8e09efcbb19e79d032b20bd61 Mon Sep 17 00:00:00 2001 From: Takahiro Tamenishi Date: Wed, 14 Sep 2022 15:29:48 +0900 Subject: [PATCH 1/4] add integrate video --- README.md | 28 ++++++++++++++++++++++++++++ fastlabel/__init__.py | 15 +++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/README.md b/README.md index c1cb364..f37c0a6 100644 --- a/README.md +++ b/README.md @@ -740,6 +740,34 @@ 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: image +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 +(omit) +- video/cat/9.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 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, From 0f8015872df13b7a5e5a644322c0100b5773a198 Mon Sep 17 00:00:00 2001 From: Takahiro Tamenishi Date: Thu, 15 Sep 2022 10:06:59 +0900 Subject: [PATCH 2/4] fix readme --- README.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f37c0a6..eb9e418 100644 --- a/README.md +++ b/README.md @@ -314,9 +314,9 @@ 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. @@ -748,17 +748,16 @@ 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: image -object name: cat.mp4 -split count: 3 +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 -(omit) -- video/cat/9.mp4 + In this case, SPLIT_VIDEO_TASK_NAME_PREFIX specifies `video/cat`. @@ -1200,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. From c5671d359819917e469e937d84915a7b17d8cc49 Mon Sep 17 00:00:00 2001 From: Takahiro Tamenishi Date: Thu, 15 Sep 2022 10:14:27 +0900 Subject: [PATCH 3/4] fix readme --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index eb9e418..5697226 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 @@ -748,9 +748,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: video -Object name: cat.mp4 -Split count: 3 +- Dataset slug: video +- Object name: cat.mp4 +- Split count: 3 Objects are registered in the data set in the following form. @@ -1199,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. From c3aa1090bea8fac00c6635c2e0391ec07b9402ba Mon Sep 17 00:00:00 2001 From: Takahiro Tamenishi Date: Thu, 15 Sep 2022 10:18:52 +0900 Subject: [PATCH 4/4] fix readme --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 5697226..f259a71 100644 --- a/README.md +++ b/README.md @@ -314,9 +314,9 @@ 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. @@ -748,9 +748,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: video -- Object name: cat.mp4 -- Split count: 3 +- Dataset slug: `video` +- Object name: `cat.mp4` +- Split count: `3` Objects are registered in the data set in the following form. @@ -1199,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.