Skip to content

Commit

Permalink
Add flat images to existing task defs
Browse files Browse the repository at this point in the history
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
  • Loading branch information
alex-jw-brooks committed Jan 22, 2024
1 parent a0ea2e2 commit f967218
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions caikit_computer_vision/data_model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

# Local
from . import image_classification, image_segmentation, object_detection, tasks
from .flat_image import *
from .image_classification import *
from .image_segmentation import *
from .object_detection import *
7 changes: 4 additions & 3 deletions caikit_computer_vision/data_model/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
from caikit.core import TaskBase, task

# Local
from .flat_image import FlatImage
from .image_classification import ImageClassificationResult
from .image_segmentation import ImageSegmentationResult
from .object_detection import ObjectDetectionResult


# TODO - add support for image DM primitives
@task(
required_parameters={"inputs": Union[bytes, str]},
required_parameters={"inputs": Union[bytes, str, FlatImage]},
output_type=ObjectDetectionResult,
)
class ObjectDetectionTask(TaskBase):
Expand All @@ -40,7 +41,7 @@ class ObjectDetectionTask(TaskBase):


@task(
required_parameters={"inputs": Union[bytes, str]},
required_parameters={"inputs": Union[bytes, str, FlatImage]},
output_type=ImageClassificationResult,
)
class ImageClassificationTask(TaskBase):
Expand All @@ -51,7 +52,7 @@ class ImageClassificationTask(TaskBase):


@task(
required_parameters={"inputs": Union[bytes, str]},
required_parameters={"inputs": Union[bytes, str, FlatImage]},
output_type=ImageSegmentationResult,
)
class ImageSegmentationTask(TaskBase):
Expand Down

0 comments on commit f967218

Please sign in to comment.