YttriLab / A-SOID

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

Error During Refinement Step: 'nonetype' object is not subscriptable #89

Open dongyuyand opened 6 months ago

dongyuyand commented 6 months ago

Describe the bug During refinement, after uploading the video and pose file, the software returns "terminated early" for some videos and cannot extract frames. The software is able to extract frames for some videos but fails to generate refinement sets that can be reviewed, with the 'nonetype' object is not subscriptable error message.

Error message as follows (also shown in screenshot):

TypeError: 'NoneType' object is not subscriptable Traceback: File "C:\Users\buczy\anaconda3\envs\asoid\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 584, in _run_script exec(code, module.dict) File "C:\Users\buczy\Desktop\A-SOID-main\asoid\app.py", line 328, in main() File "C:\Users\buczy\Desktop\A-SOID-main\asoid\app.py", line 307, in main D_manual_active_learning.main(ri=ri, config=st.session_state['config']) File "c:\users\buczy\desktop\a-soid-main\asoid\apps\D_manual_active_learning.py", line 33, in main refinement.main() File "c:\users\buczy\desktop\a-soid-main\asoid\utils\manual_refinement.py", line 912, in main (st.session_state['examples_idx'][behav_choice][i][1] -

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Refine behaviors', upload video and corresponding pose file
  2. Go to 'Create New Data Set'
  3. Create Dataset
  4. Go to 'Active Learning'
  5. Start Active learning > error is generated

Expected behavior Expected refinement sets to be generated and to be able to provide user feedback, in order to train the system further.

Screenshots Screenshot 2024-05-27 131809 Screenshot 2024-05-27 132102 Screenshot 2024-05-27 132843

Desktop (please complete the following information):

Project Config (please post the content of the corresponding config.ini file) [Project] PROJECT_TYPE = DeepLabCut PROJECT_NAME = May-26-2024_editedBORIS PROJECT_PATH = C:\Users\buczy/Desktop/asoid_output FRAMERATE = 60 KEYPOINTS_CHOSEN = Nose, BetweenEyes, LeftEar, RightEar, Neck, LeftShoulder, RightShoulder, BodyCentre, LeftSide, RightSide, LeftHip, RightHip, TailBase, TailCentre, TailTip EXCLUDE_OTHER = False FILE_TYPE = csv INDIVIDUALS_CHOSEN = single animal CLASSES = Dig, Genital/Stomach Groom, Head Groom, Jump, Rear, Scratch, Shake, Side/Back Groom, Stand, Tail Rigid, other MULTI_ANIMAL = False IS_3D = False

[Data] DATA_INPUT_FILES = 042524_CS_T8_T_I2DLC_resnet50_SomaticVideoMar28shuffle4_200000_filtered.csv, 042524_CS_T8_T_J4DLC_resnet50_SomaticVideoMar28shuffle4_200000_filtered.csv, 042624_CS_T8_T_L1DLC_resnet50_SomaticVideoMar28shuffle4_200000_filtered.csv, 042524_CS_T8_T_A4DLC_resnet50_SomaticVideoMar28shuffle4_200000_filtered.csv, 042524_CS_T8_T_A3DLC_resnet50_SomaticVideoMar28shuffle4_200000_filtered.csv, 042524_CS_T8_T_A5DLC_resnet50_SomaticVideoMar28shuffle4_200000_filtered.csv, 042524_CS_T8_T_B2DLC_resnet50_SomaticVideoMar28shuffle4_200000_filtered.csv LABEL_INPUT_FILES = CIE 2_No focal subject.csv, CIE 4_No focal subject.csv, CIE 6_No focal subject.csv, CIE 9_No focal subject.csv, CIE 21_No focal subject.csv, CIE 30_No focal subject.csv, CIE 33_No focal subject.csv ROOT_PATH = None

[Processing] LLH_VALUE = 0.1 ITERATION = 0 MIN_DURATION = 0.1 TRAIN_FRACTION = 0.65 MAX_ITER = 1000 MAX_SAMPLES_ITER = 110 CONF_THRESHOLD = 0.5 N_SHUFFLED_SPLIT = None

Additional context

JensBlack commented 4 months ago

Thank you @dongyuyand for reporting this issue.

As mentioned in #88 #85 and #84, the refinement step has some issues that we are resolving right now. It will take some time unfortunately.

In the meantime, although it is not a permanent solution, you can run A-SOiD without accessing this step.

I'll let you know once we have a solution.