Published July 25, 2026
| Version v1
Dataset
Open
Card arithmetic dataset
Contributors
Data collector:
Description
This dataset contains images of playing cards and arithmetic tasks that compute downstream labels based on card suit and rank values. It has been first developed for the paper 'Accelerating NeurASP with Vectorization and Caching'.
The images folder consists of 174x274 pixel images of playing cards with various rotations and different lighting. It also includes a 'playing_card_labels' CSV file containing image IDs and their rank-suit labels. Each label is a concatenation of the card's rank (2-10, j for Jack, q for Queen, k for King and a for Ace) and suit (d for Diamonds, c for Clubs, s for Spades and h for Hearts). There are 27,300 images in the train set and 11,700 images in the test set.
The tasks folder includes tasks written in answer set programming (.lp files) that assign each card a value and calculate a result using arithmetic operations. There are two types of tasks, card sum and card prodsum, each with 2, 3, or 4-card variations.
- Card sum: The value of each card is the sum of its suit and rank value. The downstream label is the sum of all card values. Ranks have values 2-14 for ranks 2 to Ace. Suits have values 0, 13, 26 and 39 for Diamonds, Clubs, Spades and Hearts respectively.
- Card prodsum: The value of each card is the product of its suit and rank value. The downstream label is the sum of all card values. Ranks have values 2-14 for ranks 2 to Ace. Suits have values 1, 2, 3 and 4 for Diamonds, Clubs, Spades and Hearts respectively.
In addition to the task files, the folder includes CSV files consisting of image indexes and their corresponding label for the task, called 'result'. The train, validation and test CSVs include 10,000, 1,000 and 1,000 entries each.
Files
images.zip
Files
(651.3 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:e93e995c743df88b1c6362981e752c74
|
650.5 MB | Preview Download |
|
md5:133634f1668885c00b123daed7f52a7c
|
781.6 kB | Preview Download |
Additional details
Related works
- Is described by
- Journal article: 10.1017/S1471068426100611 (DOI)
Dates
- Available
-
2026-07-08
Contact information
-
apr20@ic.ac.uk