0
0
Computer Visionml~20 mins

Table extraction from images in Computer Vision - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Table Extraction Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Table Structure Recognition

Which of the following best describes the main goal of table structure recognition in table extraction from images?

ADetecting the exact pixel coordinates of every cell boundary in the table image
BIdentifying the logical rows and columns and their relationships within the table
CConverting the entire table image into a single text string without structure
DRemoving all non-table elements from the image before processing
Attempts:
2 left
💡 Hint

Think about what 'structure' means in a table context.

Predict Output
intermediate
1:30remaining
Output of OCR on Table Image

Given the following OCR output from a table image, what is the value of cells[1][2]?

Computer Vision
cells = [['ID', 'Name', 'Age'], ['1', 'Alice', '30'], ['2', 'Bob', '25']]
A"Alice"
B"2"
C"30"
D"Bob"
Attempts:
2 left
💡 Hint

Remember that indexing starts at 0 and cells[row][column].

Model Choice
advanced
2:30remaining
Choosing a Model for Table Detection in Images

You want to detect tables in scanned document images before extracting their content. Which model type is most suitable for this task?

AA convolutional neural network (CNN) trained for object detection like Faster R-CNN
BA recurrent neural network (RNN) trained for language modeling
CA generative adversarial network (GAN) for image style transfer
DA clustering algorithm like K-means on pixel intensities
Attempts:
2 left
💡 Hint

Think about models designed to find objects in images.

Metrics
advanced
2:00remaining
Evaluating Table Extraction Accuracy

Which metric is most appropriate to evaluate how well a table extraction model correctly identifies the boundaries of table cells?

APerplexity
BBLEU score
CMean Squared Error (MSE)
DIntersection over Union (IoU)
Attempts:
2 left
💡 Hint

Consider metrics used for object detection and segmentation.

🔧 Debug
expert
3:00remaining
Debugging Table Extraction Code Output

Consider this Python snippet that extracts text from detected table cells using OCR. What error will it raise?

Computer Vision
import pytesseract
from PIL import Image

image = Image.open('table.png')
cells = detect_cells(image)  # returns list of bounding boxes
texts = []
for cell in cells:
    crop = image.crop(cell)
    text = pytesseract.image_to_string(crop)
    texts.append(text.strip())

print(texts[10])
AIndexError because texts may have fewer than 11 elements
BTypeError because image.crop expects coordinates as a tuple, not a list
CFileNotFoundError because 'table.png' does not exist
DAttributeError because pytesseract has no attribute 'image_to_string'
Attempts:
2 left
💡 Hint

Check the length of texts before accessing index 10.