Huang-ShiRui / Semi-UIR

Official code for "Contrastive Semi-supervised Learning for Underwater Image Restoration via Reliable Bank" (2023 CVPR)
113 stars 10 forks source link

Inquire image size #1

Closed kt9292 closed 1 year ago

kt9292 commented 1 year ago

Thanks to your source code. your code operate very well. but it leak memory or shortage of memory when i process images which is 1280 x 720 size. Did you try processing over than 640 x 480?

or could you advice how to process 1280 x 720 size? My GPU is GeForce RTX 2080 SUPER Mobile / Max-Q

Huang-ShiRui commented 1 year ago

Thanks for your question! Our test code can handle images with solution 1280×720 on two NVIDIA 3090 GPUs. If you don't have such equipment, you can try to crop the original large-scale picture into several parts and process them parallelly. Looking forward to your new results.

kt9292 commented 1 year ago

Thank you for your answer. Unfortunately, I don't have enough gpu power. So, I am finding method to convert your code(based mmcv) to tensorrt(or onnx) but, i can not find how to convert... (i try to mmcv to onnx but this is not operated well) Could you advice converting your code?

really thanks

Huang-ShiRui commented 1 year ago

We have not tried to convert our pth model to ONNX as well. But I speculate that the conversion failed because of deformable convolution layer. You can try the deform-conv2d-onnx-converter in https://pypi.org/project/deform-conv2d-onnx-exporter/, or replace the deformable convolution with ordinary convolution, retrain the network and deploy again. Wish you success.