xuefeng-cvr / BS-Net

Pytorch implementation of "[PR2021] Boundary-induced and scene-aggregated network for monocular depth prediction"
41 stars 4 forks source link

学长您好,成功运行了test.py但并未生成对应的深度图,是否是未写入呢 #6

Open Yuruoli11 opened 2 years ago

Yuruoli11 commented 2 years ago

当我尝试运行test_ibims1.py的时候,会出现如下错误: RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU 在colab上运行时,也是如此~~

YiLiM1 commented 2 years ago

当我尝试运行test_ibims1.py的时候,会出现如下错误: RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU 在colab上运行时,也是如此~~

报错看来可能是你的pytorch环境配置有问题,推荐去pytorch官网查找命令安装pytorch和其依赖包。

lmy-source commented 2 years ago

请问你这个问题解决了嘛

xings-sdnu commented 2 years ago

pred = np.squeeze(torch.sigmoid(pred)).cpu().data.numpy() filename = os.path.join(r'D:\MyworkSpace\depth\BS-Net-main\output_1', str(i) + '.png') cv2.imwrite(filename, pred) 这样就可以输出深度图了

zsflalala commented 2 years ago

pred = np.squeeze(torch.sigmoid(pred)).cpu().data.numpy() filename = os.path.join(r'D:\MyworkSpace\depth\BS-Net-main\output_1', str(i) + '.png') cv2.imwrite(filename, pred) 这样就可以输出深度图

请问一下能得到论文中预期的深度图吗?训练最好的epoch平均loss是多少?方便留个联系方式交流吗?