OriLib commited on
Commit
8c8d48a
1 Parent(s): ce305f6

Update README.md

Browse files

added import to normalize

Files changed (1) hide show
  1. README.md +1 -0
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: