Spaces:
Running
on
Zero
Running
on
Zero
hugohabicht01
commited on
Commit
·
3edebe6
1
Parent(s):
ff46b3e
disable sam for now
Browse files- blurnonymize.py +2 -0
blurnonymize.py
CHANGED
@@ -152,6 +152,7 @@ class ImageBlurnonymizer:
|
|
152 |
self.init_sam()
|
153 |
|
154 |
def init_sam(self, force=False):
|
|
|
155 |
# only initialize SAM if it hasn't been initialized yet
|
156 |
if self.predictor is not None and not force:
|
157 |
return
|
@@ -335,6 +336,7 @@ class ImageBlurnonymizer:
|
|
335 |
Censors an image by blurring regions defined by a list of BoundingBox objects.
|
336 |
"""
|
337 |
self.init_sam()
|
|
|
338 |
masks = []
|
339 |
for box in boxes:
|
340 |
bbox_tuple = box.to_tuple() # Convert BoundingBox object to tuple
|
|
|
152 |
self.init_sam()
|
153 |
|
154 |
def init_sam(self, force=False):
|
155 |
+
return
|
156 |
# only initialize SAM if it hasn't been initialized yet
|
157 |
if self.predictor is not None and not force:
|
158 |
return
|
|
|
336 |
Censors an image by blurring regions defined by a list of BoundingBox objects.
|
337 |
"""
|
338 |
self.init_sam()
|
339 |
+
method = "bbox"
|
340 |
masks = []
|
341 |
for box in boxes:
|
342 |
bbox_tuple = box.to_tuple() # Convert BoundingBox object to tuple
|