{"id":21638540,"url":"https://github.com/dbcollection/dbcollection-torch7","last_synced_at":"2026-04-15T22:35:40.064Z","repository":{"id":85482713,"uuid":"97696582","full_name":"dbcollection/dbcollection-torch7","owner":"dbcollection","description":"Lua/Torch7 wrapper for dbcollection","archived":false,"fork":false,"pushed_at":"2018-09-24T20:24:14.000Z","size":111,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-29T18:41:00.289Z","etag":null,"topics":["api","datasets","lua","torch7"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbcollection.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-07-19T09:09:41.000Z","updated_at":"2018-09-24T20:24:15.000Z","dependencies_parsed_at":"2023-03-03T11:45:41.335Z","dependency_job_id":null,"html_url":"https://github.com/dbcollection/dbcollection-torch7","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dbcollection/dbcollection-torch7","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbcollection%2Fdbcollection-torch7","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbcollection%2Fdbcollection-torch7/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbcollection%2Fdbcollection-torch7/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbcollection%2Fdbcollection-torch7/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbcollection","download_url":"https://codeload.github.com/dbcollection/dbcollection-torch7/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbcollection%2Fdbcollection-torch7/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31863495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","datasets","lua","torch7"],"created_at":"2024-11-25T04:09:58.776Z","updated_at":"2026-04-15T22:35:40.057Z","avatar_url":"https://github.com/dbcollection.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dbcollection for Torch7\n\n[![Build Status](https://travis-ci.org/dbcollection/dbcollection-torch7.svg?branch=master)](https://travis-ci.org/dbcollection/dbcollection-torch7)\n\nThis is a simple Lua wrapper for the Python's [dbcollection](https://github.com/dbcollection/dbcollection) module. The functionality is almost the same, appart from some few minor differences related to Lua, namely regarding setting up ranges when fetching data.\n\nInternally it calls the Python's dbcollection module for data download/process/management. The, Lua/Torch7 interacts solely with the metadata `hdf5` file to fetch data from disk.\n\n## Package installation\n\n### Requirements\n\nThis package requires:\n\n- Python's dbcollection package installed.\n- [Torch7](https://github.com/torch/torch7)\n- json\n- hdf5\n- argcheck\n\nTo install Torch7 just follow the steps listed [here](http://torch.ch/docs/getting-started.html#_).\n\nThe other packages should come pre-installed along with Torch7, but in case they don't, you can simply install them by doing the following:\n\n```lua\nluarocks install json\nluarocks install hdf5\nluarocks install argcheck\n```\n\n### Installation\n\nTo install the dbcollection's Lua/Torch7 API you must first have the Python's version installed in your system. If you do not have it already installed, then you can install it either via `pip`, `conda` or from [source](https://github.com/dbcollection/dbcollection#package-installation). Here we'll use `pip` to install this package:\n\n```bash\n$ pip install dbcollection==0.2.6\n```\n\nAfter you have the Python's version installed in your system, get the Lua/Torch7's API via the following repository:\n\nThen, all there is to do is to clone this repo and install the package via `luarocks`:\n\n```bash\n$ git clone https://github.com/dbcollection/dbcollection-torch7\n```\n\nThen, all there is to do is to install the package via `luarocks`\n\n```bash\n$ cd dbcollection-torch7/ \u0026\u0026 luarocks make rocks/*\n```\n\n## Usage\n\nThis package follows the same API as the Python version. Once installed, to use the package simply require *dbcollection*:\n\n```lua\n\u003e\u003e\u003e dbc = require 'dbcollection'\n```\n\nThen, just like with the Python's version, to load a dataset you simply do:\n\n```lua\n\u003e\u003e\u003e mnist = dbc.load('mnist')\n```\n\nYou can also select a specific task for any dataset by using the `task` option.\n\n```lua\n\u003e\u003e\u003e mnist = dbc.load{name='mnist', task='classification'}\n```\n\nThis API lets you download+extract most dataset's data directly from its source to the disk. For that, simply use the `download()` method:\n\n```lua\n\u003e\u003e\u003e dbc.download{name='cifar10', data_dir='home/some/dir'}\n```\n\n### Data fetching\n\nOnce a dataset has been loaded, in order to retrieve data you can either use Torch7's `HDF5` API or use the provided methods to retrive data from the .h5 metadata file.\n\nFor example, to retrieve an image and its label from the `MNIST` dataset using the Torch7's `HDF5` API you can do the following:\n\n```lua\n\u003e\u003e\u003e images_ptr = mnist.file:read('default/train/images')\n\u003e\u003e\u003e img = images_tr:partial({1,1}, {1,32}, {1,32}, {1,3})\n\n\u003e\u003e\u003e labels_ptr = mnist.file:read('default/train/labels')\n\u003e\u003e\u003e label = labels_ptr:partial({1,1})\n```\n\nor you can use the API provided by this package:\n\n```lua\n\u003e\u003e\u003e img = mnist:get('train', 'images', 1)\n\u003e\u003e\u003e label = mnist:get('train', 'labels', 1)\n```\n\n\n## Documentation\n\nFor a more detailed view of the Lua's API documentation see [here](DOCUMENTATION.md#db.documentation).\n\n\n## License\n\n[MIT license](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbcollection%2Fdbcollection-torch7","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbcollection%2Fdbcollection-torch7","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbcollection%2Fdbcollection-torch7/lists"}