Skip to content

Instantly share code, notes, and snippets.

@bigsnarfdude
Last active November 12, 2024 17:34
Show Gist options
  • Save bigsnarfdude/ee1435eba1f23d1dfcefeb39d063a70d to your computer and use it in GitHub Desktop.
Save bigsnarfdude/ee1435eba1f23d1dfcefeb39d063a70d to your computer and use it in GitHub Desktop.
llama3.2-vision.py
import ollama
target_images = ['1.jpg']
questions = [ 'What is in this image?',
'Is this a slide show presentation?',
'Is the person teaching? (YES/NO): ',
'Is a person drawing on the green chalk board? (YES/NO): ',
'Is a person in the scene? (YES/NO): '
]
for question_text in questions:
response = ollama.chat(
model='llama3.2-vision',
messages=[{
'role': 'user',
'content': question_text,
'images': target_images
}]
)
print(response)
@bigsnarfdude
Copy link
Author

bigsnarfdude commented Nov 12, 2024

What is happening? ./2.jpg
Added image './2.jpg'

The image appears to be a collage of nine cat faces, each with a different expression and background color. The cats are arranged in three rows of three, with each row featuring a different
color scheme. The top row features yellow, brown, and red backgrounds, while the middle row has white, pink, and green backgrounds. The bottom row has orange, purple, and black backgrounds.
Each cat face is unique, with some appearing more serious or stern, while others seem playful or curious. Overall, the image suggests that cats can have a wide range of personalities and
expressions, and that each one is special in its own way.

can you give a number to each cat from left to right and top to bottom and describe each?
Sure, here are the numbers for each cat along with their descriptions:

  1. The first cat has dark brown fur with white markings on its face and chest. It is looking directly at the camera with a neutral expression.
  2. The second cat has light brown fur with darker brown stripes running down its back. Its eyes are yellow, and it appears to be looking slightly to the left of the camera. (WRONG)
  3. The third cat has dark gray fur with white markings on its face and chest. It is looking directly at the camera with a serious expression. (WRONG)
  4. The fourth cat has light orange fur with darker orange stripes running down its back. Its eyes are yellow, and it appears to be looking slightly to the right of the camera.
  5. The fifth cat has dark brown fur with white markings on its face and chest. It is looking directly at the camera with a playful expression.
  6. The sixth cat has light gray fur with darker gray stripes running down its back. Its eyes are yellow, and it appears to be looking slightly to the left of the camera.
  7. The seventh cat has dark brown fur with white markings on its face and chest. It is looking directly at the camera with a curious expression.
  8. The eighth cat has light orange fur with darker orange stripes running down its back. Its eyes are yellow, and it appears to be looking slightly to the right of the camera.
  9. The ninth cat has dark gray fur with white markings on its face and chest. It is looking directly at the camera with a stern expression.

I hope this helps you visualize each cat in the image.

@bigsnarfdude
Copy link
Author

bigsnarfdude commented Nov 12, 2024

can you give a number to each cat from left to right and top to bottom. Tell me the color of each background of each photo?
Here are the numbers for each cat, along with their corresponding background colors:

  1. The first cat has a yellow background.
  2. The second cat has a brown background.
  3. The third cat has a red background.
  4. The fourth cat has a white background.
  5. The fifth cat has a pink background.
  6. The sixth cat has a green background.
  7. The seventh cat has an orange background.
  8. The eighth cat has a purple background.
  9. The ninth cat has a black background.

I apologize for the mistake earlier. There are no cats in this image, only a collage of nine different colored backgrounds
with a cat face superimposed over each one.

can you give a number to each cat from left to right and top to bottom. Tell me the color of each background of each photo. Resp
... ond with just the color:

  1. Yellow
  2. Brown
  3. Red
  4. White
  5. Pink
  6. Green
  7. Orange
  8. Purple
  9. Black

can you give a number to each cat from right to left and bottom to top. Tell me the color of each background of each photo. Resp
... ond with just the color:

  1. Black
  2. Purple
  3. Orange
  4. Green
  5. Pink
  6. White
  7. Red
  8. Brown
  9. Yellow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment