-
Notifications
You must be signed in to change notification settings - Fork 21
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
PR for issue #42 [completed, awaiting review] #50
Conversation
DQ4443
commented
Jun 18, 2024
- added config variable to config.py to change outline thickness globally
- updated corresponding draw.foo functions to use new global variable
- update README file and added optional "Configuration" section directing users to config file
- fixed minor formatting issues in README file
Added config variable in config.py and updated draw.foo functions to use the new config variable. feat: add description for configs to README file feat: fix minor formatting issues in README
@DQ4443 is attempting to deploy a commit to the Suman Kunwar's projects Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Looks good. Would be nice to create an object and map individual tools value there.
```python | ||
# config.py | ||
MASK_BACKGROUND_COLOR = (0, 0, 0) # Black background for masks | ||
OUTLINE_THICKNESS = 5 # Thicker outlines (5 pixels) |
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.
Would be nice to create an object and assign values as per UI tools value. This will give us more flexibility, granularity and will be in sync.
OUTLINE_THICKNESS_CONFIG = {
"POLYGON": 2,
"CIRCLE": 2,
"BOUNDING_BOX": 2
}
@@ -295,7 +295,7 @@ def download_image_with_annotations(): | |||
points = region['points'] | |||
scaled_points = [(x * width, y * height) for x, y in points] |
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.
If we define the OUTLINE_THICKNESS_CONFIG
object mentioned above , think we can access it like this.
from config import OUTLINE_THICKNESS_CONFIG
....
# Load the outline thickness configuration
app.config.from_mapping(OUTLINE_THICKNESS_CONFIG)
OUTLINE_THICKNESS_CONFIG['LINE']
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.
I see. I'll make this change
Added links next to relevant headings that leads to the corresponding page in the documentation
This reverts commit f4c4334.
Updated OUTLINE_THICKNESS_CONFIG variable to be a struct to allow for higher granularity customization
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.
LGTM
Fixes #42 |