Pascal VOC

Also known as: PASCAL Visual Object Classes

On this page 7

Pascal VOC (PASCAL Visual Object Classes) is a benchmark dataset and annual challenge for object recognition in photographs, built around 20 everyday object classes with image labels, bounding boxes and segmentation masks. As a source of training data in artificial intelligence, it shaped how computer vision models were trained, compared and reported for more than a decade.

The challenge ran from 2005 to 2012 under the PASCAL network of excellence funded by the European Union. Although larger collections such as COCO and Open Images have replaced it as the main leaderboard, its XML annotation format and its mean average precision (mAP) at 0.5 IoU remain standard tools in detection work.

How the Pascal VOC dataset is organized

Pascal VOC is organized as yearly releases, each with fixed training, validation and test splits and a matching evaluation protocol. Images were collected from the photo-sharing site Flickr and annotated by trained annotators following written annotation guidelines, which made the labels far more consistent than typical crowdsourced labeling of that period.

Two releases are used most often today. VOC2007 is the last edition whose test annotations were published, so it remains a convenient offline benchmark. VOC2012 is the largest edition, but its test set is evaluated only through an online evaluation server, which limits the number of submissions and discourages tuning on test data.

ReleaseImages with annotationsTest labels publicTypical use today
VOC2007About 9,960 (trainval and test)YesOffline detection benchmark
VOC2012About 11,500 trainvalNo, server onlySegmentation and detection training
VOC07+12About 16,500 combined trainvalTested on VOC2007Standard detection training mix
SBD augmentation10,582 segmentation imagesNot applicableExtended segmentation training set
Main Pascal VOC releases and their typical role

The released archive follows a fixed directory layout: JPEGImages holds the photographs, Annotations holds one XML file per image, ImageSets lists the image identifiers for each split and task, and SegmentationClass and SegmentationObject hold indexed PNG masks for class-level and instance-level segmentation.

The 20 classes and the annotation schema

The 20 object classes fall into four groups: person, animals, vehicles and indoor objects. The class set is small by modern standards, but it covers common scenes and includes hard cases such as small bottles, occluded chairs and visually similar animals.

GroupClassesTypical difficulty
PersonpersonWide variation in pose and occlusion
Animalsbird, cat, cow, dog, horse, sheepConfusion between similar species
Vehiclesaeroplane, bicycle, boat, bus, car, motorbike, trainThin structures and truncation
Indoor objectsbottle, chair, dining table, potted plant, sofa, tv/monitorSmall size and heavy clutter
Pascal VOC object classes by group

Each object in an XML file carries a class name, a bounding box given as xmin, ymin, xmax and ymax in 1-based pixel coordinates, a coarse pose label and two flags. The truncated flag marks objects that extend beyond the image border, and the difficult flag marks objects that are very small or heavily occluded.

The difficult flag has a precise effect on evaluation: difficult objects are ignored, so detecting them is neither rewarded nor penalized. Converters that silently drop or keep these objects therefore change the reported score, which is a frequent source of non-comparable results.

Evaluation with mean average precision

Pascal VOC evaluates detection with average precision per class, averaged over the 20 classes into mean average precision. A predicted box counts as a true positive when its intersection over union (IoU) with an unmatched ground-truth box of the same class is at least 0.5; duplicate detections of the same object count as false positives.

The way precision is summarized changed over time. VOC2007 used 11-point interpolated AP, sampling precision at recall levels from 0 to 1 in steps of 0.1. From VOC2010 onward, the protocol uses the area under the full interpolated curve, which gives slightly different and more stable numbers. Papers should state which variant they report.

Segmentation uses a different metric: mean intersection over union across the 20 classes plus background, computed from pixel-level predictions. Pixels along object boundaries are marked as void and excluded, which makes the score tolerant of small boundary errors.

Pascal VOC compared with COCO and other formats

Pascal VOC is often discussed together with COCO, its successor as the main detection benchmark, and with the YOLO text format used by many training tools. The comparison below shows why results on one benchmark do not transfer directly to another.

AspectPascal VOCCOCOYOLO format
Classes2080 for detectionDefined per project
Annotation fileOne XML file per imageOne JSON file per splitOne text file per image
Box encodingCorner pixel coordinatesTop-left corner, width and heightNormalized center, width and height
Main metricmAP at IoU 0.5mAP averaged over IoU 0.5 to 0.95No fixed metric
MasksIndexed PNG imagesPolygons or run-length encodingPolygons in extended variants
Pascal VOC compared with related detection formats

The stricter COCO metric rewards precise localization, while a VOC score of the same model is usually much higher because a box overlapping by half already counts. For this reason, a VOC mAP figure must never be compared with a COCO mAP figure.

Practical use, limitations and common mistakes

Today Pascal VOC is most useful as a compact benchmark for quick experiments, as a fine-tuning target for models pretrained on ImageNet or COCO, and as a teaching dataset. Its XML schema is also a common export format in annotation tools such as Label Studio and CVAT.

Its limitations are well known. The dataset is small and saturated, with leading detectors exceeding 85 percent mAP on VOC2007, so small improvements often fall within noise. It also reflects dataset bias toward Flickr photography of Western everyday scenes and contains some label noise, such as missed objects.

MistakeConsequenceCorrect practice
Ignoring the difficult flagScores differ from published resultsExclude difficult objects in evaluation
Mixing AP variantsInconsistent comparisonsState 11-point or all-point AP
Off-by-one coordinatesShifted boxes after conversionHandle 1-based pixel indexing
Testing on VOC2012 trainvalOverstated accuracyUse VOC2007 test or the server
Frequent mistakes when working with Pascal VOC

Explained without jargon

Pascal VOC is a shared collection of labeled photos. Each photo shows everyday things such as people, cats, cars or chairs. Experts drew a box around every object and wrote its name.

Researchers use the same photos to test their programs fairly. A program looks at each photo and guesses what is there and where. A score then shows how many guesses were right. Because everyone used the same test, scores could be compared like times in a race.

The collection is old and small today. It is still a handy starting point for learning and quick tests.

A typical use case

A small computer vision team at a logistics company wants a detector for parcels and pallets in warehouse photos. Before labeling its own images, the team checks its training code on Pascal VOC. It fine-tunes a detector pretrained on COCO using the VOC07+12 training mix and evaluates on the VOC2007 test set with all-point AP.

The first run reports an unexpectedly low mAP. The cause is a conversion script that treated coordinates as 0-based and kept difficult objects in the ground truth. After the fix, the score matches published numbers within one point. The team then labels 4,000 warehouse images in CVAT, exports them in VOC XML, and reuses the verified pipeline unchanged. The result is a trusted evaluation setup before any internal data is used.