Closed Disa-Kizonda closed 3 months ago
same question!!!
costs.dmb
depths.dmb
normals.dmb
These files should be generated by the Propagation
submodule executable if it successfully completes.
graphics_utils.py
cv2.imwrite(os.path.join(cdata_image_path, str(idx+1)+".jpg"), src_img)
write_cam_txt(os.path.join(cdata_camera_path, str(idx+1)+".txt"), src_K.detach().cpu().numpy(), src_w2c.detach().cpu().numpy(),
[depth_min, (depth_max-depth_min)/192.0, 192.0, depth_max])
# c++ api for depth propagation
propagation_command = r'./submodules/Propagation/Propagation ./cache 0 "1 2 3 4" ' + str(patch_size)
os.system(propagation_command)
def generate_edge_mask(propagated_depth, patch_size):
# img gradient
The code directly executes an Propagation
executable through os.system() without verifying if the utility exists or contemplating the result of this operation.
Here's my hack for compiling the Propagation submodule with MSVC 2022, along with compiled .exe and OpenCV .dll files https://github.com/nk4517/GaussianPro/tree/propagation_win32
For some reason, when I add this code to main.cpp it starts working without errors and saves .dmb files If I remove it, it gives errors again
Could you please provide your hardware and environment information? I would like to reproduce the bug and work towards resolving the issue as quickly as possible.
@kcheng1021 windows 10 1050ti cuda 11.8
opencv 4.9.0 python 3.11.1
no conda
Still errors
I believe there might be an issue with reading the file names, possibly due to different character settings on different machines. To troubleshoot this, could you please try adding the following code after line 99 in the file "/submodule/Propagation/main.cpp": ref_id = 0; src_ids_str = "1 2 3 4"; This will hardcode the values to see if training is successful. @Disa-Kizonda
Still errors
Please provide me with the error information. I will also find a windows computer to try to reproduce the bug.
Same as before PS D:\dasdsa\GaussianPro> .\submodules\Propagation\Propagation.exe ./cache 0 "1 2 3 4" 20
[ WARN:0@0.018] global loadsave.cpp:248 cv::findDecoder imread_('./cache/images/32.jpg'): can't open/read file: check file path/integrity
[ WARN:0@0.018] global loadsave.cpp:248 cv::findDecoder imread_('./cache/depths/32.png'): can't open/read file: check file path/integrity
OpenCV: terminate handler is called! The last OpenCV error is: OpenCV(4.9.0) Error: Bad argument (Matrix operand is an empty matrix.) in cv::checkOperandsExist, file C:\GHA-OCV-1_work\ci-gha-workflow\ci-gha-workflow\opencv\modules\core\src\matrix_expressions.cpp, line 24
But when i add this on line 104 std::cout << problem.ref_image_id << std::endl; it's starting to work and saves dmb files
PS D:\dasdsa\GaussianPro> .\submodules\Propagation\Propagation.exe ./cache 0 "1 2 3 4" 20 32 [ WARN:0@0.018] global loadsave.cpp:248 cv::findDecoder imread('./cache/images/32.jpg'): can't open/read file: check file path/integrity [ WARN:0@0.019] global loadsave.cpp:248 cv::findDecoder imread('./cache/depths/32.png'): can't open/read file: check file path/integrity
Yes if i run train.py training is complete
And thanks for the advice with percent_dense
You may need to debug further to identify where exactly outputs the number 32, instead of simply using cout to print it. I am also trying to reproduce this bug and provide you with a prompt response as soon as possible.
I changed ref_id >> problem.ref_image_id; to problem.ref_image_id = ref_id; in main.cpp like here https://github.com/kcheng1021/GaussianPro/issues/8#issuecomment-1976135963
now it's working
I changed ref_id >> problem.ref_image_id; to problem.ref_image_id = ref_id; in main.cpp like here #8 (comment)
now it's working
Yeah! I just found it too. This could be the differences in features between different versions of C++. Thank you very much for your sharing and debuging. So if you found the issue is solved, Please close the issue.
Thank you
@Disa-Kizonda also thanks for your help to improve the project.
Hi, I'm still having this issue, even after applying this fix. Is there any way to find out what's causing this? The docker build seems to be successful.
This is my setup (Docker image on Azure ML):
Python 3.9 Cuda 11.8 Pytorch 2.0.1 GPU: Nvidia A100
Hi, I'm still having this issue, even after applying this fix. Is there any way to find out what's causing this? The docker build seems to be successful.
This is my setup (Docker image on Azure ML):
Python 3.9 Cuda 11.8 Pytorch 2.0.1 GPU: Nvidia A100
Did you use this fix? https://github.com/kcheng1021/GaussianPro/issues/8#issuecomment-1976686681
This is what it looks like (after seeing the fix here I simply pulled in the new changes you made in one of your latest commits):
Problem problem;
problem.ref_image_id = ref_id;
@kcheng1021 This is the docker build log, does this indicate any issues?
It seems that there are many warnings and infos appearing that I didn't encounter during compilation. I suggest running it in the environment that we have tested.
Besides, make sure the compiled propagation is located in the path "submodule/Propagation/". @rwijmashell
[ WARN:0@0.026] global loadsave.cpp:248 cv::findDecoder imread('./cache/images/32.jpg'): can't open/read file: check file path/integrity [ WARN:0@0.027] global loadsave.cpp:248 cv::findDecoder imread('./cache/depths/32.png'): can't open/read file: check file path/integrity
I have only 0-4.jpg in /images and 0.png in /depths