Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOG serverless function + some fixes #2578

Merged
merged 33 commits into from
Feb 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
40275cf
Initial version of Inside Outside Guidance serverless function
Oct 12, 2020
f8bfb5f
Fix function.yaml for IOG
Oct 12, 2020
5e8ccd9
Add "processorMountMode: volume" to restart containers after reboot (…
Oct 13, 2020
5e4c8e0
Fix crash in IOG serverless function (it doesn't work right now as well)
Oct 13, 2020
3cbd3c0
Fix for points translation from crop to image.
Oct 13, 2020
afc7eef
Add crop_box parameter to IOG function
Oct 22, 2020
f538f30
Merge remote-tracking branch 'origin/develop' into nm/serverlss_tutorial
Oct 22, 2020
d23e76b
Update nuclio dashboard till 1.5.1 version
Oct 22, 2020
119d30f
Support neg_points in interactors
Oct 23, 2020
208528d
Add dummy serverless function for optimization
Oct 23, 2020
3f647d0
Remove dummy serverless function and update the list of available ser…
Oct 23, 2020
8f7a055
Improved deployment process of serverless functions
Oct 24, 2020
1b14f38
Improve installation.md for serverless functions.
Oct 24, 2020
ec08d4a
Minor changes in doc for serverless
Oct 24, 2020
bbd5dbc
Merge remote-tracking branch 'origin/develop' into nm/serverlss_tutorial
Oct 24, 2020
b8951c6
Merge remote-tracking branch 'origin/develop' into nm/serverlss_tutorial
Nov 10, 2020
d3b1df3
Merge remote-tracking branch 'origin/develop' into nm/serverlss_tutorial
Dec 15, 2020
b7b4d79
Revert the tutorial.
Dec 15, 2020
303eea5
Merge remote-tracking branch 'origin/develop' into nm/serverless_iog
Feb 3, 2021
5b33aca
Merged develop
Feb 5, 2021
9f25e8b
Merge branch 'nm/serverless_iog' of github.com:openvinotoolkit/cvat i…
Feb 9, 2021
63eb39d
Fix codacy issues
Feb 9, 2021
2defc22
Update CHANGELOG, use NUCLIO_DASHBOARD_DEFAULT_FUNCTION_MOUNT_MODE as
Feb 9, 2021
d64c0ef
Removed volume mode from functions (it is handled by
Feb 9, 2021
16fefe7
Disable warning from markdown linter about max line length for a table.
Feb 9, 2021
97e2984
Revert wrong changes
Feb 9, 2021
cd58eb2
Merge remote-tracking branch 'origin/develop' into nm/serverless_iog
Feb 9, 2021
7f7d6f9
Reverted changes in requirements for cvat (numpy).
Feb 9, 2021
049c643
Dashboard env variable doesn't work by a reason. Added back mountMode
Feb 10, 2021
34177f3
Fix IOG function with conda environment
Feb 10, 2021
ece913b
Fix tensorflow matterport/mask_rcnn
Feb 10, 2021
b65c03d
Merge remote-tracking branch 'origin/develop' into nm/serverless_iog
Feb 10, 2021
e76be34
Bump version of cvat-ui.
Feb 10, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/develop' into nm/serverless_iog
  • Loading branch information
Nikita Manovich committed Feb 3, 2021
commit 303eea5f412b111f8b97c3f09eb579425aea230a
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class OpenCVControlComponent extends React.PureComponent<Props & DispatchToProps
const {
shapesUpdated, isDone, threshold, shapes,
} = (e as CustomEvent).detail;
const pressedPoints = convertShapesForInteractor(shapes).flat();
const pressedPoints = convertShapesForInteractor(shapes, 0).flat();
this.interactionIsDone = isDone;

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,6 @@ const mapDispatchToProps = {
createAnnotations: createAnnotationsAsync,
};

function convertShapesForInteractor(shapes: InteractionResult[], button: number): number[][] {
const reducer = (acc: number[][], _: number, index: number, array: number[]): number[][] => {
if (!(index % 2)) {
// 0, 2, 4
acc.push([array[index], array[index + 1]]);
}
return acc;
};

return shapes.filter((shape: InteractionResult): boolean => shape.shapeType === 'points' && shape.button === button)
.map((shape: InteractionResult): number[] => shape.points)
.flat()
.reduce(reducer, []);
}

type Props = StateToProps & DispatchToProps;
interface State {
activeInteractor: Model | null;
Expand Down
16 changes: 8 additions & 8 deletions cvat-ui/src/components/labels-editor/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@ function validateParsedAttribute(attr: Attribute): void {

if (!['number', 'undefined'].includes(typeof attr.id)) {
throw new Error(
`Attribute: "${attr.name}". ` + `Type of attribute id must be a number or undefined. Got value ${attr.id}`,
`Attribute: "${attr.name}". Type of attribute id must be a number or undefined. Got value ${attr.id}`,
);
}

if (!['checkbox', 'number', 'text', 'radio', 'select'].includes((attr.input_type || '').toLowerCase())) {
throw new Error(`Attribute: "${attr.name}". ` + `Unknown input type: ${attr.input_type}`);
throw new Error(`Attribute: "${attr.name}". Unknown input type: ${attr.input_type}`);
}

if (typeof attr.mutable !== 'boolean') {
throw new Error(
`Attribute: "${attr.name}". ` + `Mutable flag must be a boolean value. Got value ${attr.mutable}`,
`Attribute: "${attr.name}". Mutable flag must be a boolean value. Got value ${attr.mutable}`,
);
}

if (!Array.isArray(attr.values)) {
throw new Error(
`Attribute: "${attr.name}". ` + `Attribute values must be an array. Got type ${typeof attr.values}`,
`Attribute: "${attr.name}". Attribute values must be an array. Got type ${typeof attr.values}`,
);
}

Expand All @@ -52,7 +52,7 @@ function validateParsedAttribute(attr: Attribute): void {

for (const value of attr.values) {
if (typeof value !== 'string') {
throw new Error(`Attribute: "${attr.name}". ` + `Each value must be a string. Got value ${value}`);
throw new Error(`Attribute: "${attr.name}". Each value must be a string. Got value ${value}`);
}
}
}
Expand All @@ -64,12 +64,12 @@ export function validateParsedLabel(label: Label): void {

if (!['number', 'undefined'].includes(typeof label.id)) {
throw new Error(
`Label "${label.name}". ` + `Type of label id must be only a number or undefined. Got value ${label.id}`,
`Label "${label.name}". Type of label id must be only a number or undefined. Got value ${label.id}`,
);
}

if (typeof label.color !== 'string') {
throw new Error(`Label "${label.name}". ` + `Label color must be a string. Got ${typeof label.color}`);
throw new Error(`Label "${label.name}". Label color must be a string. Got ${typeof label.color}`);
}

if (!label.color.match(/^#[0-9a-fA-F]{6}$|^$/)) {
Expand All @@ -80,7 +80,7 @@ export function validateParsedLabel(label: Label): void {
}

if (!Array.isArray(label.attributes)) {
throw new Error(`Label "${label.name}". ` + `attributes must be an array. Got type ${typeof label.attributes}`);
throw new Error(`Label "${label.name}". Attributes must be an array. Got type ${typeof label.attributes}`);
}

for (const attr of label.attributes) {
Expand Down
16 changes: 8 additions & 8 deletions cvat-ui/src/cvat-canvas-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ import {
InteractionResult as _InteractionResult,
} from 'cvat-canvas/src/typescript/canvas';

export function convertShapesForInteractor(shapes: InteractionResult[]): number[][] {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function convertShapesForInteractor(shapes: InteractionResult[], button: number): number[][] {
const reducer = (acc: number[][], _: number, index: number, array: number[]): number[][] => {
if (!(index % 2)) { // 0, 2, 4
acc.push([
array[index],
array[index + 1],
]);
if (!(index % 2)) {
// 0, 2, 4
acc.push([array[index], array[index + 1]]);
}
return acc;
};

return shapes.filter((shape: InteractionResult): boolean => shape.shapeType === 'points' && shape.button === 0)
return shapes.filter((shape: InteractionResult): boolean => shape.shapeType === 'points' && shape.button === button)
.map((shape: InteractionResult): number[] => shape.points)
.flat().reduce(reducer, []);
.flat()
.reduce(reducer, []);
}

export type InteractionData = _InteractionData;
Expand Down
2 changes: 1 addition & 1 deletion cvat/requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ django-compressor==2.4
django-rq==2.3.2
EasyProcess==0.3
Pillow==7.2.0
numpy==1.20.0
numpy==1.19.2
python-ldap==3.3.1
pytz==2020.1
pyunpack==0.2.1
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.