Conversation
|
@ieliz, can you please review? |
|
LGTM! |
|
Also, I think @l-bat, @bhack and @jinyup100 could look at these changes :) |
|
|
||
| import numpy as np | ||
| import cv2 as cv | ||
| import argparse | ||
| import cv2 as cv | ||
| import numpy as np | ||
| import sys |
There was a problem hiding this comment.
According to PEP 8.
Imports should be grouped in the following order:
- Standard library imports.
- Related third party imports.
- Local application/library specific imports.
There was a problem hiding this comment.
imports will be handle by auto format when it is done
There was a problem hiding this comment.
Please import numpy before cv2 (otherwise it may lead to import error)
| elif self.windowing == "uniform": | ||
| self.window = np.ones((self.score_size, self.score_size)) | ||
| self.window = np.tile(self.window.flatten(), self.anchor_num) | ||
| self.score = [] |
There was a problem hiding this comment.
I think this change unnecessary
There was a problem hiding this comment.
score will be removed in later commits
samples/dnn/trackers/dasiamrpn.py
Outdated
| self.ratios = [0.33, 0.5, 1, 2, 3] | ||
| self.scales = [8, ] | ||
| self.anchor_num = len(self.ratios) * len(self.scales) | ||
| self.score_size = (self.instance_size - self.exemplar_size) // self.anchor_stride + 1 |
There was a problem hiding this comment.
I think this change unnecessary
There was a problem hiding this comment.
Is it normal for two similar classes to have different names for the same attributes?
samples/dnn/trackers/dasiamrpn.py
Outdated
| self.ratios = [0.33, 0.5, 1, 2, 3] | ||
| self.scales = [8, ] | ||
| self.anchor_num = len(self.ratios) * len(self.scales) |
There was a problem hiding this comment.
Why these variables should be renamed?
There was a problem hiding this comment.
Is it normal for two similar classes to have different names for the same attributes?
| self.track_context_amount = 0.5 | ||
| self.track_exemplar_size = 127 | ||
| self.track_instance_size = 255 |
There was a problem hiding this comment.
Why these variables should be renamed?
There was a problem hiding this comment.
Is it normal for two similar classes to have different names for the same attributes?
|
@l-bat @b-hack @ieliz @ZhiyuanChen This PR seems to suggest making a new directory "trackers" within opencv/samples/dnn . I was wondering where the OpenCV team stands regarding making additional directories in the opencv/samples/dnn? Or is it more of a case of updating the tracker module in the opencv_contrib? |
|
@ZhiyuanChen @l-bat Do you have progress on the patch? |
Yes, there are. Hopefully I could push something new next Wednesday. |
| xfs_1, xfs_2, xfs_3 = self.search_net.forward(outNames) | ||
| self.rpn_head.setInput(np.stack([self.zfs_1, self.zfs_2, self.zfs_3]), 'input_1') | ||
| self.rpn_head.setInput(np.stack([self.zfs_1, self.zfs_2, self.zfs_3]), | ||
| 'input_1') |
There was a problem hiding this comment.
Please avoid such line break changes
There was a problem hiding this comment.
Fixed, this is probably resulted by 80 charter length limit following PEP-8
samples/dnn/trackers/siamrpnpp.py
Outdated
| type=str, | ||
| help= | ||
| 'Path to input video file. Skip this argument to capture frames from a camera.' | ||
| ) |
There was a problem hiding this comment.
Seems very synthetic. Please tune IDE/code linter to ignore long lines
|
@ZhiyuanChen @dkurt Any activity here? |
I am really sorry, I'll start working on this next week. |
|
DaSiamRPN logic have been moved into OpenCV modules as C++ code (see #20036). If you want to update logic with extra parameters then please update C++ code instead. |
|
Lets close this for now. Feel free to re-open if there are updates. |
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.