Skip to content

Commit

Permalink
Merge pull request opencv#24461 from fengyuentau:tracker_vit_backend_…
Browse files Browse the repository at this point in the history
…target

Video tracking (dnn): set backend and target for TrackerVit opencv#24461

Resolves opencv#24460

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
  • Loading branch information
fengyuentau authored Oct 27, 2023
1 parent 1911c63 commit 77a0ffc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/video/src/tracking/tracker_vit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ class TrackerVitImpl : public TrackerVit
{
net = dnn::readNet(params.net);
CV_Assert(!net.empty());

net.setPreferableBackend(params.backend);
net.setPreferableTarget(params.target);
}

void init(InputArray image, const Rect& boundingBox) CV_OVERRIDE;
Expand Down

0 comments on commit 77a0ffc

Please sign in to comment.