Skip to content

Commit

Permalink
UI: don't send the convMaskToPoly parameter on interactive detector c…
Browse files Browse the repository at this point in the history
…alls

The server doesn't use it; in the interactive case, the mask-to-polygon
conversion is handled by the UI itself.
  • Loading branch information
SpecLad committed Jun 24, 2024
1 parent deb9681 commit 8254108
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1231,8 +1231,11 @@ export class ToolsControlComponent extends React.PureComponent<Props, State> {

try {
this.setState({ mode: 'detection', fetching: true });

const { convMaskToPoly, ...restOfBody } = body;

const result = await core.lambda.call(jobInstance.taskId, model, {
...body, frame, job: jobInstance.id,
...restOfBody, frame, job: jobInstance.id,
}) as DetectedShapes;

const states = result.map(
Expand Down Expand Up @@ -1307,7 +1310,7 @@ export class ToolsControlComponent extends React.PureComponent<Props, State> {
});
}

if (data.type === 'mask' && data.points && body.convMaskToPoly) {
if (data.type === 'mask' && data.points && convMaskToPoly) {
return new core.classes.ObjectState({
...objectData,
shapeType: ShapeType.POLYGON,
Expand Down

0 comments on commit 8254108

Please sign in to comment.