Spaces:
Running
on
Zero
Running
on
Zero
hugohabicht01
commited on
Commit
·
3de588c
1
Parent(s):
c45a224
make labels smaller + adjust prompt a bit
Browse files
app.py
CHANGED
@@ -21,7 +21,9 @@ TEMPERATURE = 1.0
|
|
21 |
MIN_P = 0.1
|
22 |
SYSTEM_PROMPT = """You are a helpful assistant for privacy analysis of images. Please always answer in English. Please obey the users instructions and follow the provided format."""
|
23 |
DEFAULT_PROMPT = """
|
24 |
-
|
|
|
|
|
25 |
First write down your thoughts within a <think> block.
|
26 |
Please go through all objects in the image and consider whether they are private data or not.
|
27 |
End this with a </think> block.
|
@@ -43,6 +45,7 @@ Some things to remember:
|
|
43 |
- private data have a severity greater than 0, so a human face would have severity 6
|
44 |
- go through the image step by step and report the private data, its better to be a bit too sensitive than to miss anything
|
45 |
- put the bounding boxes around the human's face and not the entire person when reporting people as personal data
|
|
|
46 |
- Think step by step, take your time.
|
47 |
|
48 |
Here is the image to analyse, start your analysis directly after:
|
|
|
21 |
MIN_P = 0.1
|
22 |
SYSTEM_PROMPT = """You are a helpful assistant for privacy analysis of images. Please always answer in English. Please obey the users instructions and follow the provided format."""
|
23 |
DEFAULT_PROMPT = """
|
24 |
+
|
25 |
+
You are an expert at pixel perfect image analysis and in privacy. Your task is to find all private data in the image and report its position, as well as explanations as to why it is private data. Private data is all data that relates to a unique person and can be used to identify them.
|
26 |
+
|
27 |
First write down your thoughts within a <think> block.
|
28 |
Please go through all objects in the image and consider whether they are private data or not.
|
29 |
End this with a </think> block.
|
|
|
45 |
- private data have a severity greater than 0, so a human face would have severity 6
|
46 |
- go through the image step by step and report the private data, its better to be a bit too sensitive than to miss anything
|
47 |
- put the bounding boxes around the human's face and not the entire person when reporting people as personal data
|
48 |
+
- if something has been blurred out, or is very blurry and therefore not recognizable, do not report it as private data
|
49 |
- Think step by step, take your time.
|
50 |
|
51 |
Here is the image to analyse, start your analysis directly after:
|
utils.py
CHANGED
@@ -361,7 +361,7 @@ def visualize_boxes_annotated(image: np.ndarray | Image.Image, boxes: list[Bound
|
|
361 |
ax.add_patch(rect)
|
362 |
|
363 |
# Add label text above the box
|
364 |
-
ax.text(x_min, y_min-5, label, color=color, fontsize=
|
365 |
bbox=dict(facecolor='white', alpha=0.7, edgecolor='none'))
|
366 |
|
367 |
# Instead of displaying, save to numpy array
|
|
|
361 |
ax.add_patch(rect)
|
362 |
|
363 |
# Add label text above the box
|
364 |
+
ax.text(x_min, y_min-5, label, color=color, fontsize=5,
|
365 |
bbox=dict(facecolor='white', alpha=0.7, edgecolor='none'))
|
366 |
|
367 |
# Instead of displaying, save to numpy array
|