From 091a035e8f56d8a0fa319576d6ea5f6d362ef88c Mon Sep 17 00:00:00 2001 From: Andrey Zhavoronkov Date: Wed, 26 Apr 2023 22:24:15 +0300 Subject: [PATCH] Increase request body size for TransT tracker (#6073) --- CHANGELOG.md | 3 +- .../dschoerk/transt/nuclio/function-gpu.yaml | 5 +- .../dschoerk/transt/nuclio/function.yaml | 5 +- .../saic-vul/hrnet/nuclio/function.yaml | 84 +++++++++++++++++++ 4 files changed, 92 insertions(+), 5 deletions(-) create mode 100644 serverless/pytorch/saic-vul/hrnet/nuclio/function.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index dfe24e2290ae..d3527e3a14ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - TDB ### Fixed -- TDB +- Tracking of multiple objects (30 and more) with TransT tracker + () ### Security - TDB diff --git a/serverless/pytorch/dschoerk/transt/nuclio/function-gpu.yaml b/serverless/pytorch/dschoerk/transt/nuclio/function-gpu.yaml index ea727a6c87b4..05460fb42af7 100644 --- a/serverless/pytorch/dschoerk/transt/nuclio/function-gpu.yaml +++ b/serverless/pytorch/dschoerk/transt/nuclio/function-gpu.yaml @@ -65,7 +65,8 @@ spec: kind: 'http' workerAvailabilityTimeoutMilliseconds: 10000 attributes: - maxRequestBodySize: 33554432 # 32MB + # Set value from the calculation of tracking of 100 objects at the same time on a 4k image + maxRequestBodySize: 268435456 # 256MB resources: limits: @@ -76,4 +77,4 @@ spec: restartPolicy: name: always maximumRetryCount: 3 - mountMode: volume \ No newline at end of file + mountMode: volume diff --git a/serverless/pytorch/dschoerk/transt/nuclio/function.yaml b/serverless/pytorch/dschoerk/transt/nuclio/function.yaml index 6835f18759e8..5625cefa23cd 100644 --- a/serverless/pytorch/dschoerk/transt/nuclio/function.yaml +++ b/serverless/pytorch/dschoerk/transt/nuclio/function.yaml @@ -65,11 +65,12 @@ spec: kind: 'http' workerAvailabilityTimeoutMilliseconds: 10000 attributes: - maxRequestBodySize: 33554432 # 32MB + # Set value from the calculation of tracking of 100 objects at the same time on a 4k image + maxRequestBodySize: 268435456 # 256MB platform: attributes: restartPolicy: name: always maximumRetryCount: 3 - mountMode: volume \ No newline at end of file + mountMode: volume diff --git a/serverless/pytorch/saic-vul/hrnet/nuclio/function.yaml b/serverless/pytorch/saic-vul/hrnet/nuclio/function.yaml new file mode 100644 index 000000000000..475f8998fafa --- /dev/null +++ b/serverless/pytorch/saic-vul/hrnet/nuclio/function.yaml @@ -0,0 +1,84 @@ +metadata: + name: pth-saic-vul-hrnet + namespace: cvat + annotations: + name: HRNET + version: 2 + type: interactor + spec: + framework: pytorch + min_pos_points: 1 + min_neg_points: 0 + animated_gif: https://raw.githubusercontent.com/opencv/cvat/develop/site/content/en/images/hrnet_example.gif + help_message: The interactor allows to get a mask for an object using positive points, and negative points + +spec: + description: HRNet18 for click based interactive segmentation + runtime: 'python:3.8' + handler: main:handler + eventTimeout: 30s + env: + - name: PYTHONPATH + value: /opt/nuclio/hrnet + + build: + image: cvat-pth.saic-vul.hrnet + baseImage: ubuntu:20.04 + + directives: + preCopy: + - kind: ENV + value: DEBIAN_FRONTEND=noninteractive + - kind: RUN + value: apt-get update && apt-get install software-properties-common -y + - kind: RUN + value: add-apt-repository ppa:deadsnakes/ppa + - kind: RUN + value: apt remove python* -y + - kind: RUN + value: apt-get update && apt-get install -y --no-install-recommends build-essential git curl libglib2.0-0 software-properties-common python3 python3.6-dev python3-pip python3-tk + - kind: RUN + value: ln -s /usr/bin/pip3 /usr/local/bin/pip && ln -s /usr/bin/python3 /usr/bin/python + - kind: RUN + value: pip3 install --upgrade pip + - kind: WORKDIR + value: /opt/nuclio + - kind: RUN + value: git clone https://github.com/saic-vul/ritm_interactive_segmentation.git hrnet + - kind: WORKDIR + value: /opt/nuclio/hrnet + - kind: RUN + value: apt-get install -y --no-install-recommends wget + - kind: RUN + value: wget https://github.com/saic-vul/ritm_interactive_segmentation/releases/download/v1.0/coco_lvis_h18_itermask.pth + - kind: RUN + value: pip3 install setuptools + - kind: RUN + value: pip3 install -r requirements.txt + - kind: RUN + value: apt update && apt install -y libgl1-mesa-glx + - kind: RUN + value: pip3 uninstall torch torch vision -y + - kind: RUN + value: pip install torch==1.8.1 torchvision==0.9.1 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html + - kind: WORKDIR + value: /opt/nuclio + + triggers: + myHttpTrigger: + maxWorkers: 1 + kind: 'http' + workerAvailabilityTimeoutMilliseconds: 10000 + attributes: + maxRequestBodySize: 33554432 # 32MB + + platform: + attributes: + restartPolicy: + name: always + maximumRetryCount: 3 + mountMode: volume + + resources: + limits: + cpu: 2