Python expert to Modify a Class to perform Instance based Quadtree

Job ID: 33837033

Budget: $10 – $30 USD

DELIVERABLES

Provide a working code that should be able to perform Quadtree on an image based on Instance.

Each instance's value is stored in the (x,y) pixel.

If there is more than one instance in a node, divide it further until each node has exactly one instance of pixels.

ADDITIONAL INFORMATION
I already have the code. I just need a modification of the Quadtree Class, in order to achieve an Instance-based quadtree.

A detailed problem is already posted on Stackoverflow.
https://stackoverflow.com/questions/72494895/modify-the-quadtree-algorithms-criteria-to-create-nodes-children-based-on-diff

https://drive.google.com/file/d/1R-543g7rBEj3TB8wwYH2y5zA9ubUfMMd/view?usp=sharing

this is the numpy array of the image, with each pixel having an instance value associated with it. This is from the same image that I have posted on StackOverflow.