YttriLab / A-SOID

An active learning platform for expert-guided, data efficient discovery of behavior.
Other
53 stars 8 forks source link

a) Error when refinement and excluded markers, b) error in refinement with low confidence mode #85

Open JHartig opened 5 months ago

JHartig commented 5 months ago

Hi all,

Partially predescribed, but I wanted to hint towards two bugs that I came across while working with ASOID extensively now:

Windows 10, most current version of ASOID

a) When trying to do a refinement (does not matter which sort) an index error occurs when excluding certain DLC-defined markers (say you want to exclude inherently more noisy tail markers for mice). Couldnt find a way around it; with all markers included this problem never occurs.

(IndexError: index 22 is out of bounds for axis 1 with size 22 Traceback: File "C:\Users\Gastkonto\anaconda3\envs\asoid\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 584, in _run_script exec(code, module.dict) File "C:\Users\Gastkonto\A-SOID\asoid\app.py", line 328, in main() File "C:\Users\Gastkonto\A-SOID\asoid\app.py", line 307, in main D_manual_active_learning.main(ri=ri, config=st.session_state['config']) File "c:\users\gastkonto\a-soid\asoid\apps\D_manual_active_learning.py", line 33, in main refinement.main() File "c:\users\gastkonto\a-soid\asoid\utils\manual_refinement.py", line 784, in main create_videos( File "c:\users\gastkonto\a-soid\asoid\utils\manual_refinement.py", line 441, in create_videos filtpose, = adp_filt(current_pose, idx_selected, idx_llh, llh_value) File "c:\users\gastkonto\a-soid\asoid\utils\preprocessing.py", line 65, in adp_filt currdf_filt[0, (2 x):(2 x + 2)] = np.hstack([datax[0, x], datay[0, x]]))

b) A bug which occurs, but can partially be circumvented (at least it seems so) is that when doing a refinement and choosing low-confidence refinement mode, an error occurs which prevents from generating the videos after extracting the frames.

It reads "Terminated early, click R". If done so, nothing happens. If you choose the random mode then and click on generate videos again, the videos are created (I hope with the low confidence frames, however cant think why it wouldn't be so, as no random frame extraction occured simultaneously.

Any fixes already existent in that regard?

Best Johannes

JensBlack commented 5 months ago

Thank you for reporting these issues. I will look into them and come back if I have questions.

JHartig commented 5 months ago

Update: Same goes for the "Predict" function when trying to analyse pose files that contain "all" markers, however already in the config one excluded some.

Predicting labels...

Selected keypoints/bodyparts (from config): nose, left_ear, right_ear, left_ear_tip, right_ear_tip, left_eye, right_eye, neck, mid_back, mouse_center, mid_backend, mid_backend2, mid_backend3, tail_base, left_shoulder, left_midside, left_hip, right_shoulder, right_midside, right_hip, tail_end, head_midpoint

Available keypoints/bodyparts in pose file: nose, left_ear, right_ear, left_ear_tip, right_ear_tip, left_eye, right_eye, neck, mid_back, mouse_center, mid_backend, mid_backend2, mid_backend3, tail_base, tail1, tail2, tail3, tail4, tail5, left_shoulder, left_midside, left_hip, right_shoulder, right_midside, right_hip, tail_end, head_midpoint

IndexError: index 22 is out of bounds for axis 1 with size 22 Traceback: File "C:\Users\Gastkonto\anaconda3\envs\asoid\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 584, in _run_script exec(code, module.dict) File "C:\Users\Gastkonto\A-SOID\asoid\app.py", line 328, in main() File "C:\Users\Gastkonto\A-SOID\asoid\app.py", line 317, in main F_predict.main(ri=ri, config=st.session_state['config']) File "c:\users\gastkonto\a-soid\asoid\apps\F_predict.py", line 773, in main predict_annotate_video(ftype, software, is_3d, multi_animal, selected_bodyparts, llh_value, File "c:\users\gastkonto\a-soid\asoid\apps\F_predict.py", line 460, in predict_annotate_video filtpose, = adp_filt(current_pose, idx_selected, idx_llh, llh_value) File "c:\users\gastkonto\a-soid\asoid\utils\preprocessing.py", line 65, in adp_filt currdf_filt[0, (2 x):(2 x + 2)] = np.hstack([datax[0, x], datay[0, x]])

JensBlack commented 2 months ago

a) duplicate from #82 b) new issue.