Dataset Preview
Full Screen
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 1 new columns ({'ocr_data'})

This happened while the csv dataset builder was generating data using

hf://datasets/minemaster01/amazonml-2024/dataset/final_train.csv (at revision b284359758b3bca16b64882559d35382b228499d)

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1870, in _prepare_split_single
                  writer.write_table(table)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 622, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2292, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2240, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              image_link: string
              group_id: int64
              entity_name: string
              entity_value: string
              ocr_data: string
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 858
              to
              {'image_link': Value(dtype='string', id=None), 'group_id': Value(dtype='int64', id=None), 'entity_name': Value(dtype='string', id=None), 'entity_value': Value(dtype='string', id=None)}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1417, in compute_config_parquet_and_info_response
                  parquet_operations = convert_to_parquet(builder)
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1049, in convert_to_parquet
                  builder.download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 924, in download_and_prepare
                  self._download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1000, in _download_and_prepare
                  self._prepare_split(split_generator, **prepare_split_kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1741, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1872, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 1 new columns ({'ocr_data'})
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/minemaster01/amazonml-2024/dataset/final_train.csv (at revision b284359758b3bca16b64882559d35382b228499d)
              
              Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

image_link
string
group_id
int64
entity_name
string
entity_value
string
https://m.media-amazon.c…/61I9XdN6OFL.jpg
748,919
item_weight
500.0 gram
https://m.media-amazon.c…/71gSRbyXmoL.jpg
916,768
item_volume
1.0 cup
https://m.media-amazon.c…/61BZ4zrjZXL.jpg
459,516
item_weight
0.709 gram
https://m.media-amazon.c…/612mrlqiI4L.jpg
459,516
item_weight
0.709 gram
https://m.media-amazon.c…/617Tl40LOXL.jpg
731,432
item_weight
1400 milligram
https://m.media-amazon.c…/61QsBSE7jgL.jpg
731,432
item_weight
1400 milligram
https://m.media-amazon.c…/81xsq6vf2qL.jpg
731,432
item_weight
1400 milligram
https://m.media-amazon.c…/71DiLRHeZdL.jpg
731,432
item_weight
1400 milligram
https://m.media-amazon.c…/91Cma3RzseL.jpg
731,432
item_weight
1400 milligram
https://m.media-amazon.c…/71jBLhmTNlL.jpg
731,432
item_weight
1400 milligram
https://m.media-amazon.c…/81N73b5khVL.jpg
149,159
item_weight
30.0 kilogram
https://m.media-amazon.c…/61oMj2iXOuL.jpg
308,856
item_weight
10 kilogram to 15 kilogram
https://m.media-amazon.c…/91LPf6OjV9L.jpg
281,678
item_weight
3.53 ounce
https://m.media-amazon.c…/81fOxWWWKYL.jpg
281,678
item_weight
3.53 ounce
https://m.media-amazon.c…/81dzao1Ob4L.jpg
281,678
item_weight
53 ounce
https://m.media-amazon.c…/91-iahVGEDL.jpg
281,678
item_weight
100 gram
https://m.media-amazon.c…/81S2+GnYpTL.jpg
731,432
item_weight
200 gram
https://m.media-amazon.c…/81e2YtCOKvL.jpg
731,432
item_weight
1 kilogram
https://m.media-amazon.c…/81RNsNEM1EL.jpg
731,432
item_weight
200 gram
https://m.media-amazon.c…/91prZeizZnL.jpg
731,432
item_weight
200 gram
https://m.media-amazon.c…/31EvJszFVfL.jpg
731,432
item_weight
200 gram
https://m.media-amazon.c…/61wzlucTREL.jpg
252,585
item_volume
4.0 gallon
https://m.media-amazon.c…/61sQ+qAKr4L.jpg
299,791
item_weight
2.7 gram
https://m.media-amazon.c…/81x77l2T5NL.jpg
884,560
item_weight
112 gram
https://m.media-amazon.c…/71nywfWZUwL.jpg
179,080
item_weight
4.1 kilogram
https://m.media-amazon.c…/71nywfWZUwL.jpg
179,080
voltage
48.0 volt
https://m.media-amazon.c…/51WsuKKAVrL.jpg
866,516
item_weight
158.0 gram
https://m.media-amazon.c…/61XGDKap+JL.jpg
866,516
item_weight
158.0 gram
https://m.media-amazon.c…/715vVcWJxGL.jpg
459,516
item_weight
5000 milligram
https://m.media-amazon.c…/613v+2W4UwL.jpg
524,635
item_weight
18.55 gram
https://m.media-amazon.c…/71+fn9TWQmL.jpg
524,635
item_weight
18.55 gram
https://m.media-amazon.c…/71aKgRRQ2wL.jpg
524,635
item_weight
18.55 gram
https://m.media-amazon.c…/71rKXZJrh4L.jpg
524,635
item_weight
18.55 gram
https://m.media-amazon.c…/71D824lbRvL.jpg
524,635
item_weight
18.55 gram
https://m.media-amazon.c…/71004c9tzfL.jpg
730,429
item_weight
50.0 gram
https://m.media-amazon.c…/51bQPPtMqYL.jpg
881,883
item_weight
26.0 gram
https://m.media-amazon.c…/61o2ntPNNgL.jpg
179,080
wattage
800.0 watt
https://m.media-amazon.c…/61o2ntPNNgL.jpg
179,080
voltage
36.0 volt
https://m.media-amazon.c…/71IUuTJ8QwL.jpg
601,746
item_weight
330.0 pound
https://m.media-amazon.c…/915JHkwtcrL.jpg
487,566
item_weight
31.0 ounce
https://m.media-amazon.c…/71cjrYndwIL.jpg
794,161
item_weight
0.35 ounce
https://m.media-amazon.c…/81hnk2WXO3L.jpg
639,090
item_weight
35.0 gram
https://m.media-amazon.c…/61HXgujoxpL.jpg
752,266
wattage
150.0 watt
https://m.media-amazon.c…/613G8GOyLSL.jpg
752,266
wattage
150.0 watt
https://m.media-amazon.c…/71YyZ2iPyZL.jpg
752,266
wattage
30.0 watt
https://m.media-amazon.c…/81K3JwUCnQL.jpg
752,266
wattage
30.0 watt
https://m.media-amazon.c…/41wvffSxB4L.jpg
299,791
item_weight
15.5 gram
https://m.media-amazon.c…/91cErO-KbLL.jpg
237,000
item_weight
200.0 gram
https://m.media-amazon.c…/817vo3DcCNL.jpg
179,080
wattage
250.0 watt
https://m.media-amazon.c…/61AHQ35poHL.jpg
884,560
item_volume
10.0 ounce
https://m.media-amazon.c…/61WFh8RCQYL.jpg
844,474
item_weight
0.8 kilogram
https://m.media-amazon.c…/711SATIDrmL.jpg
709,627
item_weight
169.0 gram
https://m.media-amazon.c…/61x6RSjwQIL.jpg
299,791
item_weight
10.0 gram
https://m.media-amazon.c…/613BeFNwHcL.jpg
523,149
item_weight
7.0 gram
https://m.media-amazon.c…/61hWZdkq6WL.jpg
630,390
item_weight
750.0 gram
https://m.media-amazon.c…/71E7CU55dcL.jpg
810,266
item_weight
160.0 gram
https://m.media-amazon.c…/61c+hSNnnZL.jpg
748,919
item_weight
270.0 gram
https://m.media-amazon.c…/915w0BdW-gL.jpg
993,359
item_weight
500 gram
https://m.media-amazon.c…/61sx0ezNNLL.jpg
731,432
item_weight
1 kilogram
https://m.media-amazon.c…/71ldprwbKrL.jpg
731,432
item_weight
10 kilogram
https://m.media-amazon.c…/71E9iF-bmKL.jpg
731,432
item_weight
1 kilogram
https://m.media-amazon.c…/71sWRp1SNwL.jpg
731,432
item_weight
2.2 pound
https://m.media-amazon.c…/61Fwq4GeTmL.jpg
752,266
wattage
60.0 watt
https://m.media-amazon.c…/61-oj+N+BxL.jpg
459,516
item_volume
30.0 millilitre
https://m.media-amazon.c…/71e6kJLE+LL.jpg
459,516
item_volume
30.0 millilitre
https://m.media-amazon.c…/71SuzaRS7gL.jpg
459,516
item_volume
30.0 millilitre
https://m.media-amazon.c…/71nsfFCXF0L.jpg
459,516
item_volume
30.0 millilitre
https://m.media-amazon.c…/71hgN7yu9OL.jpg
459,516
item_volume
30.0 millilitre
https://m.media-amazon.c…/61SmT8pkLtL.jpg
529,606
item_weight
2 ounce
https://m.media-amazon.c…/71ZtDgGX+iL.jpg
299,791
item_weight
8.1 gram
https://m.media-amazon.c…/413FQB0ZMLL.jpg
308,856
item_weight
2 kilogram
https://m.media-amazon.c…/41EjbFu-+yL.jpg
308,856
item_weight
10 kilogram
https://m.media-amazon.c…/71dWDwMhWmS.jpg
681,445
item_weight
500.0 kilogram
https://m.media-amazon.c…/61d6Kj80QSL.jpg
365,637
item_weight
200.0 gram
https://m.media-amazon.c…/71bvOuz9w1L.jpg
365,637
item_weight
200.0 gram
https://m.media-amazon.c…/71l0M0tMGjL.jpg
365,637
item_weight
200.0 gram
https://m.media-amazon.c…/71Lpqdrpi4L.jpg
365,637
item_weight
200.0 gram
https://m.media-amazon.c…/71jLIbCcwOL.jpg
365,637
item_weight
100.0 gram
https://m.media-amazon.c…/718EdwGgyVL.jpg
365,637
item_weight
200.0 gram
https://m.media-amazon.c…/713twQgCHSL.jpg
487,566
item_weight
5.0 kilogram
https://m.media-amazon.c…/61I0O1qJbhS.jpg
767,202
item_weight
60.0 pound
https://m.media-amazon.c…/61eOO5IW4NL.jpg
369,753
item_volume
3.0 cubic foot
https://m.media-amazon.c…/716AQpAJjZL.jpg
731,432
item_weight
227 gram
https://m.media-amazon.c…/71FVeRd2jqL.jpg
709,627
item_weight
100 gram
https://m.media-amazon.c…/81njuNSPdjL.jpg
639,090
item_weight
190.0 gram
https://m.media-amazon.c…/51xfRlxWIXL.jpg
639,090
item_weight
100.0 gram
https://m.media-amazon.c…/71duwM3SjpL.jpg
459,516
item_weight
600 milligram
https://m.media-amazon.c…/612xIhPMHqL.jpg
630,869
item_weight
3.2 gram
https://m.media-amazon.c…/51b9JEHOriL.jpg
630,869
item_weight
6.5 gram
https://m.media-amazon.c…/81lgxfKqUUL.jpg
881,883
item_weight
160.0 gram
https://m.media-amazon.c…/814sAvV89SL.jpg
558,374
item_weight
42.0 gram
https://m.media-amazon.c…/61cMeogK8gL.jpg
601,746
item_weight
26.0 gram
https://m.media-amazon.c…/811VfR10yxL.jpg
752,266
wattage
0.55 watt
https://m.media-amazon.c…/71WLYfmMqQL.jpg
254,449
item_weight
50.0 milligram
https://m.media-amazon.c…/61Dq3LRei9L.jpg
523,149
item_weight
10.0 kilogram
https://m.media-amazon.c…/71XK5d3Oh9L.jpg
416,664
wattage
49.0 watt
https://m.media-amazon.c…/61kyBEJYDeL.jpg
459,516
item_weight
500 milligram
https://m.media-amazon.c…/71uQmsTESvL.jpg
459,516
item_weight
500 milligram
https://m.media-amazon.c…/71jG8BOi4WL.jpg
241,608
item_weight
16.0 gram
https://m.media-amazon.c…/61390hosjFL.jpg
308,856
item_weight
8 kilogram
End of preview.
YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/datasets-cards)

