diff --git a/lib/TaskProcessing/AudioClassificationTaskType.php b/lib/TaskProcessing/AudioClassificationTaskType.php new file mode 100644 index 00000000..8d348c92 --- /dev/null +++ b/lib/TaskProcessing/AudioClassificationTaskType.php @@ -0,0 +1,72 @@ +l->t('Audio classification'); + } + + /** + * @inheritDoc + */ + public function getDescription(): string { + return $this->l->t('Classify audios into categories.'); + } + + /** + * @return string + */ + public function getId(): string { + return self::ID; + } + + /** + * @return ShapeDescriptor[] + */ + public function getInputShape(): array { + return [ + 'input' => new ShapeDescriptor( + $this->l->t('Audios'), + $this->l->t('Provide audios to classify'), + EShapeType::ListOfAudios, + ), + ]; + } + + /** + * @return ShapeDescriptor[] + */ + public function getOutputShape(): array { + return [ + 'output' => new ShapeDescriptor( + $this->l->t('Categories'), + $this->l->t('The classified categories. Each input audio is mapped to a text containing a comma separated list of categories.'), + EShapeType::ListOfTexts, + ), + ]; + } +} diff --git a/lib/TaskProcessing/ImageClassificationTaskType.php b/lib/TaskProcessing/ImageClassificationTaskType.php new file mode 100644 index 00000000..83bc938b --- /dev/null +++ b/lib/TaskProcessing/ImageClassificationTaskType.php @@ -0,0 +1,72 @@ +l->t('Image classification'); + } + + /** + * @inheritDoc + */ + public function getDescription(): string { + return $this->l->t('Classify images into categories.'); + } + + /** + * @return string + */ + public function getId(): string { + return self::ID; + } + + /** + * @return ShapeDescriptor[] + */ + public function getInputShape(): array { + return [ + 'input' => new ShapeDescriptor( + $this->l->t('Images'), + $this->l->t('Provide images to classify'), + EShapeType::ListOfImages, + ), + ]; + } + + /** + * @return ShapeDescriptor[] + */ + public function getOutputShape(): array { + return [ + 'output' => new ShapeDescriptor( + $this->l->t('Categories'), + $this->l->t('The classified categories. Each input image is mapped to a text containing a comma separated list of categories.'), + EShapeType::ListOfTexts, + ), + ]; + } +} diff --git a/lib/TaskProcessing/ImageFaceRecognitionTaskType.php b/lib/TaskProcessing/ImageFaceRecognitionTaskType.php new file mode 100644 index 00000000..b018380f --- /dev/null +++ b/lib/TaskProcessing/ImageFaceRecognitionTaskType.php @@ -0,0 +1,72 @@ +l->t('Image face recognition'); + } + + /** + * @inheritDoc + */ + public function getDescription(): string { + return $this->l->t('Recognize faces in images and return embedding vectors for each face.'); + } + + /** + * @return string + */ + public function getId(): string { + return self::ID; + } + + /** + * @return ShapeDescriptor[] + */ + public function getInputShape(): array { + return [ + 'input' => new ShapeDescriptor( + $this->l->t('Images'), + $this->l->t('Provide images to recognize faces in'), + EShapeType::ListOfImages, + ), + ]; + } + + /** + * @return ShapeDescriptor[] + */ + public function getOutputShape(): array { + return [ + 'output' => new ShapeDescriptor( + $this->l->t('Faces'), + $this->l->t('The detected faces. Each input image is mapped to a text containing JSON-encoded embedding vectors separated by line breaks.'), + EShapeType::ListOfTexts, + ), + ]; + } +} diff --git a/lib/TaskProcessing/VideoClassificationTaskType.php b/lib/TaskProcessing/VideoClassificationTaskType.php new file mode 100644 index 00000000..0f820309 --- /dev/null +++ b/lib/TaskProcessing/VideoClassificationTaskType.php @@ -0,0 +1,72 @@ +l->t('Video classification'); + } + + /** + * @inheritDoc + */ + public function getDescription(): string { + return $this->l->t('Classify videos into categories.'); + } + + /** + * @return string + */ + public function getId(): string { + return self::ID; + } + + /** + * @return ShapeDescriptor[] + */ + public function getInputShape(): array { + return [ + 'input' => new ShapeDescriptor( + $this->l->t('Videos'), + $this->l->t('Provide videos to classify'), + EShapeType::ListOfVideos, + ), + ]; + } + + /** + * @return ShapeDescriptor[] + */ + public function getOutputShape(): array { + return [ + 'output' => new ShapeDescriptor( + $this->l->t('Categories'), + $this->l->t('The classified categories. Each input video is mapped to a text containing a comma separated list of categories.'), + EShapeType::ListOfTexts, + ), + ]; + } +}