Skip to content

Commit 4723d22

Browse files
author
Your Name
committed
Refactor visualization in benchmark_calibration.py by removing redundant text labels and enhancing the VLM prompt for clarity in calibration analysis.
1 parent dca9b71 commit 4723d22

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

examples/droid/benchmark_calibration.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -473,11 +473,6 @@ def visualize_end_effector_point(
473473
else:
474474
print(f"Warning: End effector point ({px}, {py}) is outside image bounds")
475475

476-
# Add labels
477-
cv2.putText(visualization_frame, f"Ground Truth Calibration - {camera_name}", (10, 30),
478-
cv2.FONT_HERSHEY_SIMPLEX, 0.8, (0, 255, 0), 2)
479-
cv2.putText(visualization_frame, f"End Effector Position (Green)", (10, 60),
480-
cv2.FONT_HERSHEY_SIMPLEX, 0.6, (0, 255, 0), 2)
481476

482477
# Add language instruction if available
483478
if language_instruction:
@@ -502,8 +497,6 @@ def visualize_end_effector_point(
502497

503498
# Draw task instruction
504499
y_offset = 90
505-
cv2.putText(visualization_frame, "Task:", (10, y_offset),
506-
cv2.FONT_HERSHEY_SIMPLEX, 0.6, (255, 255, 255), 2)
507500

508501
for i, line in enumerate(lines[:3]): # Limit to 3 lines
509502
cv2.putText(visualization_frame, line, (10, y_offset + 25 * (i + 1)),
@@ -536,10 +529,8 @@ def analyze_calibration_with_vlm(
536529
# Create prompt for calibration analysis
537530
vlm_prompt = (
538531
"This image shows a robot's end effector position (large green circle) projected onto a camera view. "
539-
"The robot was performing the following task: '{}'. "
540532
"Please analyze if the calibration appears correct by checking if:"
541-
"\n1. The green dot is positioned where you would expect the robot's end effector to be"
542-
"\n2. The position makes sense given the task description"
533+
"\n1. The green dot is positioned where you would expect the robot's end effector at the end of the robot's arm connecting to th gripper"
543534
"\n3. The dot is not obviously misplaced (e.g., floating in air, inside objects, etc.)"
544535
"\n\nRespond with only 'CORRECT' or 'INCORRECT' followed by a brief explanation."
545536
"\n\nFormat: CORRECT/INCORRECT: Your one sentence explanation"

0 commit comments

Comments
 (0)