0
0
Computer Visionml~20 mins

Model comparison in Computer Vision - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Model Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Comparing model performance metrics

You trained two image classification models. Model A has 85% accuracy and 0.35 loss. Model B has 82% accuracy and 0.28 loss. Which model is generally better?

AModel A because it has higher accuracy, which means it predicts more images correctly.
BModel B because it has lower loss, which means it fits the data better.
CModel A because accuracy is more important than loss in classification tasks.
DModel B because lower loss always means better model performance.
Attempts:
2 left
💡 Hint

Think about what accuracy and loss represent and which one directly shows correct predictions.

Predict Output
intermediate
2:00remaining
Output of model evaluation code

What is the printed accuracy after running this code?

Computer Vision
from sklearn.metrics import accuracy_score

y_true = [0, 1, 1, 0, 1]
y_pred = [0, 1, 0, 0, 1]
accuracy = accuracy_score(y_true, y_pred)
print(f"Accuracy: {accuracy:.2f}")
AAccuracy: 0.80
BAccuracy: 0.40
CAccuracy: 0.60
DAccuracy: 1.00
Attempts:
2 left
💡 Hint

Count how many predictions match the true labels and divide by total.

Model Choice
advanced
2:00remaining
Choosing the best model for imbalanced data

You have a dataset where 95% of images are class A and 5% are class B. You trained two models:

  • Model X: 95% accuracy, but poor recall on class B.
  • Model Y: 90% accuracy, but high recall on class B.

Which model is better for detecting class B?

AModel X, because it has higher overall accuracy.
BModel Y, because it detects class B better with higher recall.
CModel X, because recall is less important than accuracy.
DModel Y, because lower accuracy always means better recall.
Attempts:
2 left
💡 Hint

Think about which metric matters more when one class is rare.

Hyperparameter
advanced
2:00remaining
Effect of batch size on model training

You train two identical neural networks on the same data but with different batch sizes: 16 and 256. Which effect is expected when using batch size 256 compared to 16?

ATraining will be faster and always produce better accuracy.
BTraining will be slower and always produce better accuracy.
CTraining speed and accuracy will be the same regardless of batch size.
DTraining will be faster per epoch but may converge to a less accurate model.
Attempts:
2 left
💡 Hint

Think about how batch size affects speed and model updates.

🔧 Debug
expert
2:00remaining
Identifying cause of overfitting in model training

You trained a convolutional neural network on a small dataset. Training accuracy is 98%, but validation accuracy is 60%. Which is the most likely cause?

AThe model is underfitting because training accuracy is too high.
BThe dataset is too large, causing the model to learn slowly.
CThe model is too complex and memorizes training data, causing overfitting.
DThe optimizer is not updating weights, causing poor validation accuracy.
Attempts:
2 left
💡 Hint

Think about what happens when training accuracy is very high but validation is low.