We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I ask vila for giving the bbox of the objects in the photo and vila do reply me the bbox. Then I used code see if it is correct.
from PIL import Image, ImageDraw # open image image_path = 'cup.jpg' image = Image.open(image_path) draw = ImageDraw.Draw(image) # bbox vila reply normalized_bbox = [0.34, 0.7, 0.46, 0.78] # denormalized image_width, image_height = image.size bbox = [ normalized_bbox[0] * image_width, normalized_bbox[1] * image_height, normalized_bbox[2] * image_width, normalized_bbox[3] * image_height ] # draw bounding box draw.rectangle(bbox, outline="red", width=3) # save figure output_path = './cup_with_bbox.jpg' image.save(output_path)
I can see the bbox with the correct size but with the wrong center point. How can I turn the normalized_bbox to the photo?
The text was updated successfully, but these errors were encountered:
@Seerkfang may know more the details.
Sorry, something went wrong.
No branches or pull requests
Hello, I ask vila for giving the bbox of the objects in the photo and vila do reply me the bbox. Then I used code see if it is correct.
I can see the bbox with the correct size but with the wrong center point. How can I turn the normalized_bbox to the photo?
The text was updated successfully, but these errors were encountered: