Google Professional Machine Learning Engineer Question 70
Select 3Google Cloud PlatformYou are tasked with building a custom machine learning model to classify images of damaged vehicles into categories based on the type of damage (e.g., dent, scratch, shattered glass). The dataset contains images of vehicles along with metadata such as vehicle make, model, and year. You want to train the model using this data while optimizing its performance. Which steps should you take to prepare the data for training?
- A
Resize and normalize the images to a consistent size and scale.
- B
Encode the metadata (e.g., vehicle make, model, and year) as numerical features using one-hot encoding or embeddings.
- C
Randomly crop the images to focus on smaller regions of interest.
- D
Augment the image dataset with transformations such as rotation, flipping, and brightness adjustments.
- E
Remove all metadata from the dataset as it is not relevant to image classification.
Show answer and explanation
Correct answers: A, B, D
Explanation
To train a high-performing image classification model, it is essential to preprocess the images by resizing and normalizing them. Metadata should also be encoded numerically if it provides additional context that could improve model performance. Data augmentation techniques can further enhance model generalization by increasing the diversity of the training dataset. However, randomly cropping images or entirely removing metadata may harm the model's ability to learn relevant features.
- A. Correct.
Correct. Resizing and normalizing images ensure that the input data has a consistent format and scale, which is crucial for training image classification models.
- B. Correct.
Correct. Metadata, such as vehicle make and model, can provide additional context that might improve the classification model. Encoding these features numerically allows them to be integrated into the model.
- C. Incorrect.
Incorrect. Randomly cropping images might result in losing critical parts of the vehicle damage, potentially degrading the classification performance.
- D. Correct.
Correct. Data augmentation helps increase dataset diversity and improve model generalization by simulating variations in the data.
- E. Incorrect.
Incorrect. Metadata can be valuable for improving the model's accuracy by providing additional features that complement the image data.