Closed kinfeparty closed 5 years ago
trace_dir is used in the original SVO code to evaluate the timing, errors, and the number of tracked points in the SVO. It is a csv file saved in the trace_dir for performance evaluation.
trace_dir is used in the original SVO code to evaluate the timing, errors, and the number of tracked points in the SVO. It is a csv file saved in the trace_dir for performance evaluation.
So the trace_dir isn't the cause of exit code -6 ? Have you met the error?
I didn't have this error. Try to change your trace_dir to "/home/fight/results"
I didn't have this error. Try to change your trace_dir to "/home/fight/results"
I‘ve changed it but still have this error. Could you show me your example of Directories? I saved depth_2.npy in the 'disparity' folder.
I didn't have this error. Try to change your trace_dir to "/home/fight/results"
Hi,sorry for interrupting you again and again,but your work is really important to me. I still have trouble when I type the code 'roslaunch svo_ros kittiOffline00-02.launch'. Do I need to input the ROS_MASTER_URL and ROS_IP? I don't know why I can't recurrent your code. I really need your help ,thank you!
I see your problem. You shouldn't provide the full directory in "image_folder" and "depth_folder".
sequence_path: "/home/fight/ORB_SLAM2/dataset/sequences/02" image_folder: "image_2" depth_folder: "disp_image_2_modelcity2kitti"
Make sure that you have the timestamp file ("/home/fight/ORB_SLAM2/dataset/sequences/02/times.txt").
Also, make sure that the depth maps (numpy files) are saved in "/home/fight/ORB_SLAM2/dataset/sequences/02/disp_image_2_modelcity2kitti/" with the filenames of depth_0.npy, depth_1.npy, depth_2.npy, ...
I see your problem. You shouldn't provide the full directory in "image_folder" and "depth_folder".
sequence_path: "/home/fight/ORB_SLAM2/dataset/sequences/02" image_folder: "image_2" depth_folder: "disp_image_2_modelcity2kitti"
Make sure that you have the timestamp file ("/home/fight/ORB_SLAM2/dataset/sequences/02/times.txt").
Also, make sure that the depth maps (numpy files) are saved in "/home/fight/ORB_SLAM2/dataset/sequences/02/disp_image_2_modelcity2kitti/" with the filenames of depth_0.npy, depth_1.npy, depth_2.npy, ...
Thanks a lot! I found that my problem is my opencv_version. Now I can start the program but get the exit code -11.I think I will make it.
我看到你的问题。您不应该在“image_folder”和“depth_folder”中提供完整目录。
sequence_path:“/ home / fight / ORB_SLAM2 / dataset / sequences / 02” image_folder:“image_2” depth_folder:“disp_image_2_modelcity2kitti”
确保您有时间戳文件(“/home/fight/ORB_SLAM2/dataset/sequences/02/times.txt”)。
此外,请确保深度贴图(numpy文件)保存在“/ home / fight / ORB_SLAM2 / dataset / sequences / 02 / disp_image_2_modelcity2kitti /”中,文件名为depth_0.npy,depth_1.npy,depth_2.npy,.. 。
I've met a new question. I Modify the monodepth_main.py and get several .npy files. My .npy size is 1MB and the program can run about several seconds then the program broke with several errors and output exit code -11. I test the monodepth_simple.py I find that the result of .npy size is about 500KB,so I modify the monodepth_main.py again and finally I get the same size of .npy. But when I put thousands of .npy into the disp_image_2_modelcity2kitti/ and type the code 'roslaunch svo_ros kittiOffline00-02.launch'. The program doesn't run and output exit code -6. So could you tell me what's the size of your .npy? Thanks a lot.
The file size for each .npy file is about 3.6mb. Can you show me your monodepth_main.py file? I would like to know how you save those files.
Hey, I have uploaded the first 100 depth maps in KITTI sequence 00 for you to do a quick test. Hope that you can identify the real problem in your code. Click here
Hey, I have uploaded the first 100 depth maps in KITTI sequence 00 for you to do a quick test. Hope that you can identify the real problem in your code. Click here
I can use your depth maps to run the program,finally! So I can make a conclusion that I didn't modify the monodepth_main.py right. I imitate the monodepth_simple.py but cannot get the same size of .npy file like yours. I use the pretrained model 'city2kitti'. I only modify the #RESTORE code.
Hey, I have uploaded the first 100 depth maps in KITTI sequence 00 for you to do a quick test. Hope that you can identify the real problem in your code. Click here
I can use your depth maps to run the program,finally! So I can make a conclusion that I didn't modify the monodepth_main.py right. I imitate the monodepth_simple.py but cannot get the same size of .npy file like yours. I use the pretrained model 'city2kitti'. I only modify the #RESTORE code.
The saving step looks correct. However, you should convert the disparity map (from network output) to depth map using the following equation:
depth = (718.856 * 0.54 / 1241) / disp # where 0.54 is the stereo baseline distance, 718.856 the focal length and 1241 the image width
Therefore, here is how the code should look like
SCALE = 0.3128 # (718.856 * 0.54 / 1241)
for step in range(num_test_samples):
disp = sess.run(model.disp_left_est[0])
disp = post_process_disparity(disps.squeeze())
# If you wish to resize the disparity map back to original size
# disp = cv2.resize(disp, (1241, 376), interpolation=cv2.INTER_LINEAR)
# Convert disparity to depth
depth = SCALE / disp
np.save(output_directory + '/' + 'depth_' + str(step) + '.npy', depth)
Hey, I have uploaded the first 100 depth maps in KITTI sequence 00 for you to do a quick test. Hope that you can identify the real problem in your code. Click here
I can use your depth maps to run the program,finally! So I can make a conclusion that I didn't modify the monodepth_main.py right. I imitate the monodepth_simple.py but cannot get the same size of .npy file like yours. I use the pretrained model 'city2kitti'. I only modify the #RESTORE code.
The saving step looks correct. However, you should convert the disparity map (from network output) to depth map using the following equation:
depth = (718.856 * 0.54 / 1241) / disp # where 0.54 is the stereo baseline distance, 718.856 the focal length and 1241 the image width
Therefore, here is how the code should look like
SCALE = 0.3128 # (718.856 * 0.54 / 1241)
for step in range(num_test_samples):
disp = sess.run(model.disp_left_est[0]) disp = post_process_disparity(disps.squeeze()) # If you wish to resize the disparity map back to original size # disp = cv2.resize(disp, (1241, 376), interpolation=cv2.INTER_LINEAR) # Convert disparity to depth depth = SCALE / disp np.save(output_directory + '/' + 'depth_' + str(step) + '.npy', depth)
THANK! FINALLY I CAN RUN THE PROGRAM WITH MY .NPY FILES.
@kinfeparty I am glad that you finally get it working.
@kinfeparty @yan99033 Can you provide your modified monodepth_main.py. I meet the same error. In addition, can you provide the new address about upload data, the address is invalid.
I encountered a new error about roslaunch. My settings about vo_kitti.yaml is
sequence_path: "/home/SENSETIME/chenchang1/data/dataset/sequences/00" image_folder: "image_2" # /media/user/path/to/kitti/dataset/sequences/00/image_2/ depth_folder: "out_depth" # /media/user/path/to/kitti/dataset/sequences/00/disp_image_2_modelcity2kitti/
[svo-1] killing on exit shutting down processing monitor... ... shutting down processing monitor complete
@cumtchenchang Just make sure that whether you add the code SCALE = 0.3128 # (718.856 * 0.54 / 1241) in monodepth_simple.py. The log can't show any information about the error.
@kinfeparty Thank you for your response. I added SCALE in monodepth_main.py. Changed part is: SCALE = 0.3128 # (718.856 * 0.54 / 1241) for step in range(num_test_samples): disp = sess.run(model.disp_left_est[0]) disp = post_process_disparity(disp.squeeze())
# disparities_pp[step] = post_process_disparity(disp.squeeze())
# If you wish to resize the disparity map back to original size
# disp = cv2.resize(disp, (1241, 376), interpolation=cv2.INTER_LINEAR)
# Convert disparity to depth
disp = SCALE/disp
np.save(output_directory + '/' + 'depth_' + str(step) + '.npy', disp)
The link is: https://github.com/cumtchenchang/monodepth/blob/master/monodepth_main2.py
@kinfeparty Every .npy file is 1M, maybe something wrong with my provided code. Could you provide your changed code? Thank you!
@cumtchenchang Sorry,I deleted the code,so you may ask the author.
@kinfeparty Thank you sincerely. I hope the author can upload the code.
@cumtchenchang @kinfeparty Sorry for the late response. I haven't used the npy files for a while. The code for saving the .npy files was created about 1.5 years ago, and I didn't keep it since I did the online depth inference.
I read your code. You should be importing monodepth.py not monodepth_model.py.
Therefore, Line 23 should be
from monodepth import *
and Line 185 should be
model = monodepth(left, 'vgg')
also the whole def train(): can be deleted to avoid conflicts.
Again, I would strongly recommend you to save the depth maps into one Numpy array file (n, w, h, 1) instead of separate Numpy array files (e.g., (w, h, 1), (w, h, 1), ...). I found that reading the file has non-negligible computational overhead so it would be better to preload the depth maps from a Numpy array file before processing VO. But you would need to also modify the CNN-SVO source code to do so.
Thank you for your response. I followed your suggestion. However, how to solve the dependency of model.disp_left_est[0] in line 217? Can you provide a complete and runnable code. Thank you!
Hello @yan99033 , I have some question I have successfully install the library for offline mode When I want to run roslaunch svo_ros kittiOffline00-02.launch, I have this error
kadut@kadut-pc:~/catkin_ws$ roslaunch svo_ros kittiOffline00-02.launch [kittiOffline00-02.launch] is neither a launch file in package [svo_ros] nor is [svo_ros] a launch file name The traceback for the exception was written to the log file
Do you know what is caused the error? Or it's because there is no svo_ros file after my installation (My installation is failed)? After run catkin_make, it only produces folder build and devel, there is no install folder, is it my error? Thank you very much
@kadut99 source ~/catkin_ws/devel/setup.bash In addition. Can you generate offline kitti depth correctly? If you can run this demo sucessfully, please tell me how to get the depth .npy files. Thank you.
@kadut99 source ~/catkin_ws/devel/setup.bash In addition. Can you generate offline kitti depth correctly? If you can run this demo sucessfully, please tell me how to get the depth .npy files. Thank you.
@cumtchenchang yes right I forgot that step EDITED : I have the problem related with the .npy files Becausssse everytime I try to run roslaunch, it give me nan value I think it because not much disparity information I could get
@kadut99 Have you solved the problem? If you solve the problem, please tell me the correct way. Thank you.
@kadut99 Have you solved the problem? If you solve the problem, please tell me the correct way. Thank you.
Not yet, still have a problem with .NPY files this is my error : [ INFO] [1571760614.827965871]: Init: Selected first frame. stage second frame Matrix is close to singular! Stop Optimizing. H = -nan -nan -nan -nan nan -nan -nan -nan -nan -nan nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan nan nan nan nan nan nan -nan -nan -nan -nan -nan -nan Jres = -nan -nan -nan -nan nan -nan [ INFO] [1571760614.917232609]: Init: CNNVO tracked 105 features disparities size is smaller than the minimum tracked feature
[svo-1] killing on exit shutting down processing monitor... ... shutting down processing monitor complete done
Hi,I have an error. When i type the code 'roslaunch svo_ros kittiOffline00-02.launch' Could you tell me what's the meaning of trace_dir in the vo_kitti.yaml.I think it's the key of my question.