deepethogram icon indicating copy to clipboard operation
deepethogram copied to clipboard

[GUI] Error while importing multiple videos : AttributeError: module 'numpy' has no attribute 'float'.

Open karinmcode opened this issue 1 year ago • 1 comments

Hi,

I get this error when importing multiple videos. I can't open the videos or add labels after that.

I installed DEG with python 3.8 environment.

ERROR

  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 694, in update_image
    qpixmap = numpy_to_qpixmap(self.image)
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 21, in numpy_to_qpixmap
    if image.dtype == np.float:
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\numpy\__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

FULL ERROR

[2023-10-22 11:25:49,654] INFO [deepethogram.projects.convert_config_paths_to_absolute:1178] after absolute: {'class_names': ['background', 'resting', 'adjusting', 'walking', 'running', 'grooming', 'sniffing', 'sound'], 'config_file': 'H:\\My Drive\\Research\\Schneider lab\\Paper\\Karin paper version 230911\\Reviewers requests\\Fig 5 Automated behavior classification\\DeepEthogram\\test2pManual_deepethogram\\project_config.yaml', 'data_path': 'H:\\My Drive\\Research\\Schneider lab\\Paper\\Karin paper version 230911\\Reviewers requests\\Fig 5 Automated behavior classification\\DeepEthogram\\test2pManual_deepethogram\\DATA', 'labeler': None, 'model_path': 'H:\\My Drive\\Research\\Schneider lab\\Paper\\Karin paper version 230911\\Reviewers requests\\Fig 5 Automated behavior classification\\DeepEthogram\\test2pManual_deepethogram\\models', 'name': 'test2pManual', 'path': 'H:\\My Drive\\Research\\Schneider lab\\Paper\\Karin paper version 230911\\Reviewers requests\\Fig 5 Automated behavior classification\\DeepEthogram\\test2pManual_deepethogram', 'pretrained_path': 'pretrained_models'}
[2023-10-22 11:25:49,654] INFO [deepethogram.gui.main.initialize_project:1019] cwd: C:\Users\labadmin
[2023-10-22 11:25:49,662] INFO [deepethogram.projects.convert_config_paths_to_absolute:1135] cwd in absolute: C:\Users\labadmin
[2023-10-22 11:25:49,662] WARNING [deepethogram.projects.convert_config_paths_to_absolute:1172] pretrained directory does not exist! pretrained_models
See instructions on the project GitHub for downloading weights: https://github.com/jbohnslav/deepethogram
[2023-10-22 11:25:49,669] INFO [deepethogram.projects.convert_config_paths_to_absolute:1178] after absolute: {'class_names': ['background', 'resting', 'adjusting', 'walking', 'running', 'grooming', 'sniffing', 'sound'], 'config_file': 'H:\\My Drive\\Research\\Schneider lab\\Paper\\Karin paper version 230911\\Reviewers requests\\Fig 5 Automated behavior classification\\DeepEthogram\\test2pManual_deepethogram\\project_config.yaml', 'data_path': 'H:\\My Drive\\Research\\Schneider lab\\Paper\\Karin paper version 230911\\Reviewers requests\\Fig 5 Automated behavior classification\\DeepEthogram\\test2pManual_deepethogram\\DATA', 'labeler': None, 'model_path': 'H:\\My Drive\\Research\\Schneider lab\\Paper\\Karin paper version 230911\\Reviewers requests\\Fig 5 Automated behavior classification\\DeepEthogram\\test2pManual_deepethogram\\models', 'name': 'test2pManual', 'path': 'H:\\My Drive\\Research\\Schneider lab\\Paper\\Karin paper version 230911\\Reviewers requests\\Fig 5 Automated behavior classification\\DeepEthogram\\test2pManual_deepethogram', 'pretrained_path': 'pretrained_models'}
[2023-10-22 11:25:49,728] INFO [deepethogram.gui.main.initialize_project:1021] loaded project configuration: split:
  reload: true
  file: null
  train_val_test:
  - 0.8
  - 0.2
  - 0.0
compute:
  fp16: false
  num_workers: 8
  batch_size: 32
  min_batch_size: 8
  max_batch_size: 512
  distributed: false
  gpu_id: 0
  dali: false
  metrics_workers: 0
reload:
  overwrite_cfg: false
  latest: false
notes: null
log:
  level: info
run:
  type: gui
  model: null
  dir: H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers
    requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\gui_logs\231022_112549
label_view_width: 31
control_arrow_jump: 31
vertical_arrow_jump: 3
cmap: deepethogram
unlabeled_alpha: 0.1
prediction_opacity: 0.2
postprocessor:
  type: min_bout_per_behavior
  min_bout_length: 1
