Open
Conversation
Collaborator
|
Is this PR ready for review, or still WIP? ^_^ |
Collaborator
Author
|
@C1rN09 Hi, it is ready |
C1rN09
reviewed
Feb 21, 2023
Collaborator
C1rN09
left a comment
There was a problem hiding this comment.
There should be 2 additional modifications:
- Add unit tests for this metric. NOTE that 2 basic use cases should be covered: (1) stateless call, i.e. directly use metric's
__call__method to obtain result. (2) statefull call, i.e. callmetric.addmultiple (>=2) times and thenmetric.compute - Add api docs in
metrics.rst
Collaborator
Author
|
@C1rN09 Not sure why the link failed, could you have a look? |
Collaborator
C1rN09
reviewed
Feb 28, 2023
C1rN09
reviewed
Mar 10, 2023
Collaborator
C1rN09
left a comment
There was a problem hiding this comment.
LGTM. There should be a PR in mmaction2 to check the accuracy of this implementation.
Comment on lines
+9
to
+10
| logger = logging.getLogger(__name__) | ||
|
|
Collaborator
There was a problem hiding this comment.
Since PR #102, logger has became an argument in BaseMetric, so other metrics no longer need to define logger themselves.
Comment on lines
+23
to
+24
| t_iou (np.ndarray): 1-dim array [n] / | ||
| 2-dim array [n x m] with IoU ratio. |
Collaborator
There was a problem hiding this comment.
Suggested change
| t_iou (np.ndarray): 1-dim array [n] / | |
| 2-dim array [n x m] with IoU ratio. | |
| t_iou (np.ndarray): 1-dim array [n] / | |
| 2-dim array [n x m] with IoU ratio. |
Comment on lines
+27
to
+30
| if target_segments.ndim != 2: | ||
| raise ValueError('Dimension of target segments is incorrect') | ||
| if candidate_segments_ndim not in [1, 2]: | ||
| raise ValueError('Dimension of candidate segments is incorrect') |
Collaborator
There was a problem hiding this comment.
Suggested change
| if target_segments.ndim != 2: | |
| raise ValueError('Dimension of target segments is incorrect') | |
| if candidate_segments_ndim not in [1, 2]: | |
| raise ValueError('Dimension of candidate segments is incorrect') | |
| if target_segments.ndim != 2: | |
| raise ValueError(f'Dimension of target segments is incorrect. Expected 2, got {target_segments.ndim}') | |
| if candidate_segments_ndim not in [1, 2]: | |
| raise ValueError(f'Dimension of candidate segments is incorrect. Expected 1 or 2, got {target_segments.ndim}') |
Comment on lines
+116
to
+120
| if this_video_proposals.ndim != 2: | ||
| this_video_proposals = np.expand_dims(this_video_proposals, axis=0) | ||
| if this_video_ground_truth.ndim != 2: | ||
| this_video_ground_truth = np.expand_dims( | ||
| this_video_ground_truth, axis=0) |
Collaborator
There was a problem hiding this comment.
When will these 2 if-statements be True? There has been
this_video_proposals = proposals_video_id[:, :2]and
this_video_ground_truth = ground_truth_video_id[:, :2].astype(np.float32)before.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
WIP