Model Pipeline - Cropping images
This pipeline shows how images are cropped to focus on important parts before being used in a machine learning model. Cropping helps the model learn better by removing unnecessary background.
Jump into concepts and practice - no test required
This pipeline shows how images are cropped to focus on important parts before being used in a machine learning model. Cropping helps the model learn better by removing unnecessary background.
Loss
1.2 |****
1.0 |***
0.8 |**
0.6 |*
0.4 |*
+-----
1 5 Epochs| Epoch | Loss ↓ | Accuracy ↑ | Observation |
|---|---|---|---|
| 1 | 1.2 | 0.45 | Model starts learning with moderate loss and low accuracy |
| 2 | 0.9 | 0.60 | Loss decreases and accuracy improves as model learns features |
| 3 | 0.7 | 0.72 | Model continues to improve with better focus on cropped images |
| 4 | 0.5 | 0.80 | Loss drops further and accuracy reaches a good level |
| 5 | 0.4 | 0.85 | Training converges with low loss and high accuracy |
img to rows 10 to 50 and columns 20 to 70 in Python?import numpy as np img = np.arange(100).reshape(10,10) cropped = img[2:5, 3:7] print(cropped)
cropped = img[50:100, 30:60] but get an IndexError. What is the likely cause?