ML Challenge Problem Statement

Feature Extraction from Images

In this hackathon, the goal is to create a machine learning model that extracts entity values from images. This capability is crucial in fields like healthcare, e-commerce, and content moderation, where precise product information is vital. As digital marketplaces expand, many products lack detailed textual descriptions, making it essential to obtain key details directly from images. These images provide important information such as weight, volume, voltage, wattage, dimensions, and many more, which are critical for digital stores.

Data Description:

The dataset consists of the following columns:

  1. index: An unique identifier (ID) for the data sample
  2. image_link: Public URL where the product image is available for download. Example link - https://m.media-amazon.com/images/I/71XfHPR36-L.jpg To download images use download_images function from src/utils.py. See sample code in src/test.ipynb.
  3. group_id: Category code of the product
  4. entity_name: Product entity name. For eg: “item_weight”
  5. entity_value: Product entity value. For eg: “34 gram” Note: For test.csv, you will not see the column entity_value as it is the target variable.

Output Format:

The output file should be a csv with 2 columns:

  1. index: The unique identifier (ID) of the data sample. Note the index should match the test record index.
  2. prediction: A string which should have the following format: “x unit” where x is a float number in standard formatting and unit is one of the allowed units (allowed units are mentioned in the Appendix). The two values should be concatenated and have a space between them. For eg: “2 gram”, “12.5 centimetre”, “2.56 ounce” are valid. Few invalid cases: “2 gms”, “60 ounce/1.7 kilogram”, “2.2e2 kilogram” etc. Note: Make sure to output a prediction for all indices. If no value is found in the image for any test sample, return empty string, i.e, “”. If you have less/more number of output samples in the output file as compared to test.csv, your output won’t be evaluated.

