Repository navigation
Fixes to bitmask #250
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
Merged
Merged
Fixes to bitmask #250
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e0c47f2
add bitmask to confidence filter
TrevorBurgoyne 4d79f24
add loader to set_annotations and set_frame_image
TrevorBurgoyne f03bc03
apply bitmask modes to all subtasks
TrevorBurgoyne e1a62e7
first set of bitmask performance gains
TrevorBurgoyne 9eb5828
add more bitmask unit tests
TrevorBurgoyne 3d8b101
add e2e tests
TrevorBurgoyne a6931a1
bitmap cache for faster redraws
TrevorBurgoyne e0ae244
changelog
TrevorBurgoyne 5b7b453
update date
TrevorBurgoyne d3519f4
suggestions from review
TrevorBurgoyne 59a3c60
read only handling for overwrite
TrevorBurgoyne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <title>ULabel - Bitmask e2e fixture</title> | ||
|
|
||
| <!-- ULabel Library --> | ||
| <script src="/ulabel.js"></script> | ||
|
|
||
| <!-- JQuery Library --> | ||
| <script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script> | ||
|
|
||
| <!-- ULabel Usage --> | ||
| <script> | ||
| /* global $ */ | ||
| /* global ULabel */ | ||
|
|
||
| // Minimal two-subtask bitmask fixture for e2e tests. Uses a small generated image | ||
| // so masks are tiny/fast, and exposes window.ulabel for the test harness. | ||
| $(window).on("load", function() { | ||
|
|
||
| function on_submit(annotations) { | ||
| console.log("submit", annotations); | ||
| } | ||
|
|
||
| // Generate a small solid image inline so masks are 64x64 (fast to encode/scan) | ||
| const img = document.createElement("canvas"); | ||
| img.width = 64; | ||
| img.height = 64; | ||
| const ictx = img.getContext("2d"); | ||
| ictx.fillStyle = "#808080"; | ||
| ictx.fillRect(0, 0, 64, 64); | ||
| const image_data = img.toDataURL("image/png"); | ||
|
|
||
| let subtasks = { | ||
| "a": { | ||
| "display_name": "A", | ||
| "classes": [{ "name": "CA", "color": "red", "id": 1 }], | ||
| "allowed_modes": ["bitmask"], | ||
| "resume_from": null, | ||
| "task_meta": null, | ||
| "annotation_meta": null, | ||
| }, | ||
| "b": { | ||
| "display_name": "B", | ||
| "classes": [{ "name": "CB", "color": "blue", "id": 2 }], | ||
| "allowed_modes": ["bitmask"], | ||
| "resume_from": null, | ||
| "task_meta": null, | ||
| "annotation_meta": null, | ||
| }, | ||
| }; | ||
|
|
||
| let ulabel = new ULabel({ | ||
| "container_id": "container", | ||
| "image_data": image_data, | ||
| "username": "DemoUser", | ||
| "submit_buttons": on_submit, | ||
| "subtasks": subtasks, | ||
| }); | ||
| window.ulabel = ulabel; | ||
| ulabel.init(function() { | ||
| // ready | ||
| }); | ||
|
|
||
| }); | ||
| </script> | ||
| </head> | ||
| <body> | ||
| <div id="container" style="width: 100%; height: 100vh; position: absolute; top: 0; left: 0;"></div> | ||
| </body> | ||
| </html> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.