Skip to content

Commit

Permalink
ROI additions (#64)
Browse files Browse the repository at this point in the history
* renamed ROIs

* Changed layout of elements on the ROI tab

* Changed ROI button names

* added button for clearing ROIs

* refactored ROI button style

* added clear ROIs functionality into callback

* replace clear ROIs button with button for deleting selected rows

* consistent variable names for ROI buttons

* updated ROI button text and layout

* initialise ROI buttons as disabled by default

* enable ROI buttons only when it makes sense to use them

* fix trivial typoin TODO

* renamed and modified callbacks for disabling ROI buttons

* separated save rois callback from the one updating the roi status alert

* refactored callback for updating roi status alert

* added loading indicator to roi status alert

* Update wazp/callbacks/roi.py

don't sort yaml keys when saving

Co-authored-by: sfmig <33267254+sfmig@users.noreply.github.com>

* fix ROI tags in input config

* remove TODO regarding ROI colormap

* Make messages to user less verbose

* removed unnecessary buttons and tooltips

* removed instructions

* raise better exceptions when frames cannot be counted or extracted

* improve exception handling when videos cannot be opened and smarter frame slider rounding

* Make frame indexing more explicit. Display max frame index.

* ensure that success message is always displayed when saving ROis

* make sure to enable load button after rois are saved for the first time

---------

Co-authored-by: sfmig <33267254+sfmig@users.noreply.github.com>
  • Loading branch information
niksirbi and sfmig committed Apr 3, 2023
1 parent c46e1bb commit cf68647
Show file tree
Hide file tree
Showing 5 changed files with 389 additions and 201 deletions.
8 changes: 4 additions & 4 deletions sample_project/input_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ model_str: DLC_resnet50_jwasp_femaleandmaleSep12shuffle1_1000000
dashboard_export_data_path: ./sample_project/output
ROI_tags:
- enclosure
- left_box
- top_box
- right_box
- bottom_box
- nectar1_box
- control_box
- water_only_box
- nectar2_box
- tube
event_tags:
- experiment_start
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ ROIs:
path: M348.0491395793499,93.62497131931165L356.4009560229445,232.82191204588906L361.9688336520076,480.5924665391969L361.9688336520076,625.3572848948373L361.9688336520076,850.8563288718926L373.1045889101338,959.4299426386231L378.67246653919693,1042.9481070745694L400.9439770554493,1073.5714340344166L690.4736137667304,1073.5714340344166L843.5902485659656,1048.5159847036325L1163.7432122370938,1037.3802294455063L1302.9401529636712,1012.3247801147224L1344.6992351816443,995.6211472275331L1366.9707456978967,917.6708604206498L1378.106500956023,811.881185468451L1389.2422562141492,736.7148374760992L1389.2422562141492,625.3572848948373L1350.2671128107074,491.72822179732304L1336.3474187380498,374.802791586998L1325.2116634799236,288.50068833652006L1322.427724665392,196.63070745697894L1289.0204588910133,65.78558317399617Z
- drawn_on_frame: 38000
line_color: '#E15F99'
name: left_box
name: nectar1_box
path: M484.23300516875133,565.133184774723L483.3063124386091,605.9076649009826L487.01308335917815,624.4415195038279L489.7931615496049,634.6351395353927L495.3533179304585,639.268603186104L532.4210271361491,639.268603186104L558.3684235801323,635.5618322655349L562.0751945007014,628.1482904243968L560.2218090404169,604.054279440698L557.4417308499901,570.6933411555766L557.4417308499901,563.2797993144385Z
- drawn_on_frame: 38000
line_color: '#1CA71C'
name: top_box
name: control_box
path: M756.6806678305767,278.34419881335197L761.314131481288,311.7051370984735L767.8009805922838,337.6525335424568L770.5810587827106,343.2126899233104L800.235226147263,337.6525335424568L832.6694717022423,336.7258408123146L834.5228571625267,322.8254498601806L826.1826225912464,286.68443338463237L825.2559298611042,267.22388605164485L826.1826225912464,275.5641206229252Z
- drawn_on_frame: 38000
line_color: '#FB0D0D'
name: right_box
name: water-only_box
path: M1061.562576047381,566.5456378875958L1071.756196078946,619.3671235057049L1078.2430451899418,633.2675144578387L1104.190441633925,630.487436267412L1143.1115362999,628.6340508071274L1145.891614490327,623.0738944262739L1143.1115362999,602.6866543631442L1136.6246871889043,573.0324869985917L1131.991223538193,554.4986323957464Z
- drawn_on_frame: 38000
line_color: '#DA16FF'
name: bottom_box
name: nectar2_box
path: M812.2822316391125,845.4801496604169L809.5021534486857,922.3956462622248L859.5435608763679,920.5422608019403L881.7841863997821,911.2753335005176L884.564264590209,894.5948643579569L885.4909573203512,861.2339260728354L882.7108791299245,835.2865296288521Z
- drawn_on_frame: 38000
line_color: '#222A2A'
Expand Down
Loading

0 comments on commit cf68647

Please sign in to comment.