Home Artificial Intelligence GenPiCam – Generative AI Camera I’m bored — can I get a video? The “photographic” process Generative AI Images — Learnings The hardware Summary, code & credits

GenPiCam – Generative AI Camera I’m bored — can I get a video? The “photographic” process Generative AI Images — Learnings The hardware Summary, code & credits

8
GenPiCam – Generative AI Camera
I’m bored — can I get a video?
The “photographic” process
Generative AI Images — Learnings
The hardware
Summary, code & credits

Generative AI (GenAI) is a form of Artificial Intelligence that may create a wide selection of images, video and text. To speed up the robot rebellion I chained two GenAI models together to construct a camera which describes the present scene in words, after which uses a second model to create a latest generated stylised image. Let me introduce GenPiCam — a RaspberryPi based camera that reimagines the world with GenAI.

Before and after images created by GenPiCam

The heavy processing and true smarts of this project is handled by Midjourney — an external service using machine learning-based image generators. GenPiCam makes use of two Midjourney capabilities

  • Describe which starts with an existing photo and creates a text description prompts for the image.
  • Imagine which converts natural language prompts into images

Between these two steps I allow of a level of creative input, so the GenPiCam camera has a dial to tweak the sort of the ultimate image. This essentially becomes a filter, adding an “anime”, “pop-art” or “futuristic” influence to the generated image.

Sure — here’s the two minute summary

The initial photo image is taken with a Raspberry Pi Camera Module. An external camera shutter (pushbutton connected to the Raspberry Pi GPIO pins) when pushed takes a still image and saves the photo as a jpeg image.

Taking still images of wildlife within the garden

The photo is uploaded to Midjourney which starts with an existing photo and creates a text description prompts for the image. For the curious, I’m using some very inelegant bot interactions with PyAutoGUI to regulate the mouse and keyboard (as there’s no API) — let this be an example of code you must never write.

Midjourney’s describe tool takes a picture as input, then generates text prompts. This can be a pretty clever service, reversing the standard strategy of “text to image” by doing the reverse, starting with the photo after which extracting text to explain the essence of the image. Here is Snowy, but Midjouney has a way more expressive description.

Snowy the cat — laying on bed under yellow blanket …

black cat laying on bed under yellow blanket, within the sort of berrypunk, irridescent, glimmering, unpolished, symmetrical, rounded, chinapunk — ar 4:3

The describe function actually returns 4 descriptions based on the image, but GenPiCam arbitrarily selects the primary description.

Now for the fun part. We will take that text prompt, and use it to create a brand latest image with Generative AI with a latest call to Midjouney imagine. Here’s a image generate from the previous text prompt.

Midjouney imagine generated image from text prompt

GenPiCam has a variety switch to update the prompt with stylistic instructions.

Scene selector

This can be a 12 way rotary switch connected to the Raspberry Pi GPIO pins. By reading the present “artistic selection” GenPiCam will add a prefix equivalent to “ to the text prompt. A couple of of the opposite style prompts include

  • Anime style
  • Hyper Realistic, whimsical with vibrant hat and balloons,
  • Blurry brushstrokes,
  • Futuristic, in an area station, hyper realistic

Let’s see the before and after “pop-art” images for Snowy.

Final image with before and after photos together with text prompt

The ultimate image is a created using the Pillow Python imaging library, and is comprised of

  • Initial photo taken by the Raspberry Pi camera module, resized on the left
  • Final Midjouney image — the primary of 4 images is chosen, composited to the suitable
  • Text prompt — against a colored background and icon signifying the style mode

Here’s the identical process, but adding the text

Although the image on the suitable is a creation from Generative AI, there’s still still a way of disappointment coming through Snowy’s judgmental eyes.

I had a lot fun constructing the GenPiCam camera — and this was an interesting path for exploring prompt engineering for Generative AI. The higher photos were those which had a straightforward composition — essentially images that were easy to place words to. For instance, this scene is straightforward to explain with a color and definitive objects.

A green stuffed animal and white keyboard

Nevertheless, there have been some very strange results while describing more unique scenes. I discovered the outline of a classic Australian cloths line created a peculiar image.

Australian cloths line

One in all my favourite reimagined images was the identification of my laser mouse. It seems a laser mouse has multiple meaning resulting in a striking result.

Laser mouse

The least stylish a part of GenPiCam is the hardware which I rapidly assembled. If you need to construct your individual reality distorting camera, you’ll need the next.

The inner workings of GenPiCam

It isn’t essentially the most beautiful of builds — but I’ll just excuse this as being highly functional

Boot image for GenPiCam camera

The GenPiCam has been a fun solution to explore Generative AI, transforming photos into stylised (and sometime surprising) images.

Photo of writer on the left — and a stylised version of Simon on the suitable

Credits

Code

https://github.com/saubury/GenPiCam

8 COMMENTS

  1. … [Trackback]

    […] Here you can find 8788 additional Info on that Topic: bardai.ai/artificial-intelligence/genpicam-generative-ai-cameraim-bored-can-i-get-a-videothe-photographic-processgenerative-ai-images-learningsthe-hardwaresummary-code-credits/ […]

  2. … [Trackback]

    […] Find More here on that Topic: bardai.ai/artificial-intelligence/genpicam-generative-ai-cameraim-bored-can-i-get-a-videothe-photographic-processgenerative-ai-images-learningsthe-hardwaresummary-code-credits/ […]

  3. … [Trackback]

    […] Find More to that Topic: bardai.ai/artificial-intelligence/genpicam-generative-ai-cameraim-bored-can-i-get-a-videothe-photographic-processgenerative-ai-images-learningsthe-hardwaresummary-code-credits/ […]

  4. … [Trackback]

    […] Read More to that Topic: bardai.ai/artificial-intelligence/genpicam-generative-ai-cameraim-bored-can-i-get-a-videothe-photographic-processgenerative-ai-images-learningsthe-hardwaresummary-code-credits/ […]

  5. … [Trackback]

    […] Information on that Topic: bardai.ai/artificial-intelligence/genpicam-generative-ai-cameraim-bored-can-i-get-a-videothe-photographic-processgenerative-ai-images-learningsthe-hardwaresummary-code-credits/ […]

LEAVE A REPLY

Please enter your comment!
Please enter your name here