The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
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 |
---|---|---|---|
748,919 | item_weight | 500.0 gram |
|
916,768 | item_volume | 1.0 cup |
|
459,516 | item_weight | 0.709 gram |
|
459,516 | item_weight | 0.709 gram |
|
731,432 | item_weight | 1400 milligram |
|
731,432 | item_weight | 1400 milligram |
|
731,432 | item_weight | 1400 milligram |
|
731,432 | item_weight | 1400 milligram |
|
731,432 | item_weight | 1400 milligram |
|
731,432 | item_weight | 1400 milligram |
|
149,159 | item_weight | 30.0 kilogram |
|
308,856 | item_weight | 10 kilogram to 15 kilogram |
|
281,678 | item_weight | 3.53 ounce |
|
281,678 | item_weight | 3.53 ounce |
|
281,678 | item_weight | 53 ounce |
|
281,678 | item_weight | 100 gram |
|
731,432 | item_weight | 200 gram |
|
731,432 | item_weight | 1 kilogram |
|
731,432 | item_weight | 200 gram |
|
731,432 | item_weight | 200 gram |
|
731,432 | item_weight | 200 gram |
|
252,585 | item_volume | 4.0 gallon |
|
299,791 | item_weight | 2.7 gram |
|
884,560 | item_weight | 112 gram |
|
179,080 | item_weight | 4.1 kilogram |
|
179,080 | voltage | 48.0 volt |
|
866,516 | item_weight | 158.0 gram |
|
866,516 | item_weight | 158.0 gram |
|
459,516 | item_weight | 5000 milligram |
|
524,635 | item_weight | 18.55 gram |
|
524,635 | item_weight | 18.55 gram |
|
524,635 | item_weight | 18.55 gram |
|
524,635 | item_weight | 18.55 gram |
|
524,635 | item_weight | 18.55 gram |
|
730,429 | item_weight | 50.0 gram |
|
881,883 | item_weight | 26.0 gram |
|
179,080 | wattage | 800.0 watt |
|
179,080 | voltage | 36.0 volt |
|
601,746 | item_weight | 330.0 pound |
|
487,566 | item_weight | 31.0 ounce |
|
794,161 | item_weight | 0.35 ounce |
|
639,090 | item_weight | 35.0 gram |
|
752,266 | wattage | 150.0 watt |
|
752,266 | wattage | 150.0 watt |
|
752,266 | wattage | 30.0 watt |
|
752,266 | wattage | 30.0 watt |
|
299,791 | item_weight | 15.5 gram |
|
237,000 | item_weight | 200.0 gram |
|
179,080 | wattage | 250.0 watt |
|
884,560 | item_volume | 10.0 ounce |
|
844,474 | item_weight | 0.8 kilogram |
|
709,627 | item_weight | 169.0 gram |
|
299,791 | item_weight | 10.0 gram |
|
523,149 | item_weight | 7.0 gram |
|
630,390 | item_weight | 750.0 gram |
|
810,266 | item_weight | 160.0 gram |
|
748,919 | item_weight | 270.0 gram |
|
993,359 | item_weight | 500 gram |
|
731,432 | item_weight | 1 kilogram |
|
731,432 | item_weight | 10 kilogram |
|
731,432 | item_weight | 1 kilogram |
|
731,432 | item_weight | 2.2 pound |
|
752,266 | wattage | 60.0 watt |
|
459,516 | item_volume | 30.0 millilitre |
|
459,516 | item_volume | 30.0 millilitre |
|
459,516 | item_volume | 30.0 millilitre |
|
459,516 | item_volume | 30.0 millilitre |
|
459,516 | item_volume | 30.0 millilitre |
|
529,606 | item_weight | 2 ounce |
|
299,791 | item_weight | 8.1 gram |
|
308,856 | item_weight | 2 kilogram |
|
308,856 | item_weight | 10 kilogram |
|
681,445 | item_weight | 500.0 kilogram |
|
365,637 | item_weight | 200.0 gram |
|
365,637 | item_weight | 200.0 gram |
|
365,637 | item_weight | 200.0 gram |
|
365,637 | item_weight | 200.0 gram |
|
365,637 | item_weight | 100.0 gram |
|
365,637 | item_weight | 200.0 gram |
|
487,566 | item_weight | 5.0 kilogram |
|
767,202 | item_weight | 60.0 pound |
|
369,753 | item_volume | 3.0 cubic foot |
|
731,432 | item_weight | 227 gram |
|
709,627 | item_weight | 100 gram |
|
639,090 | item_weight | 190.0 gram |
|
639,090 | item_weight | 100.0 gram |
|
459,516 | item_weight | 600 milligram |
|
630,869 | item_weight | 3.2 gram |
|
630,869 | item_weight | 6.5 gram |
|
881,883 | item_weight | 160.0 gram |
|
558,374 | item_weight | 42.0 gram |
|
601,746 | item_weight | 26.0 gram |
|
752,266 | wattage | 0.55 watt |
|
254,449 | item_weight | 50.0 milligram |
|
523,149 | item_weight | 10.0 kilogram |
|
416,664 | wattage | 49.0 watt |
|
459,516 | item_weight | 500 milligram |
|
459,516 | item_weight | 500 milligram |
|
241,608 | item_weight | 16.0 gram |
|
308,856 | item_weight | 8 kilogram |
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:
- index: An unique identifier (ID) for the data sample
- 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 fromsrc/utils.py
. See sample code insrc/test.ipynb
. - group_id: Category code of the product
- entity_name: Product entity name. For eg: “item_weight”
- 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:
- index: The unique identifier (ID) of the data sample. Note the index should match the test record index.
- 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
- 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
- src/utils.py: Contains helper functions for downloading images from the image_link.
- src/constants.py: Contains the allowed units for each entity type.
- 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
- dataset/train.csv: Training file with labels (
entity_value
). - 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") - dataset/sample_test.csv: Sample test input file.
- 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
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.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:
- True Positives - If OUT !=
""
and GT !=""
and OUT == GT - False Positives - If OUT !=
""
and GT !=""
and OUT != GT - False Positives - If OUT !=
""
and GT ==""
- False Negatives - If OUT ==
""
and GT !=""
- True Negatives - If OUT ==
""
and GT ==""
Then, F1 score = 2PrecisionRecall/(Precision + Recall) where:
- Precision = True Positives/(True Positives + False Positives)
- 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
No elements in this dataset have been identified as either opted-out, or opted-in, by their creator.