File Descriptions:

source files

  1. src/sanity.py: Sanity checker to ensure that the final output file passes all formatting checks. Note: the script will not check if less/more number of predictions are present compared to the test file. See sample code in src/test.ipynb
  2. src/utils.py: Contains helper functions for downloading images from the image_link.
  3. src/constants.py: Contains the allowed units for each entity type.
  4. sample_code.py: We also provided a sample dummy code that can generate an output file in the given format. Usage of this file is optional.

Dataset files

  1. dataset/train.csv: Training file with labels (entity_value).
  2. dataset/test.csv: Test file without output labels (entity_value). Generate predictions using your model/solution on this file's data and format the output file to match sample_test_out.csv (Refer the above section "Output Format")
  3. dataset/sample_test.csv: Sample test input file.
  4. dataset/sample_test_out.csv: Sample outputs for sample_test.csv. The output for test.csv must be formatted in the exact same way. Note: The predictions in the file might not be correct

Constraints

  1. You will be provided with a sample output file and a sanity checker file. Format your output to match the sample output file exactly and pass it through the sanity checker to ensure its validity. Note: If the file does not pass through the sanity checker, it will not be evaluated. You should recieve a message like Parsing successfull for file: ...csv if the output file is correctly formatted.

  2. You are given the list of allowed units in constants.py and also in Appendix. Your outputs must be in these units. Predictions using any other units will be considered invalid during validation.

