stevewongv / InstanceShadowDetection

Instance Shadow Detection (CVPR 2020)
Apache License 2.0
161 stars 24 forks source link

Upgrade to Pytorch 1.8 #14

Closed legnaib closed 3 years ago

legnaib commented 3 years ago

Is there a version available which works with an updated version of pytorch or with a current version of detectron2? Any help is appreciated!

Currently I get the following error while installing the package:

In file included from /home/appuser/ISD/detectron2/layers/csrc/vision.cpp:2:0: /home/appuser/ISD/detectron2/layers/csrc/ROIAlign/ROIAlign.h: In function 'at::Tensor ROIAlign_forward(const at::Tensor&, const at::Tensor&, float, int, int, int, bool)': /home/appuser/ISD/detectron2/layers/csrc/ROIAlign/ROIAlign.h:60:18: warning: 'at::DeprecatedTypeProperties& at::Tensor::type() const' is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations] if (input.type().is_cuda()) { ^

stevewongv commented 3 years ago

I will try to upgrade this work to support new version detectron2 and Pytorch 1.8 before Sept. And you may try our new work: https://github.com/stevewongv/SSIS

legnaib commented 3 years ago

Thanks for your fast reply! I will definitely have a look into your new work, that sounds really impressive and promising!

legnaib commented 3 years ago

I tested out the other repo (SSIS) and everything worked smoothly, you really saved my day! By the way, you are not providing any LICENSE-file, it would be nice if you can add that. Probably you're using the same license as detectron2 - namely Apache, right?

stevewongv commented 3 years ago

Thank you for reminding me about this! Yes, it uses the same license as Detectron2. I will add it now!

RostyslavBryiovskyi commented 2 years ago

I will try to upgrade this work to support new version detectron2 and Pytorch 1.8 before Sept. And you may try our new work: https://github.com/stevewongv/SSIS

Any update about this ?) torch 1.3.0, 1.4.0., 1.5.0 have problems with allocating tensors on gpu

stevewongv commented 2 years ago

Cloud you send me the error message?

RostyslavBryiovskyi commented 2 years ago

@stevewongv There is no any error. It just stuck on this line pixel_mean = torch.Tensor(cfg.MODEL.PIXEL_MEAN).to(self.device).view(num_channels,1,1) FILE: InstanceShadowDetection/venv/lib/python3.6/site-packages/detectron2-0.1-py3.6-linux-x86_64.egg/detectron2/modeling/meta_arch/rcnn.py

stevewongv commented 2 years ago

I will try this on the latest version of the PyTorch tomorrow. ( it's late night) Thanks for your report!

RostyslavBryiovskyi commented 2 years ago

I can allocate tensor on GPU with torch 1.10.2+cu11.3. But with this version I encountered some problems during build P.S.: thanks for your quick replies!

RostyslavBryiovskyi commented 2 years ago

Hi, @stevewongv

Do you have any updates ?

stevewongv commented 2 years ago

I have updated the repo to support latest version of PyTorch. But I need to retrain it to check whether the performance will be affected by the changes. Stay tuned! Also, I'm working on rebuttal for some conference. So maybe I will update the results after the rebuttal period. Thanks for your report! You can try the demo, or wait me for a few days.

RostyslavBryiovskyi commented 2 years ago

@stevewongv ,Thank you! I have tested demo, and it works perfect!

stevewongv commented 2 years ago

Thanks for your report and patience!