Open yicheng6o6 opened 2 years ago
Hi, Thank you for the great work.
I have depth images and I'm wondering how to convert it into .npy or .mat file? I can use some tools transform depth images to .mat files, but when I test model with these data, I got KeyError: 'depth' information.
I would be grateful if you could give me some suggestions to achieve it.
Best wishes, Yicheng
hello bron i also have this question
Hi,
The load image utils expects a dictionary when file format is given in .mat. A .mat file also stores data in a dictionary style. You can create the dictionary with img_dict = {'depth': my_depth_image_array}
and save them with scipy (.mat). See here how the different image formats are loaded.
Hope it helps
Hi,
The load image utils expects a dictionary when file format is given in .mat. A .mat file also stores data in a dictionary style. You can create the dictionary with
img_dict = {'depth': my_depth_image_array}
and save them with scipy (.mat). See here how the different image formats are loaded.Hope it helps
thank you very much for your reply,but i have a new problem I use this commmand:
python main.py --config_file config/itop_config_file.json \ --image_sample img_samples/itop/tset.png \ --output_path output_dir
Traceback (most recent call last):
File "main.py", line 209, in
Hi, Input depth image is expected to have shape [1, 1, width, height]
Hi, @af-doom, @legan78, thank you for your reply:)
I tested my depth images and I met this error:
Traceback (most recent call last):
File "main.py", line 204, in <module>
img_color= cv2.cvtColor(img_color, cv2.COLOR_GRAY2BGR)
cv2.error: OpenCV(4.5.3) /tmp/pip-req-build-xw6jtoah/opencv/modules/imgproc/src/color.simd_helpers.hpp:92: error: (-2:Unspecified error) in function 'cv::impl::{anonymous}::CvtHelper<VScn, VDcn, VDepth, sizePolicy>::CvtHelper(cv::InputArray, cv::OutputArray, int) [with VScn = cv::impl::{anonymous}::Set<1>; VDcn = cv::impl::{anonymous}::Set<3, 4>; VDepth = cv::impl::{anonymous}::Set<0, 2, 5>; cv::impl::{anonymous}::SizePolicy sizePolicy = cv::impl::<unnamed>::NONE; cv::InputArray = const cv::_InputArray&; cv::OutputArray = const cv::_OutputArray&]'
> Invalid number of channels in input image:
> 'VScn::contains(scn)'
> where
> 'scn' is 3
Besides, I'm not sure about how to convert my depth images into [1, 1, width, height]. May I have your suggestions to fix these problems? Any help is much appreciated!
Hi, @legan78, now I can test my own depth images.
One of the results like the following figure:
And I use this command to test: python main.py --config_file config/itop_config_file.json --image_sample /home/lk3696/residual_pose/depth85.npy --output_path output_dir5
My depth image size: 320x240 and I convert .png file into .npy.
May I have your suggestions to get better results? Any help is much appreciated!
Hi, Thank you for the great work.
I have depth images and I'm wondering how to convert it into .npy or .mat file? I can use some tools transform depth images to .mat files, but when I test model with these data, I got KeyError: 'depth' information.
I would be grateful if you could give me some suggestions to achieve it.
Best wishes, Yicheng