|
Algorithm 1 Object Classification and Localization Using Processed Image Data. |
-
Require:
Zipped image dataset
-
Ensure:
Trained multi-output CNN model
-
1:
Extract images from and load as dataset D
-
2:
Parse filenames to extract object types and coordinates, storing in DataFrame
-
3:
Preprocess images in D and extract labels, resulting in feature array X, type labels , and coordinate labels
-
4:
Split X, , and into training and testing sets
-
5:
Convert to one-hot encoded labels for each object type
-
6:
Define CNN model with convolutional layers for feature extraction
-
7:
Add classification and coordinate output layers
-
8:
Compile model with loss functions for classification and coordinate regression
-
9:
Train model on training data, using testing data for validation
-
10:
Return trained model
|