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

PR for issue #42 [completed, awaiting review] #50

Merged
merged 6 commits into from
Jun 19, 2024
Merged

Conversation

DQ4443
Copy link
Contributor

@DQ4443 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
Copy link

vercel bot commented Jun 18, 2024

@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.

Copy link

vercel bot commented Jun 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
annotate-lab ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2024 11:57am

Copy link
Owner

@sumn2u sumn2u left a 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)
Copy link
Owner

@sumn2u sumn2u Jun 18, 2024

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]
Copy link
Owner

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']

Copy link
Contributor Author

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
Updated OUTLINE_THICKNESS_CONFIG variable to be a struct to allow for
higher granularity customization
Copy link
Owner

@sumn2u sumn2u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sumn2u sumn2u merged commit 1c9b3be into sumn2u:master Jun 19, 2024
4 checks passed
@sumn2u
Copy link
Owner

sumn2u commented Jun 19, 2024

Fixes #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants