{"id":15698159,"url":"https://github.com/rasbt/ord-torchhub","last_synced_at":"2025-05-09T01:10:27.142Z","repository":{"id":44245827,"uuid":"509608472","full_name":"rasbt/ord-torchhub","owner":"rasbt","description":"Ordinal Regression PyTorch Hub","archived":false,"fork":false,"pushed_at":"2022-07-13T14:52:49.000Z","size":1725,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T20:06:46.210Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rasbt.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":"2022-07-01T23:01:45.000Z","updated_at":"2023-09-08T18:35:53.000Z","dependencies_parsed_at":"2022-07-16T02:30:50.747Z","dependency_job_id":null,"html_url":"https://github.com/rasbt/ord-torchhub","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rasbt%2Ford-torchhub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rasbt%2Ford-torchhub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rasbt%2Ford-torchhub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rasbt%2Ford-torchhub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rasbt","download_url":"https://codeload.github.com/rasbt/ord-torchhub/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171265,"owners_count":21865295,"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","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":[],"created_at":"2024-10-03T19:23:43.909Z","updated_at":"2025-05-09T01:10:27.117Z","avatar_url":"https://github.com/rasbt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ordinal Regression PyTorch Hub\n\n\n\nThis is a GitHub repository containing some deep learning models for ordinal regression (with pre-trained weights) in the PyTorch Hub / Torch Hub format. Note that this repository is not going to be a comprehensive Hub for ordinal regression models but more of a way to quickly access models from a specific manuscript:\n\n- Xintong Shi, Wenzhi Cao, and Sebastian Raschka \n  *Deep Neural Networks for Rank-Consistent Ordinal Regression Based On Conditional Probabilities.* [https://arxiv.org/abs/2111.08851](https://arxiv.org/abs/2111.08851) \n\n(More models may be added later, but I don't want to make any promises 😅.)\n\n\n\n## PyTorch Hub / Torch Hub Resources\n\n- For more information on (Py)Torch Hub, see the documentation at [https://pytorch.org/docs/stable/hub.html](https://pytorch.org/docs/stable/hub.html)\n\n\n\n## Using the Models\n\n\nYou can load the model via the following syntax:\n\n```python\nimport torch\n\nmodel = torch.hub.load(\n    \"rasbt/ord-torchhub\",\n    model=\"resnet34_corn_afad\",\n    source='github',\n    pretrained=True\n)\n```\n\nNote that the pretrained versions may only perform well on images from the [AFAD](https://afad-dataset.github.io) dataset, which is the dataset that was used to train the models. For more usage examples and transfer learning instructions, please see the examples in [./examples](./examples).\n\n\n\n## Which Models Are Currently Supported\n\n- `\"resnet34_corn_afad\"` (an ordinal model trained via the [CORN](https://arxiv.org/abs/2111.08851) loss)\n- `\"resnet34_coral_afad\"` (an ordinal model trained via the [CORAL](http://arxiv.org/abs/1901.07884) loss)\n- `\"resnet34_niu_afad\"` (an ordinal model trained via [Niu et al.'s](https://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Niu_Ordinal_Regression_With_CVPR_2016_paper.pdf) loss)\n- `\"resnet34_crossentr_afad\"` (a regular classifier trained via cross entropy loss)\n\n\n\n\n## Training (Optional)\n\nIn case you want to reproduce the model training, you can find the respective instructions and files in the [`_train`](./_train) subfolder.\n\n\n\n## App\n\n\n\nTry an interactive App built with [Lightning AI](https://lightning.ai).\n\n\n\nLink: https://bit.ly/3yHA5nk\n\n(The source code for this App can be found under [./app](./app).)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frasbt%2Ford-torchhub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frasbt%2Ford-torchhub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frasbt%2Ford-torchhub/lists"}