augs:
  LR: 0.5
  UD: 0.0
  brightness: 0.25
  contrast: 0.1
  crop_size: null
  degrees: 10
  grayscale: 0.5
  hue: 0.1
  normalization:
    'N': 0
    mean:
    - 0.5
    - 0.5
    - 0.5
    std:
    - 0.5
    - 0.5
    - 0.5
  pad: null
  random_resize: false
  resize:
  - 224
  - 224
  saturation: 0.1
project:
  class_names:
  - background
  - resting
  - adjusting
  - walking
  - running
  - grooming
  - sniffing
  - sound
  config_file: H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers
    requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\project_config.yaml
  data_path: H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers
    requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\DATA
  labeler: null
  model_path: H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers
    requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\models
  name: test2pManual
  path: H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers
    requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram
  pretrained_path: pretrained_models
sequence:
  filter_length: 15
train:
  loss_weight_exp: 1.0

[2023-10-22 11:25:49,744] INFO [deepethogram.gui.main.initialize_project:1022] cwd: H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\gui_logs\231022_112549
[2023-10-22 11:25:49,752] INFO [deepethogram.gui.main.project_loaded_buttons:175] Number finalized labels: 0
[2023-10-22 11:25:50,314] INFO [deepethogram.gui.main.log_idle:151] User has been idle for 60.0 seconds...
Traceback (most recent call last):
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 150, in update_frame
    self.show_image(self.frame)
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 182, in show_image
    qpixmap = numpy_to_qpixmap(array)
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 21, in numpy_to_qpixmap
    if image.dtype == np.float:
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\numpy\__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
[2023-10-22 11:26:21,314] INFO [deepethogram.gui.main.initialize_video:241] Copying H:/My Drive/Research/Schneider lab/Paper/Karin paper version 230911/Reviewers requests/Fig 5 Automated behavior classification/deg videos to load/CAM1_m522_211110_003.mp4 to your DEG directory
[2023-10-22 11:26:24,036] INFO [deepethogram.zscore.zscore_video:151] zscoring file: H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\DATA\CAM1_m522_211110_003\CAM1_m522_211110_003.mp4
100%|███████████████████████████████████████████████████████████████████████████████▋| 852/855 [00:38<00:00, 23.17it/s][2023-10-22 11:27:02,252] WARNING [deepethogram.zscore.get_video_statistics:104] Error reading frame 8530 from video H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\DATA\CAM1_m522_211110_003\CAM1_m522_211110_003.mp4
[2023-10-22 11:27:02,260] WARNING [deepethogram.zscore.get_video_statistics:104] Error reading frame 8540 from video H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\DATA\CAM1_m522_211110_003\CAM1_m522_211110_003.mp4
100%|████████████████████████████████████████████████████████████████████████████████| 855/855 [00:38<00:00, 22.38it/s]
[2023-10-22 11:27:02,276] INFO [deepethogram.zscore.get_video_statistics:116] final stats: mean: [0.38388044 0.38388044 0.38388044] std: [0.24495931 0.24495931 0.24495931] n: 345894912
[2023-10-22 11:27:02,412] ERROR [deepethogram.gui.main.initialize_video:251] Error initializing video: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Traceback (most recent call last):
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\main.py", line 247, in initialize_video
    self.initialize_label()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\main.py", line 291, in initialize_label
    self.ui.labels.initialize(behaviors=OmegaConf.to_container(self.cfg.project.class_names),
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 861, in initialize
    self.label.initialize(len(self.behaviors),
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 425, in initialize
    self.recreate_label_image()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 715, in recreate_label_image
    self.update_image()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 694, in update_image
    qpixmap = numpy_to_qpixmap(self.image)
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 21, in numpy_to_qpixmap
    if image.dtype == np.float:
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\numpy\__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Traceback (most recent call last):
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\main.py", line 247, in initialize_video
    self.initialize_label()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\main.py", line 291, in initialize_label
    self.ui.labels.initialize(behaviors=OmegaConf.to_container(self.cfg.project.class_names),
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 861, in initialize
    self.label.initialize(len(self.behaviors),
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 425, in initialize
    self.recreate_label_image()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 715, in recreate_label_image
    self.update_image()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 694, in update_image
    qpixmap = numpy_to_qpixmap(self.image)
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 21, in numpy_to_qpixmap
    if image.dtype == np.float:
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\numpy\__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

[2023-10-22 11:27:02,978] INFO [deepethogram.gui.main.initialize_video:241] Copying H:/My Drive/Research/Schneider lab/Paper/Karin paper version 230911/Reviewers requests/Fig 5 Automated behavior classification/deg videos to load/CAM1_m523_211109_001.mp4 to your DEG directory
[2023-10-22 11:27:04,126] INFO [deepethogram.zscore.zscore_video:151] zscoring file: H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\DATA\CAM1_m523_211109_001\CAM1_m523_211109_001.mp4
 99%|███████████████████████████████████████████████████████████████████████████████▍| 387/390 [00:17<00:00, 23.06it/s][2023-10-22 11:27:21,486] WARNING [deepethogram.zscore.get_video_statistics:104] Error reading frame 3890 from video H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\DATA\CAM1_m523_211109_001\CAM1_m523_211109_001.mp4
100%|████████████████████████████████████████████████████████████████████████████████| 390/390 [00:17<00:00, 22.48it/s]
[2023-10-22 11:27:21,507] INFO [deepethogram.zscore.get_video_statistics:116] final stats: mean: [0.38340849 0.38340849 0.38340849] std: [0.24891638 0.24891638 0.24891638] n: 157741056
[2023-10-22 11:27:21,589] ERROR [deepethogram.gui.main.initialize_video:251] Error initializing video: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Traceback (most recent call last):
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\main.py", line 247, in initialize_video
    self.initialize_label()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\main.py", line 291, in initialize_label
    self.ui.labels.initialize(behaviors=OmegaConf.to_container(self.cfg.project.class_names),
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 861, in initialize
    self.label.initialize(len(self.behaviors),
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 425, in initialize
    self.recreate_label_image()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 715, in recreate_label_image
    self.update_image()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 694, in update_image
    qpixmap = numpy_to_qpixmap(self.image)
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 21, in numpy_to_qpixmap
    if image.dtype == np.float:
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\numpy\__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Traceback (most recent call last):
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\main.py", line 247, in initialize_video
    self.initialize_label()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\main.py", line 291, in initialize_label
    self.ui.labels.initialize(behaviors=OmegaConf.to_container(self.cfg.project.class_names),
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 861, in initialize
    self.label.initialize(len(self.behaviors),
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 425, in initialize
    self.recreate_label_image()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 715, in recreate_label_image
    self.update_image()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 694, in update_image
    qpixmap = numpy_to_qpixmap(self.image)
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 21, in numpy_to_qpixmap
    if image.dtype == np.float:
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\numpy\__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

[2023-10-22 11:27:22,124] INFO [deepethogram.gui.main.initialize_video:241] Copying H:/My Drive/Research/Schneider lab/Paper/Karin paper version 230911/Reviewers requests/Fig 5 Automated behavior classification/deg videos to load/CAM1_m524_211109_001.mp4 to your DEG directory
[2023-10-22 11:27:22,394] INFO [deepethogram.zscore.zscore_video:151] zscoring file: H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\DATA\CAM1_m524_211109_001\CAM1_m524_211109_001.mp4
100%|████████████████████████████████████████████████████████████████████████████████| 161/161 [00:07<00:00, 22.76it/s]
[2023-10-22 11:27:29,497] INFO [deepethogram.zscore.get_video_statistics:116] final stats: mean: [0.38582551 0.38582551 0.38582551] std: [0.24880768 0.24880768 0.24880768] n: 65286144
[2023-10-22 11:27:29,543] ERROR [deepethogram.gui.main.initialize_video:251] Error initializing video: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Traceback (most recent call last):
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\main.py", line 247, in initialize_video
    self.initialize_label()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\main.py", line 291, in initialize_label
    self.ui.labels.initialize(behaviors=OmegaConf.to_container(self.cfg.project.class_names),
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 861, in initialize
    self.label.initialize(len(self.behaviors),
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 425, in initialize
    self.recreate_label_image()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 715, in recreate_label_image
    self.update_image()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 694, in update_image
    qpixmap = numpy_to_qpixmap(self.image)
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 21, in numpy_to_qpixmap
    if image.dtype == np.float:
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\numpy\__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Traceback (most recent call last):
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\main.py", line 247, in initialize_video
    self.initialize_label()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\main.py", line 291, in initialize_label
    self.ui.labels.initialize(behaviors=OmegaConf.to_container(self.cfg.project.class_names),
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 861, in initialize
    self.label.initialize(len(self.behaviors),
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 425, in initialize
    self.recreate_label_image()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 715, in recreate_label_image
    self.update_image()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 694, in update_image
    qpixmap = numpy_to_qpixmap(self.image)
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 21, in numpy_to_qpixmap
    if image.dtype == np.float:
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\numpy\__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

MESSAGE IN CMD WHEN LOADING GUI

(base) C:\Users\labadmin>conda activate deg38

(deg38) C:\Users\labadmin>python -m deepethogram
C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\scipy\__init__.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.24.4
  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
[2023-10-22 11:35:59,323] INFO [deepethogram.gui.main.setup_gui_cfg:1268] CWD: C:\Users\labadmin
[2023-10-22 11:35:59,323] INFO [deepethogram.gui.main.setup_gui_cfg:1269] Configuration used: split:
  reload: true
  file: null
  train_val_test:
  - 0.8
  - 0.2
  - 0.0
compute:
  fp16: false
  num_workers: 8
  batch_size: auto
  min_batch_size: 8
  max_batch_size: 512
  distributed: false
  gpu_id: 0
  dali: false
  metrics_workers: 0
reload:
  overwrite_cfg: false
  latest: false
notes: null
log:
  level: info
run:
  type: gui
label_view_width: 31
control_arrow_jump: 31
vertical_arrow_jump: 3
cmap: deepethogram
unlabeled_alpha: 0.1
prediction_opacity: 0.2

MESSAGE IN CMD WINDOW WHEN LOADING PROJECT


(deg38) C:\Users\labadmin>python -m deepethogram
C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\scipy\__init__.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.24.4
  warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
[2023-10-22 11:44:28,915] INFO [deepethogram.gui.main.setup_gui_cfg:1268] CWD: C:\Users\labadmin
[2023-10-22 11:44:28,920] INFO [deepethogram.gui.main.setup_gui_cfg:1269] Configuration used: split:
  reload: true
  file: null
  train_val_test:
  - 0.8
  - 0.2
  - 0.0
compute:
  fp16: false
  num_workers: 8
  batch_size: auto
  min_batch_size: 8
  max_batch_size: 512
  distributed: false
  gpu_id: 0
  dali: false
  metrics_workers: 0
reload:
  overwrite_cfg: false
  latest: false
notes: null
log:
  level: info
run:
  type: gui
label_view_width: 31
control_arrow_jump: 31
vertical_arrow_jump: 3
cmap: deepethogram
unlabeled_alpha: 0.1
prediction_opacity: 0.2

[2023-10-22 11:44:46,214] INFO [deepethogram.gui.main.initialize_project:1017] cwd: C:\Users\labadmin
[2023-10-22 11:44:46,222] INFO [deepethogram.projects.convert_config_paths_to_absolute:1135] cwd in absolute: C:\Users\labadmin
[2023-10-22 11:44:46,222] INFO [deepethogram.projects.convert_config_paths_to_absolute:1178] after absolute: {'class_names': ['background', 'resting', 'adjusting', 'walking', 'running', 'grooming', 'sniffing', 'sound'], 'config_file': 'H:\\My Drive\\Research\\Schneider lab\\Paper\\Karin paper version 230911\\Reviewers requests\\Fig 5 Automated behavior classification\\DeepEthogram\\test2pManual_deepethogram\\project_config.yaml', 'data_path': 'H:\\My Drive\\Research\\Schneider lab\\Paper\\Karin paper version 230911\\Reviewers requests\\Fig 5 Automated behavior classification\\DeepEthogram\\test2pManual_deepethogram\\DATA', 'labeler': None, 'model_path': 'H:\\My Drive\\Research\\Schneider lab\\Paper\\Karin paper version 230911\\Reviewers requests\\Fig 5 Automated behavior classification\\DeepEthogram\\test2pManual_deepethogram\\models', 'name': 'test2pManual', 'path': 'H:\\My Drive\\Research\\Schneider lab\\Paper\\Karin paper version 230911\\Reviewers requests\\Fig 5 Automated behavior classification\\DeepEthogram\\test2pManual_deepethogram', 'pretrained_path': 'H:\\My Drive\\Research\\Schneider lab\\Paper\\Karin paper version 230911\\Reviewers requests\\Fig 5 Automated behavior classification\\DeepEthogram\\test2pManual_deepethogram\\models\\pretrained_models'}
[2023-10-22 11:44:46,222] INFO [deepethogram.gui.main.initialize_project:1019] cwd: C:\Users\labadmin
[2023-10-22 11:44:46,277] INFO [deepethogram.gui.main.initialize_project:1021] loaded project configuration: split:
  reload: true
  file: null
  train_val_test:
  - 0.8
  - 0.2
  - 0.0
compute:
  fp16: false
  num_workers: 8
  batch_size: 32
  min_batch_size: 8
  max_batch_size: 512
  distributed: false
  gpu_id: 0
  dali: false
  metrics_workers: 0
reload:
  overwrite_cfg: false
  latest: false
notes: null
log:
  level: info
run:
  type: gui
  model: null
  dir: H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers
    requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\gui_logs\231022_114446
label_view_width: 31
control_arrow_jump: 31
vertical_arrow_jump: 3
cmap: deepethogram
unlabeled_alpha: 0.1
prediction_opacity: 0.2
postprocessor:
  type: min_bout_per_behavior
  min_bout_length: 1
augs:
  LR: 0.5
  UD: 0.0
  brightness: 0.25
  contrast: 0.1
  crop_size: null
  degrees: 10
  grayscale: 0.5
  hue: 0.1
  normalization:
    'N': 65286144
    mean:
    - 0.3858255071043293
    - 0.3858255071043293
    - 0.3858255071043293
    std:
    - 0.2488076827106709
    - 0.2488076827106709
    - 0.2488076827106709
  pad: null
  random_resize: false
  resize:
  - 224
  - 224
  saturation: 0.1
project:
  class_names:
  - background
  - resting
  - adjusting
  - walking
  - running
  - grooming
  - sniffing
  - sound
  config_file: H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers
    requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\project_config.yaml
  data_path: H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers
    requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\DATA
  labeler: null
  model_path: H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers
    requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\models
  name: test2pManual
  path: H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers
    requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram
  pretrained_path: H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers
    requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\models\pretrained_models
sequence:
  filter_length: 15
train:
  loss_weight_exp: 1.0

[2023-10-22 11:44:46,284] INFO [deepethogram.gui.main.initialize_project:1022] cwd: H:\My Drive\Research\Schneider lab\Paper\Karin paper version 230911\Reviewers requests\Fig 5 Automated behavior classification\DeepEthogram\test2pManual_deepethogram\gui_logs\231022_114446
[2023-10-22 11:44:46,464] INFO [deepethogram.gui.main.project_loaded_buttons:175] Number finalized labels: 0
Traceback (most recent call last):
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 150, in update_frame
    self.show_image(self.frame)
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 182, in show_image
    qpixmap = numpy_to_qpixmap(array)
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 21, in numpy_to_qpixmap
    if image.dtype == np.float:
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\numpy\__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
[2023-10-22 11:44:51,652] INFO [deepethogram.gui.main.initialize_video:226] Record for loaded video: {'flow': None, 'label': None, 'output': None, 'rgb': 'H:\\My Drive\\Research\\Schneider lab\\Paper\\Karin paper version 230911\\Reviewers requests\\Fig 5 Automated behavior classification\\DeepEthogram\\test2pManual_deepethogram\\DATA\\CAM1_m522_211110_003\\CAM1_m522_211110_003.mp4', 'keypoint': None, 'key': 'CAM1_m522_211110_003'}
[2023-10-22 11:44:51,660] ERROR [deepethogram.gui.main.initialize_video:251] Error initializing video: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Traceback (most recent call last):
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\main.py", line 234, in initialize_video
    self.initialize_label()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\main.py", line 291, in initialize_label
    self.ui.labels.initialize(behaviors=OmegaConf.to_container(self.cfg.project.class_names),
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 861, in initialize
    self.label.initialize(len(self.behaviors),
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 425, in initialize
    self.recreate_label_image()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 715, in recreate_label_image
    self.update_image()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 694, in update_image
    qpixmap = numpy_to_qpixmap(self.image)
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 21, in numpy_to_qpixmap
    if image.dtype == np.float:
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\numpy\__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Traceback (most recent call last):
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\main.py", line 234, in initialize_video
    self.initialize_label()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\main.py", line 291, in initialize_label
    self.ui.labels.initialize(behaviors=OmegaConf.to_container(self.cfg.project.class_names),
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 861, in initialize
    self.label.initialize(len(self.behaviors),
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 425, in initialize
    self.recreate_label_image()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 715, in recreate_label_image
    self.update_image()
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 694, in update_image
    qpixmap = numpy_to_qpixmap(self.image)
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\deepethogram\gui\custom_widgets.py", line 21, in numpy_to_qpixmap
    if image.dtype == np.float:
  File "C:\Users\labadmin\.conda\envs\deg38\lib\site-packages\numpy\__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations


karinmcode avatar Oct 22 '23 15:10 karinmcode

Solved by installing Numpy 1.20

karinmcode avatar Oct 22 '23 16:10 karinmcode