Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ import urllib.request
|
|
| 10 |
from PIL import Image, ImageDraw
|
| 11 |
import matplotlib.pyplot as plt
|
| 12 |
|
| 13 |
-
from Garage.models.GroundedSegmentAnything.segment_anything.segment_anything import SamPredictor, build_sam
|
| 14 |
from Garage.models.GroundedSegmentAnything.GroundingDINO.groundingdino.util.inference import Model
|
| 15 |
from Garage import Augmenter
|
| 16 |
|
|
@@ -23,7 +23,7 @@ MODEL_DICT = dict(
|
|
| 23 |
|
| 24 |
GROUNDING_DINO_CONFIG_PATH = "Garage/models/GroundedSegmentAnything/GroundingDINO_SwinT_OGC.py"
|
| 25 |
GROUNDING_DINO_CHECKPOINT_PATH = "https://github.com/IDEA-Research/GroundingDINO/releases/download/v0.1.0-alpha/groundingdino_swint_ogc.pth"
|
| 26 |
-
SAM_CHECKPOINT_PATH = "
|
| 27 |
SAM_ENCODER_VERSION = "vit_h"
|
| 28 |
|
| 29 |
class GradioWindow():
|
|
|
|
| 10 |
from PIL import Image, ImageDraw
|
| 11 |
import matplotlib.pyplot as plt
|
| 12 |
|
| 13 |
+
from Garage.models.GroundedSegmentAnything.segment_anything.segment_anything import SamPredictor, build_sam, sam_model_registry
|
| 14 |
from Garage.models.GroundedSegmentAnything.GroundingDINO.groundingdino.util.inference import Model
|
| 15 |
from Garage import Augmenter
|
| 16 |
|
|
|
|
| 23 |
|
| 24 |
GROUNDING_DINO_CONFIG_PATH = "Garage/models/GroundedSegmentAnything/GroundingDINO_SwinT_OGC.py"
|
| 25 |
GROUNDING_DINO_CHECKPOINT_PATH = "https://github.com/IDEA-Research/GroundingDINO/releases/download/v0.1.0-alpha/groundingdino_swint_ogc.pth"
|
| 26 |
+
SAM_CHECKPOINT_PATH = "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth"
|
| 27 |
SAM_ENCODER_VERSION = "vit_h"
|
| 28 |
|
| 29 |
class GradioWindow():
|