PASCAL VOC (Visual Object Classes) is a public object-detection benchmark that ran as an annual challenge from 2005 to 2012, built on realistic photographs labelled with 20 everyday object classes. A VOC score is not evidence that a perception system meets safety pass-fail criteria. Such benchmark testing aims to rank algorithms against each other, not to test safety pass-fail criteria, and VOC’s images are consumer photographs rather than driving scenes.
Which Objects PASCAL VOC Labels
The challenge asks a model to recognise objects from a fixed set of classes in realistic scenes (objects that have not been pre-segmented), and it is a supervised learning problem: labelled training images are provided. The twenty classes fall into four groups:
- Person: person
- Animal: bird, cat, cow, dog, horse, sheep
- Vehicle: aeroplane, bicycle, boat, bus, car, motorbike, train
- Indoor: bottle, chair, dining table, potted plant, sofa, tv/monitor
VOC2007 doubled the class count from 10 to 20, and those 20 classes stayed fixed for every later edition. The challenge also ran classification, segmentation, action classification and a person-layout taster alongside detection. For an automotive reader the list is telling on its own: car, bus, bicycle, motorbike and person are there, but there are no traffic signs, traffic lights, lane markings, trucks as a class of their own, or road debris. A model trained or scored on VOC has simply never been asked about most of what visual perception in a driving stack must cover.
Reading a PASCAL VOC XML Annotation, Field by Field
PASCAL VOC stores annotations as XML, one file per image, readable by any standard XML parser; images are JPEG and segmentation ground truth is PNG. Each file is self-contained: it names the image, gives the image dimensions, and holds one object block per annotated object.
| Field | What it holds |
|---|---|
filename |
The image the annotation belongs to; the XML file shares its name with an .xml extension |
size (width, height, depth) |
Image dimensions in pixels and channel depth |
object name |
The class label, for example “car” or “bicycle” |
bndbox (xmin, ymin, xmax, ymax) |
An axis-aligned rectangle in absolute pixel coordinates: top-left corner, then bottom-right corner |
| view (pose) | “frontal”, “rear”, “left” or “right”, marked subjectively for the bulk of the object; some objects have none |
truncated |
The box does not cover the full extent of the object, for example a car running off the image edge |
difficult |
Set to 1 when the object is hard to recognise without substantial context; such objects are ignored in evaluation |
Two details matter more than they look. The truncation flag only arrived in VOC2007, so it is absent from earlier annotations. And occlusion has only a binary label in the standard annotation, so Hoiem et al. (ECCV 2012) added graded occlusion, part visibility and viewpoint labels for seven categories to study detector errors properly. If your validation argument depends on how a model behaves under partial occlusion, the stock VOC labels will not tell you.
The box is always axis-aligned. For elongated or rotated objects, the trade-off between axis-aligned and oriented boxes is covered in axis-aligned versus oriented bounding boxes.
PASCAL VOC 2007 or 2012: Which One to Train and Test On
Both editions share the same 20 classes but contribute different images. The practical difference is test annotations: VOC2007 released them, and since then the organisers have withheld them, so results on the test data have to be submitted to an evaluation server.
| VOC2007 | VOC2012 | |
|---|---|---|
| Classes | 20 | 20 |
| Images | 9,963 in total, containing 24,640 annotated objects | Trainval of 11,530 images with 27,450 annotated objects (official page) |
| Split | 50% trainval, 50% test, with class distributions roughly equal across the two | Trainval public; test scored on the server |
| Test annotations | Public | Withheld |
VOC2007 breaks down into 5,011 trainval and 4,952 test images, which adds up to the official 9,963 total (5,011 + 4,952 = 9,963). For VOC2012 trainval, the Ultralytics documentation gives 11,540 images against the official page’s 11,530. The gap is a reminder to record exactly which list file you used rather than quoting a headline count. For detection, the 2012 data is the same as 2011; no additional detection images were annotated that year.
Which to use follows from what you need. If you want a test set you can score locally and repeatedly, during pipeline debugging for example, VOC2007 test is the only edition with public test annotations. The Ultralytics VOC recipe merges VOC2007 trainval with VOC2012 trainval for training. For any number you intend to publish, the organisers’ rule applies: all tuning uses trainval only, and the tuned method runs once on the test data. The evaluation server covers VOC2008 to 2012 and has a public leaderboard that indicates whether differences between submissions are statistically significant.
VOC XML Against COCO JSON and YOLO TXT
COCO JSON, Pascal VOC XML and YOLO TXT store the same basic information (object class and location) but encode it differently and plug into different training frameworks.
| Pascal VOC | COCO | YOLO | |
|---|---|---|---|
| Container | One XML file per image | One JSON file for the whole dataset | One TXT file per image |
| Box encoding | xmin, ymin, xmax, ymax in absolute pixels |
x, y, width, height in absolute pixels |
Centre x, centre y, width, height, normalised to image size |
| Human readability | High; easy to inspect by hand | Low for large files | Low; rows of floating-point numbers |
| Masks and keypoints | Limited; not expected by major segmentation models | Recommended for masks and keypoints | Recommended for Ultralytics segmentation models |
Pascal VOC XML is not read natively by Faster R-CNN, YOLO or other production architectures, so in practice it serves as an interchange and inspection format that gets converted before training. Ultralytics, for instance, converts the original VOC XML boxes to YOLO format during download. Where QA reviewers inspect labels by hand, exporting VOC XML alongside the primary training format is a reasonable approach.
Conversion is where things go wrong quietly. A format mismatch produces no error message, just silently wrong training data: coordinates read in the wrong system, class IDs that do not line up, or a single-file structure handed to a framework expecting one file per image. Going from VOC to YOLO needs the image width and height to normalise the coordinates, and VOC carries both in every file’s size field.
How a Detector Is Scored on PASCAL VOC
A VOC detection submission outputs bounding boxes with a real-valued confidence, so a precision/recall curve can be drawn for each class. Average precision (AP), the area under that curve, is the principal measure. The scoring rules, in order:
- Match. A detection counts as correct when its overlap with a ground-truth box, measured as intersection over union (IoU), is at least 0.5; the highest-confidence match wins and all others are incorrect.
- Penalise duplicates. Several detections of one object count as one true positive and the rest as false positives: five detections of a single object score as one correct and four false.
- Skip difficult objects. Objects flagged
difficultare ignored, contributing nothing to precision, recall or AP. - Compute AP per class. VOC2007 used 11-point interpolation, averaging the maximum precision at recall 0.0, 0.1 and so on up to 1.0. From VOC2010 the method changed to use all data points rather than that sampling.
- Average. AP is computed for each of the 20 classes and averaged to give mAP.
Some guides still describe VOC mAP as 11-point only, which is true of the 2007 protocol but not of the later challenge, and the Padilla et al. pascalvoc.py reimplementation defaults to all-point interpolation. Any VOC number should state which interpolation produced it.
Why VOC AP50 and COCO AP Are Different Numbers
VOC results are traditionally reported as mAP at IoU 0.5, while COCO averages AP over ten IoU thresholds from 0.5 to 0.95. COCO describes this as a break from tradition and notes that averaging over IoUs rewards better localisation. COCO’s own metric set includes AP at IoU 0.5, labelled as the PASCAL VOC metric. A VOC AP50 figure and a COCO AP figure are therefore not comparable, even on the same detector, because a box that passes at 0.5 can fail at 0.8.
Two further limits apply to any mAP. It averages over classes, so a strong headline can hide poor performance on a rare class, which is why per-class AP should always be read. And it summarises precision and recall in a single number; Hoiem et al. analysed VOC2007 detections by error type, such as localisation error from misaligned boxes.
PASCAL VOC in Perception Validation: What It Can and Cannot Carry
The honest place for PASCAL VOC in an automotive validation effort is early and supporting. A public, frozen benchmark lets a team confirm that its data loading, box conventions, matching and AP code reproduce known behaviour before any of that machinery is pointed at proprietary driving data. The format earns its place as a human-readable QA view of labels. Neither of those is a claim about the vehicle.
Why a VOC score cannot support a safety argument:
- It ranks; it does not test. Benchmark datasets and metrics are typically used to produce a quantitative ranking among algorithms, not to check whether safety-relevant pass-fail criteria are met (Hoss et al., review of perception testing for automated driving).
- Errors are not weighted by consequence. The same review distinguishes a safety-critical ghost (a false-positive pedestrian in front of the ego vehicle that could trigger dangerous braking) from a safety-critical miss (a false negative that could lead to hitting a pedestrian). VOC mAP is a plain mean of per-class AP across the 20 classes.
- The images are not driving scenes. Hoiem et al. note that VOC2007 was collected from Flickr and is valued as a representative sample of consumer photographs. Driving datasets such as BDD100K were built for geographic, environmental and weather diversity so models are less likely to be surprised by new conditions.
- Robustness on VOC overstated robustness on street scenes. Michaelis et al. found Faster R-CNN kept roughly 60% relative performance under image corruptions on the “rather simple” VOC images, but dropped to 33% on Cityscapes street scenes with many small objects.
- Datasets carry their own bias. Torralba and Efros (CVPR 2011) examined bias across popular datasets, PASCAL 2007 among them, and lamented that virtually no effort is made to compare performance across datasets.
- Labels are a reference, not ground truth. Reference data only has to come closer to the truth than the system under test, so label quality must be accounted for or results mislead.
ISO 21448:2022 (SOTIF) addresses the absence of unreasonable risk from functional insufficiencies, and applies where situational awareness derived from complex sensors and processing algorithms is essential to safety. The review literature also notes that there is not yet a common methodology for real-world perception tests. A VOC result does not say which operating conditions were covered or how misses and ghosts were weighted. The broader point, that aggregate accuracy hides the cases that matter, is argued in why benchmark accuracy hides perception edge cases, and the tests that do address it are laid out in what a perception robustness audit checks before a release.
Quick Check: Is a VOC Number Being Asked to Carry Too Much?
- Is the number reported as AP50, with the interpolation method named, and kept apart from COCO-style AP?
- Are per-class APs shown for car, bus, bicycle, motorbike and person, not just the 20-class mean?
- Was the test set touched once, after tuning on trainval only?
- Is the result presented as a pipeline or ranking check rather than as coverage of the vehicle’s operating conditions?
- Do the safety claims rest on driving data, with misses and ghosts weighted by consequence?
If the last two answers are no, the VOC figure is being stretched past what it measures.
What a Reviewer Will Want Instead
The review literature structures perception testing for safety assurance along test criteria and metrics, test scenarios and reference data. That is the material assembled in an automotive perception validation package. The review literature also asks that a detector’s self-reported uncertainty match its true uncertainty, which it calls calibration. For the tracking side of the same stack, where the CLEAR MOT metrics MOTA and MOTP are the most common measures, see how multiple object tracking behaves in production.
TechnoLynx’s computer vision engineering work builds and deploys object detection, recognition and tracking systems.