Input image and output json

Hello, I’m pretty new to fine tuning and I’m a bit lost with all these docs.
Just wanted to ask before I spend a lot of time searching.
Would it be possible to fine-tune gemini to take an image as an input and then send back a json structure? Where should I be looking at?

Asking this because I can’t send a big json of 1500 lines or 4000 thousand lines. If above is not possible, what would be the way to go here to send a big json?

1 Like

Welcome to the forum. The quick start for using media for prompting is here:

The GenerationConfig object has an optional member response_mime_type, which when set to the string value "application/json" instructs the gemini 1.5 models to generate JSON.
I have to admit I am not entirely clear on the message flows you are trying to accomplish, perhaps if you explain it in more detail you will get more focused advice.

Hey since yesterday I was able to find what I wanted. It seems you can send the image in the GenerativeModel object from Kotlin library

val inputContent = content() {
    image(someImage)
}

coroutineScope.launch {
    val response = generativeModel.generateContent(inputContent)
    Log.d("Response", "${response.text}")
}

It’s been solved. Also it seems you can create a structured prompt to later fine tune a model and use it. Thank you Orangia.