{"id":21445625,"url":"https://github.com/bharathwajmanoharan/sign_language_recognition","last_synced_at":"2025-03-17T01:22:54.811Z","repository":{"id":156631444,"uuid":"609521695","full_name":"BharathwajManoharan/Sign_Language_Recognition","owner":"BharathwajManoharan","description":"This is one of those projects i worked hard to understand and replicate with the dataset I had. Also, this is my first project repo!!!!. It is kind of a late submission (completed 2 weeks ago) .","archived":false,"fork":false,"pushed_at":"2023-05-02T07:38:05.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T11:19:11.394Z","etag":null,"topics":["asl-recognizer","deeplearning","first-project"],"latest_commit_sha":null,"homepage":"","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/BharathwajManoharan.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":"2023-03-04T12:38:29.000Z","updated_at":"2023-03-07T20:24:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"6f302f21-2276-4217-bfe4-f705d08e48b2","html_url":"https://github.com/BharathwajManoharan/Sign_Language_Recognition","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/BharathwajManoharan%2FSign_Language_Recognition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BharathwajManoharan%2FSign_Language_Recognition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BharathwajManoharan%2FSign_Language_Recognition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BharathwajManoharan%2FSign_Language_Recognition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BharathwajManoharan","download_url":"https://codeload.github.com/BharathwajManoharan/Sign_Language_Recognition/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243955728,"owners_count":20374374,"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":["asl-recognizer","deeplearning","first-project"],"created_at":"2024-11-23T02:36:29.006Z","updated_at":"2025-03-17T01:22:54.793Z","avatar_url":"https://github.com/BharathwajManoharan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Sign-Language-Recognition-Project\n\u003e A sign language interpreter using live video feed from the camera. \n\n## Technologies and Tools\n* Python \n* TensorFlow\n* Keras\n* OpenCV\n\n## Installation\n\n* To set up the environment, run the following command in the command prompt:\n \n\t`pyton -m pip r install_packages.txt`\n\nFor GPU support, use install_packages_gpu.txt instead.\n\n## Process\n\n* Set the hand histogram for creating gestures by running set_hand_histogram.py.\n* Save the histogram in the code folder.\n* Label the captured gestures using OpenCV and store them in a database by running create_gestures.py.\n* Add different variations to the captured gestures by flipping all the images using Rotate_images.py.\n* Split all the captured gestures into training, validation, and test sets by running load_images.py.\n* View all the gestures using display_gestures.py.\n* Train the model using Keras by running cnn_model_train.py.\n* Run final.py to open the gesture recognition window, which will use your webcam to interpret the trained American Sign Language gestures.\n\n## Code Examples\n\n````\n# Model Training using CNN\n\nimport numpy as np\nimport pickle\nimport cv2, os\nfrom glob import glob\nfrom keras import optimizers\nfrom keras.models import Sequential\nfrom keras.layers import Dense\nfrom keras.layers import Dropout\nfrom keras.layers import Flatten\nfrom keras.layers.convolutional import Conv2D\nfrom keras.layers.convolutional import MaxPooling2D\nfrom keras.utils import np_utils\nfrom keras.callbacks import ModelCheckpoint\nfrom keras import backend as K\nK.set_image_dim_ordering('tf')\n\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\n\ndef get_image_size():\n\timg = cv2.imread('gestures/1/100.jpg', 0)\n\treturn img.shape\n\ndef get_num_of_classes():\n\treturn len(glob('gestures/*'))\n\nimage_x, image_y = get_image_size()\n\ndef cnn_model():\n\tnum_of_classes = get_num_of_classes()\n\tmodel = Sequential()\n\tmodel.add(Conv2D(16, (2,2), input_shape=(image_x, image_y, 1), activation='relu'))\n\tmodel.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2), padding='same'))\n\tmodel.add(Conv2D(32, (3,3), activation='relu'))\n\tmodel.add(MaxPooling2D(pool_size=(3, 3), strides=(3, 3), padding='same'))\n\tmodel.add(Conv2D(64, (5,5), activation='relu'))\n\tmodel.add(MaxPooling2D(pool_size=(5, 5), strides=(5, 5), padding='same'))\n\tmodel.add(Flatten())\n\tmodel.add(Dense(128, activation='relu'))\n\tmodel.add(Dropout(0.2))\n\tmodel.add(Dense(num_of_classes, activation='softmax'))\n\tsgd = optimizers.SGD(lr=1e-2)\n\tmodel.compile(loss='categorical_crossentropy', optimizer=sgd, metrics=['accuracy'])\n\tfilepath=\"cnn_model_keras2.h5\"\n\tcheckpoint1 = ModelCheckpoint(filepath, monitor='val_acc', verbose=1, save_best_only=True, mode='max')\n\tcallbacks_list = [checkpoint1]\n\t#from keras.utils import plot_model\n\t#plot_model(model, to_file='model.png', show_shapes=True)\n\treturn model, callbacks_list\n\ndef train():\n\twith open(\"train_images\", \"rb\") as f:\n\t\ttrain_images = np.array(pickle.load(f))\n\twith open(\"train_labels\", \"rb\") as f:\n\t\ttrain_labels = np.array(pickle.load(f), dtype=np.int32)\n\n\twith open(\"val_images\", \"rb\") as f:\n\t\tval_images = np.array(pickle.load(f))\n\twith open(\"val_labels\", \"rb\") as f:\n\t\tval_labels = np.array(pickle.load(f), dtype=np.int32)\n\n\ttrain_images = np.reshape(train_images, (train_images.shape[0], image_x, image_y, 1))\n\tval_images = np.reshape(val_images, (val_images.shape[0], image_x, image_y, 1))\n\ttrain_labels = np_utils.to_categorical(train_labels)\n\tval_labels = np_utils.to_categorical(val_labels)\n\n\tprint(val_labels.shape)\n\n\tmodel, callbacks_list = cnn_model()\n\tmodel.summary()\n\tmodel.fit(train_images, train_labels, validation_data=(val_images, val_labels), epochs=15, batch_size=500, callbacks=callbacks_list)\n\tscores = model.evaluate(val_images, val_labels, verbose=0)\n\tprint(\"CNN Error: %.2f%%\" % (100-scores[1]*100))\n\t#model.save('cnn_model_keras2.h5')\n\ntrain()\nK.clear_session();\n\n````\n\n## Features\nOur model was able to predict the 31 characters in the ASL with a prediction accuracy \u003e 84.19%\n( I topped this score in the latest model in sync intern project repo ).\n\nFeatures that can be added:\n* Deploy the project on cloud and create an API for using it.\n* Increase the vocabulary of our model\n* Incorporate feedback mechanism to make the model more robust\n* Add more sign languages\n\n## Status\nProject is: _finished_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbharathwajmanoharan%2Fsign_language_recognition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbharathwajmanoharan%2Fsign_language_recognition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbharathwajmanoharan%2Fsign_language_recognition/lists"}