Update README.md
Browse files
README.md
CHANGED
@@ -109,12 +109,11 @@ from briarmbg import BriaRMBG
|
|
109 |
from utilities import preprocess_image, postprocess_image
|
110 |
from huggingface_hub import hf_hub_download
|
111 |
|
112 |
-
model_path = hf_hub_download("briaai/RMBG-1.4", 'model.pth')
|
113 |
im_path = f"{os.path.dirname(os.path.abspath(__file__))}/example_input.jpg"
|
114 |
|
115 |
net = BriaRMBG()
|
116 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
117 |
-
net.
|
118 |
net.to(device)
|
119 |
net.eval()
|
120 |
|
|
|
109 |
from utilities import preprocess_image, postprocess_image
|
110 |
from huggingface_hub import hf_hub_download
|
111 |
|
|
|
112 |
im_path = f"{os.path.dirname(os.path.abspath(__file__))}/example_input.jpg"
|
113 |
|
114 |
net = BriaRMBG()
|
115 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
116 |
+
net = BriaRMBG.from_pretrained("briaai/RMBG-1.4")
|
117 |
net.to(device)
|
118 |
net.eval()
|
119 |
|