{"id":16649006,"url":"https://github.com/jalajthanaki/pytorch_sign_classification","last_synced_at":"2026-04-25T10:32:07.444Z","repository":{"id":81621606,"uuid":"146712528","full_name":"jalajthanaki/Pytorch_sign_classification","owner":"jalajthanaki","description":"Classification of 0 to 5 digits using PyTorch","archived":false,"fork":false,"pushed_at":"2018-08-30T07:34:21.000Z","size":75102,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-26T21:53:08.833Z","etag":null,"topics":["computer-vision","hand-sign-recognition","python3","pytorch"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jalajthanaki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2018-08-30T07:28:07.000Z","updated_at":"2020-01-23T11:54:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"15ad0c4f-1785-47d7-aa94-0ade81cd3ebe","html_url":"https://github.com/jalajthanaki/Pytorch_sign_classification","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jalajthanaki/Pytorch_sign_classification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalajthanaki%2FPytorch_sign_classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalajthanaki%2FPytorch_sign_classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalajthanaki%2FPytorch_sign_classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalajthanaki%2FPytorch_sign_classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jalajthanaki","download_url":"https://codeload.github.com/jalajthanaki/Pytorch_sign_classification/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalajthanaki%2FPytorch_sign_classification/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32259469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"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":["computer-vision","hand-sign-recognition","python3","pytorch"],"created_at":"2024-10-12T09:06:18.841Z","updated_at":"2026-04-25T10:32:07.428Z","avatar_url":"https://github.com/jalajthanaki.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hand Signs Recognition with PyTorch\n\n*Authors: Surag Nair, Olivier Moindrot and Guillaume Genthial*\n\nTake the time to read the [tutorials](https://cs230-stanford.github.io/project-starter-code.html).\n\nNote: all scripts must be run in folder `pytorch/vision`.\n\n## Requirements\n\nWe recommend using python3 and a virtual env. See instructions [here](https://cs230-stanford.github.io/project-starter-code.html).\n\n```\nvirtualenv -p python3 .env\nsource .env/bin/activate\npip install -r requirements.txt\n```\n\nWhen you're done working on the project, deactivate the virtual environment with `deactivate`.\n\n## Task\n\nGiven an image of a hand doing a sign representing 0, 1, 2, 3, 4 or 5, predict the correct label.\n\n\n## Download the SIGNS dataset\n\nFor the vision example, we will used the SIGNS dataset created for this class. The dataset is hosted on google drive, download it [here][SIGNS].\n\nThis will download the SIGNS dataset (~1.1 GB) containing photos of hands signs making numbers between 0 and 5.\nHere is the structure of the data:\n```\nSIGNS/\n    train_signs/\n        0_IMG_5864.jpg\n        ...\n    test_signs/\n        0_IMG_5942.jpg\n        ...\n```\n\nThe images are named following `{label}_IMG_{id}.jpg` where the label is in `[0, 5]`.\nThe training set contains 1,080 images and the test set contains 120 images.\n\nOnce the download is complete, move the dataset into `data/SIGNS`.\nRun the script `build_dataset.py` which will resize the images to size `(64, 64)`. The new resized dataset will be located by default in `data/64x64_SIGNS`:\n\n```bash\npython build_dataset.py --data_dir data/SIGNS --output_dir data/64x64_SIGNS\n```\n\n\n\n## Quickstart (~10 min)\n\n1. __Build the dataset of size 64x64__: make sure you complete this step before training\n```bash\npython build_dataset.py --data_dir data/SIGNS --output_dir data/64x64_SIGNS\n```\n\n2. __Your first experiment__ We created a `base_model` directory for you under the `experiments` directory. It contains a file `params.json` which sets the hyperparameters for the experiment. It looks like\n```json\n{\n    \"learning_rate\": 1e-3,\n    \"batch_size\": 32,\n    \"num_epochs\": 10,\n    ...\n}\n```\nFor every new experiment, you will need to create a new directory under `experiments` with a similar `params.json` file.\n\n3. __Train__ your experiment. Simply run\n```\npython train.py --data_dir data/64x64_SIGNS --model_dir experiments/base_model\n```\nIt will instantiate a model and train it on the training set following the hyperparameters specified in `params.json`. It will also evaluate some metrics on the validation set.\n\n4. __Your first hyperparameters search__ We created a new directory `learning_rate` in `experiments` for you. Now, run\n```\npython search_hyperparams.py --data_dir data/64x64_SIGNS --parent_dir experiments/learning_rate\n```\nIt will train and evaluate a model with different values of learning rate defined in `search_hyperparams.py` and create a new directory for each experiment under `experiments/learning_rate/`.\n\n5. __Display the results__ of the hyperparameters search in a nice format\n```\npython synthesize_results.py --parent_dir experiments/learning_rate\n```\n\n6. __Evaluation on the test set__ Once you've run many experiments and selected your best model and hyperparameters based on the performance on the validation set, you can finally evaluate the performance of your model on the test set. Run\n```\npython evaluate.py --data_dir data/64x64_SIGNS --model_dir experiments/base_model\n```\n\n\n## Guidelines for more advanced use\n\nWe recommend reading through `train.py` to get a high-level overview of the training loop steps:\n- loading the hyperparameters for the experiment (the `params.json`)\n- loading the training and validation data\n- creating the model, loss_fn and metrics\n- training the model for a given number of epochs by calling `train_and_evaluate(...)`\n\nYou can then have a look at `data_loader.py` to understand:\n- how jpg images are loaded and transformed to torch Tensors\n- how the `data_iterator` creates a batch of data and labels and pads sentences\n\nOnce you get the high-level idea, depending on your dataset, you might want to modify\n- `model/net.py` to change the neural network, loss function and metrics\n- `model/data_loader.py` to suit the data loader to your specific needs\n- `train.py` for changing the optimizer\n- `train.py` and `evaluate.py` for some changes in the model or input require changes here\n\nOnce you get something working for your dataset, feel free to edit any part of the code to suit your own needs.\n\n## Resources\n\n- [PyTorch documentation](http://pytorch.org/docs/0.3.0/)\n- [Tutorials](http://pytorch.org/tutorials/)\n- [PyTorch warm-up](https://github.com/jcjohnson/pytorch-examples)\n\n[SIGNS]: https://drive.google.com/file/d/1ufiR6hUKhXoAyiBNsySPkUwlvE_wfEHC/view?usp=sharing\n\n## Credit\n\nCredit for the majority of code here goes to [CS230 Deep Learning course of Stanford](https://github.com/cs230-stanford). I've merely created a wrapper to get people started.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjalajthanaki%2Fpytorch_sign_classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjalajthanaki%2Fpytorch_sign_classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjalajthanaki%2Fpytorch_sign_classification/lists"}