Scope ultralytics/CLIP imports (#9449)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
7df821e6ea
commit
cd172e9d12
2 changed files with 20 additions and 20 deletions
|
|
@ -9,7 +9,7 @@ import numpy as np
|
|||
import torch
|
||||
from PIL import Image
|
||||
|
||||
from ultralytics.utils import TQDM
|
||||
from ultralytics.utils import TQDM, checks
|
||||
|
||||
|
||||
class FastSAMPrompt:
|
||||
|
|
@ -33,9 +33,7 @@ class FastSAMPrompt:
|
|||
try:
|
||||
import clip
|
||||
except ImportError:
|
||||
from ultralytics.utils.checks import check_requirements
|
||||
|
||||
check_requirements("git+https://github.com/ultralytics/CLIP.git")
|
||||
checks.check_requirements("git+https://github.com/ultralytics/CLIP.git")
|
||||
import clip
|
||||
self.clip = clip
|
||||
|
||||
|
|
@ -115,7 +113,8 @@ class FastSAMPrompt:
|
|||
points (list, optional): Points to be plotted. Defaults to None.
|
||||
point_label (list, optional): Labels for the points. Defaults to None.
|
||||
mask_random_color (bool, optional): Whether to use random color for masks. Defaults to True.
|
||||
better_quality (bool, optional): Whether to apply morphological transformations for better mask quality. Defaults to True.
|
||||
better_quality (bool, optional): Whether to apply morphological transformations for better mask quality.
|
||||
Defaults to True.
|
||||
retina (bool, optional): Whether to use retina mask. Defaults to False.
|
||||
with_contours (bool, optional): Whether to plot contours. Defaults to True.
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue