visinf / self-mono-sf

Self-Supervised Monocular Scene Flow Estimation (CVPR 2020)
Apache License 2.0
248 stars 47 forks source link

tqdm version? #5

Closed chengrongliang closed 4 years ago

chengrongliang commented 4 years ago

Which is your tqdm version, error occur!!!

Traceback (most recent call last):
  File "../main.py", line 90, in <module> 
    main()  
  File "../main.py", line 87, in main  
    validation_augmentation=validation_augmentation)  
  File "/home/administrator/SF/mono-sf/core/runtime.py", line 455, in exec_runtime  
    total_progress = create_progressbar(**progressbar_args)  
  File "/home/administrator/SF/mono-sf/core/runtime.py", line 92, in create_progressbar  
    return tools.tqdm_with_logging(**tqdm_args)  
  File "/home/administrator/SF/mono-sf/core/tools.py", line 406, in tqdm_with_logging  
    logging_on_update=logging_on_update)  
  File "/home/administrator/SF/mono-sf/core/tools.py", line 344, in __init__  
    postfix=postfix)  
  File "/home/administrator/virtualenv/py3.6_pytorch1.3/lib/python3.6/site-packages/tqdm/std.py", line 1050, in __init__  
    self.refresh(lock_args=self.lock_args)  
  File "/home/administrator/virtualenv/py3.6_pytorch1.3/lib/python3.6/site-packages/tqdm/std.py", line 1338, in refresh
    self.display()
  File "/home/administrator/virtualenv/py3.6_pytorch1.3/lib/python3.6/site-packages/tqdm/std.py", line 1471, in display
    self.sp(self.__repr__() if msg is None else msg)
  File "/home/administrator/virtualenv/py3.6_pytorch1.3/lib/python3.6/site-packages/tqdm/std.py", line 1089, in __repr__
    return self.format_meter(**self.format_dict)
TypeError: format_meter() got an unexpected keyword argument 'nrows'
Exception ignored in: <object repr() failed>
Traceback (most recent call last):
  File "/home/administrator/virtualenv/py3.6_pytorch1.3/lib/python3.6/site-packages/tqdm/std.py", line 1086, in __del__
    self.close()
  File "/home/administrator/SF/mono-sf/core/tools.py", line 374, in close
    if self._logging_on_close and not self._closed: 
AttributeError: 'TqdmToLogger' object has no attribute '_logging_on_close' 
hurjunhwa commented 4 years ago

Hi, I used the version, 4.40.0. Oh right, this error occurred to me when I used the recent version. I recommend you to downgrade if it's okay in your local setting :)

chengrongliang commented 4 years ago

@hurjunhwa It's ok, awesome work!!! By the way, how did you convert to disp_1 frame to disp_0 frame(reference frame) when evaluation in kitti benchmark server?

disp_0: Disparity maps of first image pair in reference frame (first left image); needed for the stereo and scene flow benchmark. disp_1: Disparity information of second image pair mapped into the reference (!) frame (first left image) via the optical flow; required only for submissions to the scene flow benchmark (for specifying the scene flow of every pixel in the reference frame, we specify the disparity in the first and second image and the optical flow, all represented in the reference frame! If your method represents the disparity estimation of the second image pair in the second left image, then you need to map it back to the first image and fill in the missing values).

hurjunhwa commented 4 years ago

You can refer from this line in losses.py.

https://github.com/visinf/self-mono-sf/blob/5f4e07955351658fa0060e6ecadca6167693b09d/losses.py#L488

From the output depth (say, depth_0) and scene flow in the reference frame, we calculate the depth value of each pixel at the next time step, by simply adding the z-component of the estimated scene flow, (say, depth_1). Then using the baseline distance of the stereo rig, those depth maps (depth_0, depth_1) are converted to the disparity maps (disp_0, disp_1)

From the description of KITTI dataset, disp_1 is not quite intuitive, but you can think that it contains the depth value of each pixel (in the reference frame) in the next frame.

chengrongliang commented 4 years ago

@hurjunhwa OK, I got it, thank you very much.