Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #9 from retailnext/data_path_to_nuclio_payload
Browse files Browse the repository at this point in the history
Add data_path to nuclio payload
  • Loading branch information
mikhail-treskin authored Oct 25, 2023
2 parents c19ea38 + b8efc57 commit 5503cab
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cvat/apps/lambda_manager/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

import cvat.apps.dataset_manager as dm
from cvat.apps.engine.frame_provider import FrameProvider
from cvat.apps.engine.models import Job, ShapeType, SourceType, Task
from cvat.apps.engine.models import Job, ShapeType, SourceType, Task, DataChoice
from cvat.apps.engine.serializers import LabeledDataSerializer
from cvat.apps.lambda_manager.serializers import (
FunctionCallRequestSerializer, FunctionCallSerializer
Expand Down Expand Up @@ -293,8 +293,15 @@ def mandatory_arg(name: str) -> Any:


if self.kind == LambdaType.DETECTOR:
if db_task.data.original_chunk_type == DataChoice.VIDEO:
data_path = db_task.data.video.path
elif db_task.data.original_chunk_type == DataChoice.IMAGESET:
data_path = db_task.data.images.get(frame=data["frame"]).path
else:
data_path = ""
payload.update({
"image": self._get_image(db_task, mandatory_arg("frame"), quality)
"image": self._get_image(db_task, data["frame"], quality),
"data_path": data_path
})
elif self.kind == LambdaType.INTERACTOR:
payload.update({
Expand Down

0 comments on commit 5503cab

Please sign in to comment.