In Blog 1, I confirmed you the right way to convey your custom-trained ML mannequin into your iOS app utilizing CoreML.
Now let’s rewind a bit…
What in the event you don’t have a educated mannequin but?
What if you wish to practice your personal — from scratch — utilizing simply eye photographs?
On this publish, I’ll stroll you thru precisely how I educated my eye pupil measurement prediction mannequin utilizing Python, TensorFlow, and Keras.
And sure, it’s a lot less complicated than you assume 😉
We’re making a {custom} ML mannequin that:
✅ Takes an eye picture (64×32 pixels)
✅ Predicts pupil measurement (only a quantity!)
✅ Works offline in your iOS app utilizing CoreML 🎉
Let’s begin by establishing a clear Python setting:
# Step 1: Create a digital setting
python3.10 -m venv eye_env310
# Step 2: Activate it
supply eye_env310/bin/activate
# Step 3: Set up required packages
pip set up tensorflow opencv-python pandas scikit-learn matplotlib