A. The output image will have all detected faces blurred to protect privacy
B. The output image will be unchanged because GaussianBlur is not applied correctly
C. The code will raise an error because detectMultiScale requires a grayscale image
D. The code will blur the entire image instead of just faces
Solution
Step 1: Trace the code execution
cv2.imread loads a color image. However, detectMultiScale requires a grayscale image input, so passing a color image will cause an error or incorrect detection.
Step 2: Correct usage
The image should be converted to grayscale before calling detectMultiScale, e.g., gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY).
Final Answer:
The code will raise an error because detectMultiScale requires a grayscale image -> Option C
Quick Check:
detectMultiScale requires grayscale input [OK]
Hint: detectMultiScale needs grayscale image [OK]
Common Mistakes:
Thinking detectMultiScale works directly on color images
Assuming no error on color input
Believing blur applies to whole image
4. You have a dataset of images with faces but forgot to get consent from people. Which fix below best respects privacy and legal rules?
medium
A. Blur all faces in the dataset before using it for training
B. Use the images as is because they are publicly available
C. Remove all images with faces and keep only background images
D. Add random noise to images without blurring faces
Solution
Step 1: Identify privacy and legal requirements
Consent is needed; without it, faces must be anonymized.
Step 2: Evaluate options for compliance
Blurring faces anonymizes identities; using images as is or adding noise does not protect privacy properly.
Final Answer:
Blur all faces in the dataset before using it for training -> Option A
Quick Check:
No consent = anonymize faces by blurring [OK]
Hint: No consent? Blur faces to protect privacy [OK]
Common Mistakes:
Assuming public availability means consent
Thinking noise addition protects identity
Removing images may lose valuable data unnecessarily
5. You want to build a face recognition system but must comply with privacy laws. Which combined approach best balances functionality and privacy?
hard
A. Train on unblurred public images and delete them after training
B. Collect images only with explicit consent and blur faces in public datasets
C. Use any available images without consent but encrypt the dataset
D. Avoid face recognition and use only object detection instead
Solution
Step 1: Understand privacy law requirements
Explicit consent is required to use personal images legally.
Step 2: Combine consent and anonymization
Blurring faces in public datasets protects privacy while allowing training.
Step 3: Evaluate other options
Using images without consent or deleting after training does not ensure compliance; avoiding face recognition limits functionality.
Final Answer:
Collect images only with explicit consent and blur faces in public datasets -> Option B
Quick Check:
Consent + blur = privacy compliance and functionality [OK]
Hint: Consent plus blurring balances privacy and use [OK]
Common Mistakes:
Thinking encryption replaces consent
Assuming deleting data after training is enough
Avoiding face recognition is not always necessary
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.