bbox-annotator | A bounding box annotation widget written in CoffeeScript | Data Labeling library
kandi X-RAY | bbox-annotator Summary
kandi X-RAY | bbox-annotator Summary
A bounding box annotation tool written in CoffeeScript/JavaScript. There is an online demo at
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of bbox-annotator
bbox-annotator Key Features
bbox-annotator Examples and Code Snippets
Community Discussions
Trending Discussions on bbox-annotator
QUESTION
I'd like to elaborate on the accepted answer to this question.
I'm looking at improving the minimal shiny app below (extracted from the accepted answer) with the following features:
- 1) draw the rectangle + a text label. The label comes from R (
input$foo
), e.g., from a dropdown. To avoid the edge cases where the labels fall outside the images, labels should be placed inside their rectangles. - 2) use a different color for the rectangles and their labels depending on the label
- 3) ability for the user to delete a rectangle by double-clicking inside it. In the case of multiple matches (overlap, nested), the rectangle with the smallest area should be deleted.
Brownie points for 1): the dropdown could appear next to the cursor like is done here (code here). If possible, the dropdown list should be passed from server.R and not be fixed/hardcoded. The reason is that depending on some user input, a different dropdown could be shown. E.g., we might have one dropdown for fruits c('banana','pineapple','grapefruit')
, one dropdown for animals c('raccoon','dog','cat')
, etc.
ANSWER
Answered 2020-Feb-05 at 22:49This solution uses kyamagu's bbox_annotator and is based on demo.html. I'm not familiar with JS, so it's not the prettiest. Limitations are:
- Choosing a different image url will remove previous rectangles
- I edited the JS a bit to change the rectangle/text color, so you won't be able to pull directly from the original repo
- My changes probably broke input_method = "fixed" and "text", I only tested input_method = "select"
ui.R
QUESTION
I have written a shiny app that allows the user to draw rectangles on top of an image (minimal reproducible example below).
The problem with my current approach is that every time a rectangle is added, a new image is created, written to disk, and rendered (sent to the user's browser). This takes quite some time, and becomes really annoying when the Internet connection is slow.
Is there any way to display the rectangles on top of the image directly in the browser, without modifying the image on the server side? The only thing I need to ensure is that the browser sends back to the server the rectangles coordinates over the plot.
A good example of what I'm looking for (in JavaScript): https://kyamagu.github.io/bbox-annotator/demo.html I know JavaScript can be embedded in a Shiny app through a widget, if no one proposes an easier solution, that's what I'll do.
...ANSWER
Answered 2020-Jan-21 at 17:37Here's a JS option based entirely on this answer.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install bbox-annotator
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page