Update README.md
Browse filesadded import to normalize
README.md
CHANGED
@@ -112,6 +112,7 @@ pillow_image = pipe(image_path) # applies mask on input and returns a pillow ima
|
|
112 |
Or load the model
|
113 |
```python
|
114 |
from transformers import AutoModelForImageSegmentation
|
|
|
115 |
model = AutoModelForImageSegmentation.from_pretrained("briaai/RMBG-1.4",trust_remote_code=True)
|
116 |
def preprocess_image(im: np.ndarray, model_input_size: list) -> torch.Tensor:
|
117 |
if len(im.shape) < 3:
|
|
|
112 |
Or load the model
|
113 |
```python
|
114 |
from transformers import AutoModelForImageSegmentation
|
115 |
+
from torchvision.transforms.functional import normalize
|
116 |
model = AutoModelForImageSegmentation.from_pretrained("briaai/RMBG-1.4",trust_remote_code=True)
|
117 |
def preprocess_image(im: np.ndarray, model_input_size: list) -> torch.Tensor:
|
118 |
if len(im.shape) < 3:
|