Evaluation Criteria

Submissions will be evaluated based on F1 score, which are standard measures of prediction accuracy for classification and extraction problems.

Let GT = Ground truth value for a sample and OUT be output prediction from the model for a sample. Then we classify the predictions into one of the 4 classes with the following logic:

  1. True Positives - If OUT != "" and GT != "" and OUT == GT
  2. False Positives - If OUT != "" and GT != "" and OUT != GT
  3. False Positives - If OUT != "" and GT == ""
  4. False Negatives - If OUT == "" and GT != ""
  5. True Negatives - If OUT == "" and GT == ""

Then, F1 score = 2PrecisionRecall/(Precision + Recall) where:

  1. Precision = True Positives/(True Positives + False Positives)
  2. Recall = True Positives/(True Positives + False Negatives)

Submission File

Upload a test_out.csv file in the Portal with the exact same formatting as sample_test_out.csv

Appendix

entity_unit_map = {
  "width": {
    "centimetre",
    "foot",
    "millimetre",
    "metre",
    "inch",
    "yard"
  },
  "depth": {
    "centimetre",
    "foot",
    "millimetre",
    "metre",
    "inch",
    "yard"
  },
  "height": {
    "centimetre",
    "foot",
    "millimetre",
    "metre",
    "inch",
    "yard"
  },
  "item_weight": {
    "milligram",
    "kilogram",
    "microgram",
    "gram",
    "ounce",
    "ton",
    "pound"
  },
  "maximum_weight_recommendation": {
    "milligram",
    "kilogram",
    "microgram",
    "gram",
    "ounce",
    "ton",
    "pound"
  },
  "voltage": {
    "millivolt",
    "kilovolt",
    "volt"
  },
  "wattage": {
    "kilowatt",
    "watt"
  },
  "item_volume": {
    "cubic foot",
    "microlitre",
    "cup",
    "fluid ounce",
    "centilitre",
    "imperial gallon",
    "pint",
    "decilitre",
    "litre",
    "millilitre",
    "quart",
    "cubic inch",
    "gallon"
  }
}
Downloads last month
1

Data Sourcing report

powered
by Spawning.ai

No elements in this dataset have been identified as either opted-out, or opted-in, by their creator.