Skip to content

Commit

Permalink
Merge branch 'develop' into bs/minor_style_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev committed Jun 25, 2024
2 parents 75070c9 + 25fc37b commit 935b156
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
4 changes: 4 additions & 0 deletions changelog.d/20240624_145717_boris.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Fixed

- Slightly broken layout when running attributed face detection model
(<https://github.com/cvat-ai/cvat/pull/8072>)
Original file line number Diff line number Diff line change
Expand Up @@ -1231,8 +1231,12 @@ export class ToolsControlComponent extends React.PureComponent<Props, State> {

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

// The function call endpoint doesn't support the cleanup and convMaskToPoly parameters.
const { cleanup, 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 +1311,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
12 changes: 6 additions & 6 deletions cvat-ui/src/components/model-runner-modal/object-mapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ function ObjectMapperComponent(props: Props): JSX.Element {
return (
<React.Fragment key={`${leftName}:${rightName}`}>
<Row className={rowClassName} key={`${leftName}:${rightName}`}>
<Col span={10}>
<Col span={9}>
<Tag style={{ color: textColor }} color={color} key={leftName}>{leftName}</Tag>
</Col>
<Col span={10} offset={1}>
<Col span={9} offset={1}>
<Tag style={{ color: textColor }} color={color} key={rightName}>{rightName}</Tag>
</Col>
<Col span={1} offset={1}>
<Col span={2} offset={1}>
<CVATTooltip title={deleteMappingLabel}>
<DeleteOutlined
className='cvat-danger-circle-icon'
Expand All @@ -103,7 +103,7 @@ function ObjectMapperComponent(props: Props): JSX.Element {

{ (leftValue === null || rightValue === null) && !!notMappedLeft.length && (
<Row className={rowClassName}>
<Col span={10}>
<Col span={9}>
<Select
virtual
showSearch
Expand All @@ -124,7 +124,7 @@ function ObjectMapperComponent(props: Props): JSX.Element {
))}
</Select>
</Col>
<Col span={10} offset={1}>
<Col span={9} offset={1}>
<Select
virtual
showSearch
Expand All @@ -145,7 +145,7 @@ function ObjectMapperComponent(props: Props): JSX.Element {
))}
</Select>
</Col>
<Col span={1} offset={1}>
<Col span={2} offset={1}>
{ (leftValue === null && rightValue === null) ? (
<Col span={1} offset={1}>
<CVATTooltip title={infoMappingLabel}>
Expand Down
8 changes: 3 additions & 5 deletions cvat-ui/src/components/model-runner-modal/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@

&:has(.cvat-runner-label-mapper) {
max-height: $grid-unit-size * 64;
overflow-y: auto;
overflow: hidden auto;
}

> .cvat-runner-label-mapper {
margin-top: $grid-unit-size * 2;
margin-bottom: $grid-unit-size * 2;
padding-left: $grid-unit-size * 4;
padding-right: $grid-unit-size * 4;
margin-left: $grid-unit-size * 2;
}

.cvat-runner-attribute-mapper {
Expand All @@ -42,8 +41,7 @@
width: 100%;
margin-top: $grid-unit-size * 2;
margin-bottom: $grid-unit-size * 2;
padding-left: $grid-unit-size * 4;
padding-right: $grid-unit-size * 4;
margin-left: $grid-unit-size * 2;
}
}

Expand Down

0 comments on commit 935b156

Please sign in to comment.