{"id":18754217,"url":"https://github.com/joeyism/py-cifar10","last_synced_at":"2025-07-30T10:36:44.692Z","repository":{"id":43052079,"uuid":"333577112","full_name":"joeyism/py-cifar10","owner":"joeyism","description":"This library was created to allow an easy usage of CIFAR 10 DATA. This is a wrapper around the instructions givn on the CIFAR 10 site","archived":false,"fork":false,"pushed_at":"2022-03-21T20:42:08.000Z","size":20,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-20T12:53:53.549Z","etag":null,"topics":["cifar","cifar-10","cifar10","data","machine-learning","machinelearning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joeyism.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-27T22:26:03.000Z","updated_at":"2021-01-28T08:53:33.000Z","dependencies_parsed_at":"2022-09-06T08:03:54.283Z","dependency_job_id":null,"html_url":"https://github.com/joeyism/py-cifar10","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/joeyism/py-cifar10","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyism%2Fpy-cifar10","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyism%2Fpy-cifar10/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyism%2Fpy-cifar10/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyism%2Fpy-cifar10/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeyism","download_url":"https://codeload.github.com/joeyism/py-cifar10/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeyism%2Fpy-cifar10/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267852198,"owners_count":24154796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cifar","cifar-10","cifar10","data","machine-learning","machinelearning"],"created_at":"2024-11-07T17:28:19.004Z","updated_at":"2025-07-30T10:36:44.665Z","avatar_url":"https://github.com/joeyism.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CIFAR 10 Dataset Library\nThis library was created to allow an easy usage of [CIFAR 10 DATA](https://www.cs.toronto.edu/~kriz/cifar.html). This is a wrapper around the instructions given on the [CIFAR 10 Site](https://www.cs.toronto.edu/~kriz/cifar.html)\n\n## Installation\n```bash\npip3 install cifar10\n```\n\n## Sample Usage\n```python\nimport cifar10\n\n# Train data\nfor image, label in cifar10.data_batch_generator():\n    image # numpy array of an image, which is of shape 32 x 32 x 3\n    label # integer value of the image label\n\n# Test data\nfor image, label in cifar10.test_batch_generator():\n    image # numpy array of an image, which is of shape 32 x 32 x 3\n    label # integer value of the image label\n```\n\n## API\n\n### data_batch_generator\nReturns a generator of each image and label pair for data batch\n```python\ndata_batch_generator(cache_location: str=\".\") -\u003e Iterator[Tuple[np.array, int]]\n```\n#### parameters\n* `cache_location` (default: library folder location): where to cache the cifar10 data\n\n### test_batch_generator\nReturns a generator of each image and label pair for test batch\n```python\ntest_batch_generator(cache_location: str=\".\") -\u003e Iterator[Tuple[np.array, int]]\n```\n#### parameters\n* `cache_location` (default: library folder location): where to cache the cifar10 data\n\n### meta\nReturns the raw meta file\n```python\nmeta(cache_location: str=\".\") -\u003e Dict[bytes, Any]\n```\n#### parameters\n* `cache_location` (default: library folder location): where to cache the cifar10 data\n\n### image_label_map\nReturns a dictionary of label\n```\n{\n    0: 'airplane',\n    1: 'automobile',\n    ...\n}\n```\n\n```python\nimage_label_map(cache_location: str=\".\") -\u003e Dict[int, str]\n```\n#### parameters\n* `cache_location` (default: library folder location): where to cache the cifar10 data\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeyism%2Fpy-cifar10","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeyism%2Fpy-cifar10","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeyism%2Fpy-cifar10/lists"}