Skip to content

2D Shape Classification using Graph Neural Networks

Notifications You must be signed in to change notification settings

boblyx/shape-classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

2D Shape Classification using Graph Neural Networks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published