Precision in prompt + better camera
This commit is contained in:
@@ -17,7 +17,7 @@ class DishSafetyResult(BaseModel):
|
|||||||
def check_dish_safety(image_path: str) -> dict:
|
def check_dish_safety(image_path: str) -> dict:
|
||||||
prompt = (
|
prompt = (
|
||||||
"You are a strict microwave safety vision inspector.\n\n"
|
"You are a strict microwave safety vision inspector.\n\n"
|
||||||
"TASK: Inspect the dish for ANY metal or plastic utensils (spoons, forks, knives, metal handles) or aluminum foil.\n\n"
|
"TASK: Inspect the top-down photo of the dish for ANY metal or plastic utensils (spoons, forks, knives, metal handles) or aluminum foil.\n\n"
|
||||||
"CRITICAL RULES:\n"
|
"CRITICAL RULES:\n"
|
||||||
"1. Look closely at the edges and interior of the bowl for utensil handles sticking out, even if they appear dark or shadowed.\n"
|
"1. Look closely at the edges and interior of the bowl for utensil handles sticking out, even if they appear dark or shadowed.\n"
|
||||||
"2. If you see ANY spoon handle, fork, knife, or utensil body—whether shiny silver, grey, or dark metal—mark is_safe = False.\n"
|
"2. If you see ANY spoon handle, fork, knife, or utensil body—whether shiny silver, grey, or dark metal—mark is_safe = False.\n"
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ camera_config = picam2.create_still_configuration(
|
|||||||
picam2.set_controls({
|
picam2.set_controls({
|
||||||
"AeEnable": True,
|
"AeEnable": True,
|
||||||
"AwbEnable": True,
|
"AwbEnable": True,
|
||||||
"ExposureTime": 60000,
|
"ExposureTime": 100000,
|
||||||
"Brightness": 0.25,
|
"Brightness": 0.30,
|
||||||
"Contrast": 1.1
|
"Contrast": 1.1
|
||||||
})
|
})
|
||||||
picam2.configure(camera_config)
|
picam2.configure(camera_config)
|
||||||
|
|||||||
Reference in New Issue
Block a user