Skip to content

Latest commit

 

History

History
65 lines (55 loc) · 1.32 KB

README.md

File metadata and controls

65 lines (55 loc) · 1.32 KB

shape-classifier

Graph neural network for identifying 2D shapes represented as a vector shape (i.e. list of vertices).

Admittedly, it's a very stupid idea to use AI for this as shapes can probably be identified faster using mathematical principles, but this exercise in the similar vein of teaching AI to predict the next few points given x points generated using a quadratic formula etc.

Synthetic Data

  • Generate 200 shapes as graphs
  • Accompany each shape tensor with a scalar value describing the name of the shape as enum:
    • Point
    • Line
    • Triangle
    • Square
    • Rectangle
    • Trapezium
    • Rhombus
    • Parallelogram
    • Trapezoid

Tensor Definition

Node Positions

[[0,1], [1,1], [1,0] ...]

Edges

[[0,1], [1,2] ...]

Shape

[3]

Development

  1. Create a python venv
python -m venv venv
  1. Activate the venv and install dependencies
source venv/bin/activate
pip install -r requirements.txt
  1. Start Jupyter Notebook and open main.ipynb.
jupyter notebook

TODO

  • Shape synthesiser

    • Point (DONE)
    • Line (DONE)
    • Triangle (DONE)
    • Square (DONE)
    • Rectangle (KIV)
    • Trapezium (KIV)
    • Rhombus (KIV)
    • Parallelogram (KIV)
    • Trapezoid (KIV)
  • Model Design Experiments

  • Training Loop