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

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

Open
JHartig opened this issue Apr 24, 2024 · 3 comments
Assignees
Labels
bug Something isn't working refinement step

Comments

@JHartig
Copy link

JHartig commented Apr 24, 2024

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
filt_pose, _ = 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

@JHartig JHartig added the bug Something isn't working label Apr 24, 2024
@JensBlack JensBlack self-assigned this Apr 25, 2024
@JensBlack
Copy link
Collaborator

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

@JHartig
Copy link
Author

JHartig commented Apr 25, 2024

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
filt_pose, _ = 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
Copy link
Collaborator

a) duplicate from #82
b) new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working refinement step
Projects
None yet
Development

No branches or pull requests

2 participants