-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Added SiamMask CUDA implementation [2x faster on Full HD] #3571
Merged
Merged
Changes from 3 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
d3c4a37
Reworked function.yaml
bsekachev 90e637c
Added function-gpu
bsekachev bb9fb6f
Changed python version
bsekachev 4e88b3b
Merge branch 'develop' into bs/siammask_gpu
bsekachev bc03050
Initial version of the new tracking
bsekachev 9f576f4
Blocking navigation during tracking
bsekachev 88db3f4
Removed outdated code
bsekachev 0db2904
Added canvas indication for trackable objects
bsekachev da705ac
Support different trackers
bsekachev 0bafb8f
Fixed styles
bsekachev ccee79f
Added ability to add/remove trackable objects
bsekachev d1ca051
Fixed minor bug with text on the canvas
bsekachev 20c9f08
Updated version
bsekachev 6ec23ee
updated changelog
bsekachev e8b3afc
Merge branch 'develop' into bs/siammask_gpu
ac6d1b7
Fixed a couple of issues
bsekachev 15d6345
Updated changelog
bsekachev 0cb4bec
Explicit enumerable property
bsekachev 47c8645
Merge branch 'develop' into bs/siammask_gpu
f9211c5
Removed outdated code
bsekachev c7c09ef
Fixed navigation
bsekachev 3e7dc1f
Fixed issue with removing annotations, fixing issue with initial moun…
9f574b6
Merged develop
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
73 changes: 73 additions & 0 deletions
73
serverless/pytorch/foolwood/siammask/nuclio/function-gpu.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
metadata: | ||
name: pth-foolwood-siammask | ||
namespace: cvat | ||
annotations: | ||
name: SiamMask | ||
type: tracker | ||
spec: | ||
framework: pytorch | ||
|
||
spec: | ||
description: Fast Online Object Tracking and Segmentation | ||
runtime: 'python:3.6' | ||
handler: main:handler | ||
eventTimeout: 30s | ||
env: | ||
- name: PYTHONPATH | ||
value: /opt/nuclio/SiamMask:/opt/nuclio/SiamMask/experiments/siammask_sharp | ||
|
||
build: | ||
image: cvat/pth.foolwood.siammask | ||
baseImage: nvidia/cuda:11.1-devel-ubuntu20.04 | ||
|
||
directives: | ||
preCopy: | ||
- kind: ENV | ||
value: PATH="/root/miniconda3/bin:${PATH}" | ||
- kind: ARG | ||
value: PATH="/root/miniconda3/bin:${PATH}" | ||
- kind: RUN | ||
value: apt update && apt install -y --no-install-recommends wget git ca-certificates libglib2.0-0 libsm6 libxrender1 libxext6 && rm -rf /var/lib/apt/lists/* | ||
- kind: RUN | ||
value: wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && | ||
chmod +x Miniconda3-latest-Linux-x86_64.sh && ./Miniconda3-latest-Linux-x86_64.sh -b && | ||
rm -f Miniconda3-latest-Linux-x86_64.sh | ||
- kind: WORKDIR | ||
value: /opt/nuclio | ||
- kind: RUN | ||
value: conda create -y -n siammask python=3.7 | ||
- kind: SHELL | ||
value: '["conda", "run", "-n", "siammask", "/bin/bash", "-c"]' | ||
- kind: RUN | ||
value: git clone https://github.com/foolwood/SiamMask.git | ||
- kind: RUN | ||
value: pip install -r SiamMask/requirements.txt jsonpickle | ||
- kind: RUN | ||
value: pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html | ||
- kind: RUN | ||
value: conda install -y gcc_linux-64 | ||
- kind: RUN | ||
value: cd SiamMask && bash make.sh && cd - | ||
- kind: RUN | ||
value: wget -P SiamMask/experiments/siammask_sharp http://www.robots.ox.ac.uk/~qwang/SiamMask_DAVIS.pth | ||
- kind: ENTRYPOINT | ||
value: '["conda", "run", "-n", "siammask"]' | ||
|
||
triggers: | ||
myHttpTrigger: | ||
maxWorkers: 2 | ||
kind: 'http' | ||
workerAvailabilityTimeoutMilliseconds: 10000 | ||
attributes: | ||
maxRequestBodySize: 33554432 # 32MB | ||
|
||
resources: | ||
limits: | ||
nvidia.com/gpu: 1 | ||
|
||
platform: | ||
attributes: | ||
restartPolicy: | ||
name: always | ||
maximumRetryCount: 3 | ||
mountMode: volume |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed base image to have the same set of preCopy directives.
But finally it was nesessary to add
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
to function-gpu.yml, so it is not the same now anyway. Let me know if you think that better to leave this file as is.