Skip to content

Commit

Permalink
add chatbot, wait to check ChatGPT
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy1621 committed Apr 12, 2023
1 parent 816ddd3 commit e56b483
Show file tree
Hide file tree
Showing 5 changed files with 1,469 additions and 8 deletions.
4 changes: 2 additions & 2 deletions automatic_label_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def save_mask_data(output_dir, caption, mask_list, box_list, label_list):
)

# initialize SAM
predictor = SamPredictor(build_sam(checkpoint=sam_checkpoint))
predictor = SamPredictor(build_sam(checkpoint=sam_checkpoint).to(device))
image = cv2.imread(image_path)
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
predictor.set_image(image)
Expand All @@ -291,7 +291,7 @@ def save_mask_data(output_dir, caption, mask_list, box_list, label_list):
masks, _, _ = predictor.predict_torch(
point_coords = None,
point_labels = None,
boxes = transformed_boxes,
boxes = transformed_boxes.to(device),
multimask_output = False,
)

Expand Down
Loading

0 comments on commit e56b483

Please sign in to comment.