Using Image Classification to detect image attributes rather than content?

Beginner at using CreateML, so please forgive me if this question isn't asked correctly. As i understand it, the image classification projects are meant to detect certain objects in an image (giraffe vs elephant). My question is is there a way to use image classification to "score" or bin images that share qualities with my training dataset?

As an example; let's say I want to find a perfect square inside another square (like a white border around an image). What are the things that could make a "non-perfect" image? maybe one of the corners of the square is rounded, maybe a corner is not 90 degrees, maybe the inner square is not perfectly centered within the white frame / border.

Now let's say I want to take a picture of this object and have my app tell me how close this image is to a perfect square inside a square and rate them 1-5

My thought was to setup my training data to have a set of images that show perfect squares in a "rated 5" folder, a set of slightly imperfect squares in a "rated 4" folder, and a set of even less perfect squares in a "rated 3" folder, etc.

Long winded question, i apologize; will the CreateML image classifier be able to look at my image for those qualities that make them 3,4,5, or will it only look at the content of the square itself and detect: Giraffe, race car, boat, person? I'm looking agin for the metric of "perfectness" regardless of what the content is within the inner square. Am I on the right train of thought, or is there a better approach to take?

I would not do it this way, but just create a set of perfect square and train the model to recognise perfect square.

Then test with "unperfect squares" and you should get the score directly.

Otherwise, how would you create your different categories (from nearly perfect to totally not ? And the training will just confuse the classifier.

Different categories that could make sense are shapes: Perfect Square, perfect Circle, Perfect Triangle, Perfect Pentagon…

Thanks Claude,

As an example, a perfect image would be a square perfectly centered inside another square with 4 corners that are not rounded and are 90 degrees that would be a "5". A square with 1 rounded corner but the internal square perfectly centered would be a "4" and a square with 2 rounded corners would be a "3".

Let's assume I already have a rating criteria and a training set that already divides images into the categories of 5,4,3,2,1 based on some objective criteria (whatever that may be doesnt really matter for this discussion). What i want to know is: Can (or should) I use CreateML to PREDICT what my picture will rate irregardless of the content compared to other pictures of squares that have already been classified as 5,4,3,2,1. I just want to know if the qualities of the "unseen to the model" image can be analyzed to predict if they're most like one of the known 5,4,3,2,1 images and then assign a likeliness that my new image is a 4 vs a 3, etc.

Using Image Classification to detect image attributes rather than content?
 
 
Q