We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad9c260 commit 1edac34Copy full SHA for 1edac34
hubconf.py
@@ -0,0 +1,18 @@
1
+dependencies = ['torch']
2
+
3
+from models.midas_est import MidasNet
4
5
+def MiDaS(pretrained=True, **kwargs):
6
+ """ # This docstring shows up in hub.help()
7
+ MiDaS model for monocular depth estimation
8
+ pretrained (bool): load pretrained weights into model
9
+ """
10
11
+ model = MidasNet()
12
13
+ if pretrained:
14
+ checkpoint = "https://drive.google.com/file/d/1nqW_Hwj86kslfsXR7EnXpEWdO2csz1cC"
15
+ state_dict = torch.hub.load_state_dict_from_url(checkpoint, progress=True)
16
+ model.load_state_dict(state_dict)
17
18
+ return model
0 commit comments