AI and Processing

I want to use AI in Processing , has anyone done this?
I want AI to rank a set of images for uniform appearance.
I tested this online with Claude and it worked !
Now I want o integrate it into my Processing program that acquires the images
and call the AI to give it a ranking.

I would like to do this in a offline application.
The Processing program acquires the image.
Then AI analyzes and ranks it with a number from 1-100

Thanks
Jeff Marc

Hello @jeffmarc

I have not done this but research suggests that it can be done.
What has your research revealed?

You can export Processing applications if desired.
You can offload the AI processing to an external local application.

This will launch Python on my PC and I can add a script later:

void setup() {
  try {
    String pythonPath = "C:\\Users\\GLV\\AppData\\Local\\Programs\\Python\\Python313\\python.exe";
    String[] command = {
      "cmd.exe", "/c", "start", "cmd", "/k", "\"" + pythonPath + "\""
    };
    Runtime.getRuntime().exec(command);
  } catch (Exception e) {
    e.printStackTrace();
  }
}

You can run a script (Python or otherwise) that uses your local AI to process and rank images.
Store the ranking somehow (file is one example) then read the file and use in Processing.

Or use py5 directly:

This came up in my exploration:

This has certainly generated my interest and I will explore this for my personal development. I have done similar with Processing in the past to offload the processing of information and return the results.

Have fun!

:)

1 Like