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

Update model_handler.py #4665

Merged
merged 5 commits into from
Jan 11, 2023
Merged

Update model_handler.py #4665

merged 5 commits into from
Jan 11, 2023

Conversation

waqarsqureshi
Copy link
Contributor

@waqarsqureshi waqarsqureshi commented May 31, 2022

use the OpenCV contour function to extract contour instead of scikit-image function. to solve the problem of poor drawing of the contour see the issue 4660
#4660

Motivation and context

How has this been tested?

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) 2022 Intel Corporation
#
# SPDX-License-Identifier: MIT

use the OpenCV contour function to extract contour instead of scikit-image function. to solve the problem of poor drawing of the contour see the issue 4660
cvat-ai#4660
@waqarsqureshi
Copy link
Contributor Author

#4660

@bsekachev bsekachev self-requested a review September 12, 2022 08:03
@bsekachev
Copy link
Member

Hi, @waqarsqureshi

Do you think we need it if CVAT can support working with masks now?
#4543

@waqarsqureshi
Copy link
Contributor Author

@bsekachev The function that i proposed is when we use automated masking using an existing semantic segmentation. If CVAT is already using this function then it is fine.
Use the following
contours, hierarchy = cv2.findContours(mask_by_label, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE

instead
contours = find_contours(mask_by_label, 0.5)

@nmanovic nmanovic requested review from yasakova-anastasia and removed request for bsekachev November 17, 2022 15:34
@nmanovic
Copy link
Contributor

@yasakova-anastasia , could you please look at the PR and give your feedback?

@yasakova-anastasia
Copy link
Contributor

It really works better for semantic segmentation.

Screenshot from 2023-01-11 16-46-47
Screenshot from 2023-01-11 16-46-28
Screenshot from 2023-01-11 16-54-48
Screenshot from 2023-01-11 16-50-59

@waqarsqureshi
Copy link
Contributor Author

Great! to see it resolved!

@nmanovic nmanovic merged commit 6b41630 into cvat-ai:develop Jan 11, 2023
@nmanovic
Copy link
Contributor

@waqarsqureshi , thanks for your contribution.

mikhail-treskin pushed a commit to retailnext/cvat that referenced this pull request Jul 1, 2023
use the OpenCV contour function to extract contour instead of
scikit-image function. to solve the problem of poor drawing of the
contour see the issue 4660
cvat-ai#4660
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants