{"id":21501162,"url":"https://github.com/rapidrabbit76/classification-for-everyone","last_synced_at":"2025-07-15T22:32:16.522Z","repository":{"id":42989163,"uuid":"443531410","full_name":"rapidrabbit76/Classification-For-Everyone","owner":"rapidrabbit76","description":"Classification with pytorch lightning","archived":false,"fork":false,"pushed_at":"2022-03-24T14:24:11.000Z","size":382,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-02-14T07:43:02.960Z","etag":null,"topics":["classification","computer-vision","deep-learning","pytorch","pytorch-lightning"],"latest_commit_sha":null,"homepage":"","language":"Python","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/rapidrabbit76.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-01-01T12:11:12.000Z","updated_at":"2024-02-14T07:43:02.961Z","dependencies_parsed_at":"2022-07-22T12:32:25.105Z","dependency_job_id":null,"html_url":"https://github.com/rapidrabbit76/Classification-For-Everyone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidrabbit76%2FClassification-For-Everyone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidrabbit76%2FClassification-For-Everyone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidrabbit76%2FClassification-For-Everyone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidrabbit76%2FClassification-For-Everyone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rapidrabbit76","download_url":"https://codeload.github.com/rapidrabbit76/Classification-For-Everyone/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226077516,"owners_count":17570163,"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":["classification","computer-vision","deep-learning","pytorch","pytorch-lightning"],"created_at":"2024-11-23T17:49:38.353Z","updated_at":"2024-11-23T17:49:39.044Z","avatar_url":"https://github.com/rapidrabbit76.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pytorch-lightning classification\n\nClassification with pytorch lightning(as PL)\n\n# **Requirements**\n\n- [pip freeze](./requirements.txt)\n- [conda env](./environment.yaml)\n\n# Repository Tutorial\n\n## Project Structure\n\n```bash\nRepoRootPath\n├── models      # python module for training models\n├── datamodules # python module for pl data module\n├── transforms  # python module for data preprocessing\n├── main.py     # Trainer\n├── main.sh     # Training Recipe script\n└── ...         # ETC ...\n```\n\n## Models Module Structure\n\n```bash\nmodels\n├── LitBase                 # PL module base\n│   └── lightning_model.py\n├── Model_1                 # Model 1\n│   ├── blocks.py           # Models sub blocks\n│   ├── models.py           # Pure pytorch model define\n│   └── lightning_model.py  # Loss and optimizer setting using PL\n├── Model_2\n├── Model_N\n...\n```\n\n### LitBase\n\n```python\n# models.LitBase.lightning_model.py\nclass LitBase(pl.LightningModule, metaclass=ABCMeta):\n    @abstractmethod\n    def configure_optimizers(self):\n        return super().configure_optimizers()\n    \"\"\"\n    def initialize_weights ...\n    def forward ...\n    def training_step ...\n    def validation_step ...\n    def test_step ...\n    def _validation_test_common_epoch_end ...\n    def validation_epoch_end ...\n    def test_epoch_end ...\n    \"\"\"\n```\n\n### Implemented Models\n\n```python\n# models.LeNet5.lightning_model.py\nclass LitLeNet5(LitBase):\n    def __init__(self, args):\n        super().__init__()\n        self.save_hyperparameters(args)\n        self.model = LeNet5(\n            image_channels=self.hparams.image_channels,\n            num_classes=self.hparams.num_classes,\n        )\n        self.loss = nn.CrossEntropyLoss()\n\n    def configure_optimizers(self):\n        return optim.Adam(self.parameters(), lr=self.hparams.lr)\n```\n\n# Install\n\n## Install from source code\n\n### using anaconda/miniconda\n\n```bash\n$ conda env create --file environment.yaml\n```\n\n### using pip\n\n```bash\n$ pip install -r requirements.txt\n```\n\n## Install using docker/docker-compose\n\n```bash\n$ export USERID=$(id -u)\n$ export GROUPID=$(id -g)\n$ docker-compose up -d\n```\n\n```yaml\nversion: \"3.7\"\n    trainer:\n    build: .\n    user: \"${USERID}:${GROUPID}\"\n    volumes:\n        - .:/training\n        - /{YOUR_DATA_SET_DIR_PATH}:/DATASET # !!Setting dataset path!!\n    command: tail -f /dev/null\n```\n\n# Training\n\nPlease see the [\"Recipes\"](./md/Recipes.md)\n\n# Experiment results\n\nPlease see the [\"Experiment results\"](./md/Experiment.md)\n\n# Supported model architectures\n\nPlease see the [\"Supported Model\"](./md/Supported%20Model.md)\n\n# Supported dataset\n\nPlease see the [\"Supported Dataset\"](./md/Supported%20Dataset.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapidrabbit76%2Fclassification-for-everyone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapidrabbit76%2Fclassification-for-everyone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapidrabbit76%2Fclassification-for-everyone/lists"}