Addalin / cameranetwork

Software for remote sensing camera networks
Other
2 stars 0 forks source link

Failed loading sky mask. #53

Open Addalin opened 4 years ago

Addalin commented 4 years ago

Describe the bug A clear and concise description of what the bug is.

Traceback (most recent call last):
  File "/VISL2_net/addalin/code/cameranetwork/CameraNetwork/controller.py", line 216, in __init__
    self.sky_mask_base = sio.loadmat(gs.MASK_PATH)['mask_base']
  File "/home/addalin/anaconda2/envs/cn_client/lib/python2.7/site-packages/scipy/io/matlab/mio.py", line 208, in loadmat
    matfile_dict = MR.get_variables(variable_names)
  File "/home/addalin/anaconda2/envs/cn_client/lib/python2.7/site-packages/scipy/io/matlab/mio5.py", line 292, in get_variables
    res = self.read_var_array(hdr, process)
  File "/home/addalin/anaconda2/envs/cn_client/lib/python2.7/site-packages/scipy/io/matlab/mio5.py", line 252, in read_var_array
    return self._matrix_reader.array_from_header(header, process)
  File "mio5_utils.pyx", line 675, in scipy.io.matlab.mio5_utils.VarReader5.array_from_header
  File "mio5_utils.pyx", line 705, in scipy.io.matlab.mio5_utils.VarReader5.array_from_header
  File "mio5_utils.pyx", line 778, in scipy.io.matlab.mio5_utils.VarReader5.read_real_complex
  File "mio5_utils.pyx", line 450, in scipy.io.matlab.mio5_utils.VarReader5.read_numeric
  File "mio5_utils.pyx", line 355, in scipy.io.matlab.mio5_utils.VarReader5.read_element
  File "streams.pyx", line 195, in scipy.io.matlab.streams.ZlibInputStream.read_string
  File "streams.pyx", line 188, in scipy.io.matlab.streams.ZlibInputStream.read_into
IOError: could not read bytes
ERROR:root:None

To Reproduce cd /code/cameranetwork$ cd scripts_client/ python start_local.py -d "/VISL2_net/amitibo/experiment_2017_02-03/"

On VISL machine

OmerShubi commented 4 years ago

According to https://github.com/anishathalye/neural-style/issues/47 this is due to corrupted file. Should download it again and try again.

On my station it works for the given camera folder that I have.

Using Scipy version 1.2.1

Anyways, this is the code that is responsible:

https://github.com/Addalin/cameranetwork/blob/ac9d51397a4dd08402d4ee4729b2472e6ae7f14c/CameraNetwork/controller.py#L212-L222

and mask path is given by

https://github.com/Addalin/cameranetwork/blob/ac9d51397a4dd08402d4ee4729b2472e6ae7f14c/CameraNetwork/global_settings.py#L421

OmerShubi commented 4 years ago

I ran start_local with only some of the cameras (111c 112b 115b 120) and didn't experience any issues.
However, the others from here ['cam_110bL', 'cam_117L', 'cam_109bL', 'cam_115bL', 'cam_111cL', 'cam_119bL', 'cam_120L', 'cam_112bL'] did raise for one of them. this further suggests a corrupted file in one of them..