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

Siammask tracker as DL serverless function #1988

Merged
merged 8 commits into from
Aug 7, 2020
Merged

Siammask tracker as DL serverless function #1988

merged 8 commits into from
Aug 7, 2020

Conversation

nmanovic
Copy link
Contributor

@nmanovic nmanovic commented Aug 5, 2020

Motivation and context

Add support of tracker serverless functions into Lambda Manager. Also add SiamMask tracker as a DL serverless function.
The whole idea is trivial. To transform a tracker to DL serverless function it should return its state on each call. In the beginning the state is None and we send shape instead to initialize the tracker. After that it is necessary to send state for each new call of the function to continue the tracking procedure.

An idea for the future: now we use requests only to submit data to DB. It will be great if we have two types of requests: online and offline. Online requests will send results directly to UI at the end. Offline requests will send results to DB as now.

Note: it seems it will not be easy to convert other trackers to DL serverless functions because they hide own state usually. Every time need to implement encode_state and decode_state functions to serialize/deserialize a state to/from JSON. It should not be a problem for python native trackers because python cannot truly incapsulate anything but it is necessary to understand what is a state for a tracker.

Note: it was pain to integrate conda to docker. It is a good example that implementation of a DL serverless function can be non-trivial.

How has this been tested?

Manually. I used model_handler.py from the PR with demo.py from SiamMask GitHub repo and saw that I got the same tracking results.

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

@nmanovic nmanovic changed the title siammask tracker as DL serverless function [WIP] siammask tracker as DL serverless function Aug 5, 2020
@nmanovic nmanovic requested a review from azhavoro as a code owner August 5, 2020 09:43
@nmanovic nmanovic changed the title [WIP] siammask tracker as DL serverless function Siammask tracker as DL serverless function Aug 5, 2020
@nmanovic
Copy link
Contributor Author

nmanovic commented Aug 5, 2020

@azhavoro , could you please look at the PR? I see that we have a problem with build. Could you please investigate and fix?

@nmanovic nmanovic mentioned this pull request Aug 5, 2020
7 tasks
@coveralls
Copy link

coveralls commented Aug 5, 2020

Pull Request Test Coverage Report for Build 6800

  • 0 of 2 (0.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.02%) to 68.933%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cvat/apps/lambda_manager/views.py 0 2 0.0%
Files with Coverage Reduction New Missed Lines %
cvat/apps/engine/media_extractors.py 2 76.99%
Totals Coverage Status
Change from base Build 6798: -0.02%
Covered Lines: 11150
Relevant Lines: 15668

💛 - Coveralls

@nmanovic nmanovic merged commit b5d5f1c into develop Aug 7, 2020
@nmanovic nmanovic deleted the nm/siammask branch August 7, 2020 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants