ariG23498 HF Staff commited on
Commit
e5b144e
·
verified ·
1 Parent(s): cddd320

Upload facebook_sam-3d-objects_1.txt with huggingface_hub

Browse files
Files changed (1) hide show
  1. facebook_sam-3d-objects_1.txt +18 -0
facebook_sam-3d-objects_1.txt ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```CODE:
2
+ from inference import Inference, load_image, load_single_mask
3
+ from huggingface_hub import hf_hub_download
4
+
5
+ path = hf_hub_download("facebook/sam-3d-objects", "pipeline.yaml")
6
+ inference = Inference(path, compile=False)
7
+
8
+ image = load_image("path_to_image.png")
9
+ mask = load_single_mask("path_to_mask.png", index=14)
10
+
11
+ output = inference(image, mask)
12
+ ```
13
+
14
+ ERROR:
15
+ Traceback (most recent call last):
16
+ File "/tmp/facebook_sam-3d-objects_1NbJ881.py", line 23, in <module>
17
+ from inference import Inference, load_image, load_single_mask
18
+ ModuleNotFoundError: No module named 'inference'