-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
UI: don't send the convMaskToPoly parameter on interactive detector calls #8074
Conversation
…alls The server doesn't use it; in the interactive case, the mask-to-polygon conversion is handled by the UI itself.
WalkthroughThe primary change involves simplifying a function call within the Changes
Sequence Diagram(s)No diagram needed as the changes are straightforward and merely involve code simplification with no modifications to control flow. Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/tools-control.tsx (2 hunks)
Additional comments not posted (2)
cvat-ui/src/components/annotation-page/standard-workspace/controls-side-bar/tools-control.tsx (2)
1235-1236
: Refactoring to removeconvMaskToPoly
parameter inrunInference
method.The destructuring assignment at line 1235 effectively removes the
convMaskToPoly
parameter from thebody
object, which aligns with the PR's goal to stop sending this parameter to the server. This change is consistent and should prevent any unintended sending of this parameter in API calls.
1313-1313
: Conditional usage ofconvMaskToPoly
remains after removal from API call.While the
convMaskToPoly
parameter was removed from being sent to the server, it's still being used conditionally in therunInference
method to determine if shapes should be converted to polygons. This is a good practice as it leverages client-side logic to handle the conversion, which is more efficient and reduces server load.
Motivation and context
The server doesn't use it; in the interactive case, the mask-to-polygon conversion is handled by the UI itself.
How has this been tested?
I verified that interactive detection still works (both with the "Convert masks to polygons" option and without).
Checklist
develop
branch[ ] I have created a changelog fragment[ ] I have updated the documentation accordingly[ ] I have added tests to cover my changes[ ] I have linked related issues (see GitHub docs)[ ] I have increased versions of npm packages if it is necessary(cvat-canvas,
cvat-core,
cvat-data and
cvat-ui)
License
Feel free to contact the maintainers if that's a concern.
Summary by CodeRabbit