brjathu commited on
Commit ·
3ee99ee
1
Parent(s): d418da7
Adding HF files
Browse files- hmr2/utils/utils_detectron2.py +2 -1
- requirements.txt +3 -3
hmr2/utils/utils_detectron2.py
CHANGED
|
@@ -67,7 +67,8 @@ class DefaultPredictor_Lazy:
|
|
| 67 |
self.aug = mapper.augmentations
|
| 68 |
self.input_format = mapper.image_format
|
| 69 |
|
| 70 |
-
self.
|
|
|
|
| 71 |
if test_dataset:
|
| 72 |
self.metadata = MetadataCatalog.get(test_dataset)
|
| 73 |
assert self.input_format in ["RGB", "BGR"], self.input_format
|
|
|
|
| 67 |
self.aug = mapper.augmentations
|
| 68 |
self.input_format = mapper.image_format
|
| 69 |
|
| 70 |
+
self.device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
|
| 71 |
+
self.model.eval().to(self.device)
|
| 72 |
if test_dataset:
|
| 73 |
self.metadata = MetadataCatalog.get(test_dataset)
|
| 74 |
assert self.input_format in ["RGB", "BGR"], self.input_format
|
requirements.txt
CHANGED
|
@@ -9,9 +9,9 @@
|
|
| 9 |
# timm
|
| 10 |
# OmegaConf
|
| 11 |
|
| 12 |
-
--extra-index-url https://download.pytorch.org/whl/cu116
|
| 13 |
-
torch==1.13.1+cu116
|
| 14 |
-
torchvision==0.14.1+cu116
|
| 15 |
pytorch-lightning
|
| 16 |
smplx==0.1.28
|
| 17 |
opencv-python
|
|
|
|
| 9 |
# timm
|
| 10 |
# OmegaConf
|
| 11 |
|
| 12 |
+
# --extra-index-url https://download.pytorch.org/whl/cu116
|
| 13 |
+
torch==1.13.1#+cu116
|
| 14 |
+
torchvision==0.14.1#+cu116
|
| 15 |
pytorch-lightning
|
| 16 |
smplx==0.1.28
|
| 17 |
opencv-python
|