Spaces:
Running on Zero
Running on Zero
Download thirdparty/sam3d/sam3d_objects/pipeline/depth_models/base.py from HorizonRobotics/EmbodiedGen-Texture-Gen: direct link, hf CLI and curl.
- Browser
- Download file 307 Bytes
-
https://huggingface.co/spaces/HorizonRobotics/EmbodiedGen-Texture-Gen/resolve/main/thirdparty/sam3d/sam3d_objects/pipeline/depth_models/base.py
- Command line
-
hf download hf://spaces/HorizonRobotics/EmbodiedGen-Texture-Gen/thirdparty/sam3d/sam3d_objects/pipeline/depth_models/base.py
-
curl -L -o base.py https://huggingface.co/spaces/HorizonRobotics/EmbodiedGen-Texture-Gen/resolve/main/thirdparty/sam3d/sam3d_objects/pipeline/depth_models/base.py
307 Bytes
| # Copyright (c) Meta Platforms, Inc. and affiliates. | |
| import torch | |
| class DepthModel: | |
| def __init__(self, model, device="cuda"): | |
| self.model = model | |
| self.device = torch.device(device) | |
| self.model.to(self.device) | |
| self.model.eval() | |
| def __call__(self, image): | |
| pass |