Stable-X commited on
Commit
6f85465
·
verified ·
1 Parent(s): 535c9db

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -0
README.md CHANGED
@@ -23,6 +23,11 @@ input_image = Image.open("path/to/your/image.jpg")
23
  # Create predictor instance
24
  predictor = torch.hub.load("hugoycj/StableNormal", "StableNormal_turbo", trust_repo=True, yoso_version='yoso-normal-v1-5')
25
 
 
 
 
 
 
26
  # Apply the model to the image
27
  normal_image = predictor(input_image)
28
 
 
23
  # Create predictor instance
24
  predictor = torch.hub.load("hugoycj/StableNormal", "StableNormal_turbo", trust_repo=True, yoso_version='yoso-normal-v1-5')
25
 
26
+ # Generate normal map using alpha channel for masking
27
+ normal_map = predictor(rgba_image, data_type="object") # Will mask out background, if alpha channel is avalible, else use birefnet
28
+ normal_map = predictor(rgba_image, data_type="outdoor") # Will use Mask2Former to mask out sky and plants
29
+ normal_map = predictor(rgba_image, data_type="indoor") # Will not mask out
30
+
31
  # Apply the model to the image
32
  normal_image = predictor(input_image)
33