By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
Computer vision (CV) tasks turn raw pixels into structured information. Object detection finds where and what objects are in an image, segmentation paints each pixel with a class label (semantic) or a unique instance ID (instance), and image generation creates new pictures from learned distributions (e.g., GANs, diffusion models). In a data‑science workflow these tasks replace manual labeling, enable downstream analytics (e.g., counting defective parts on a production line), and power products such as autonomous‑driving perception stacks or AI‑augmented medical diagnostics.
python import cv2, glob, pandas as pd paths = glob.glob('data/train/*.jpg') img = cv2.imread(paths[0]) # BGR → RGB if needed plt.imshow(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))
xmin, ymin, xmax, ymax, class
python from torchvision import transforms as T aug = T.Compose([ T.RandomResizedCrop(512), T.RandomHorizontalFlip(), T.ColorJitter(brightness=0.2, contrast=0.2), T.ToTensor(), T.Normalize(mean=[0.485,0.456,0.463], std=[0.229,0.224,0.225]) ])
python model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=True) optimizer = torch.optim.SGD(model.parameters(), lr=1e-3, momentum=0.9) for epoch in range(num_epochs): train_one_epoch(model, train_loader, optimizer) evaluate(model, val_loader) # compute mAP or Dice
Q: Your detector’s mAP is high on the validation set but drops dramatically on a new camera feed. What is the most likely cause? A: Domain shift – the new images have different lighting/color distribution; you need data‑augmentation or fine‑tuning on a few samples.
Q: A U‑Net model for tumor segmentation shows a Dice of 0.92 on training but 0.55 on test. Which remedy should you try first? A: Increase regularization (e.g., add dropout or weight decay) and augment the training set to reduce over‑fitting.
Q: You need to generate 256×256 avatars conditioned on a user’s age. Which architecture fits best? A: A conditional GAN (cGAN) where the age label is concatenated to the noise vector or injected via AdaIN layers.
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.