{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"Published on May 18, 2023. By Marília Prata, mpwolke.","metadata":{}},{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","_kg_hide-input":true,"_kg_hide-output":true,"execution":{"iopub.status.busy":"2023-05-18T19:30:23.137798Z","iopub.execute_input":"2023-05-18T19:30:23.138425Z","iopub.status.idle":"2023-05-18T19:30:23.20882Z","shell.execute_reply.started":"2023-05-18T19:30:23.138381Z","shell.execute_reply":"2023-05-18T19:30:23.207798Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"![](https://miro.medium.com/v2/resize:fit:1400/1*21wuzDysqWA_N5b7of7Lwg.png)https://medium.com/swlh/icon-classifier-with-tflite-model-maker-9263c0021f72\n\nBy Margaret Maynard-Reid on \"An Icon Classifier with TensorFlow Lite Model Maker\".","metadata":{}},{"cell_type":"markdown","source":"#Inspired by Thad Starner's topic. Folks- Show some Deaf culture! \n\nhttps://www.kaggle.com/competitions/asl-fingerspelling/discussion/409878","metadata":{}},{"cell_type":"markdown","source":"#Watch, watch this hands. They can dance. They can sing. They can do anything. \n\n#Fingerspelling. Faster. Faster. Machine Learning with TensorFlowLite model.","metadata":{}},{"cell_type":"markdown","source":"#ASL \"Lose Yourself\" LIVE at the Super Bowl\n\nIf you had one shot, or one opportunity\n\nTo seize everything you ever wanted\n\nOne moment\n\nWould you capture it (with Mediapipe) or just let it slip?\n\nHis palms are sweaty, knees weak, arms are heavy.\n\nBut he keeps on forgetting what he coded down, the whole Competition goes so loud\n\n\"Lose Yourself\" Songwriters: Marshall Mathers / Luis Resto / Jeffrey Bass","metadata":{}},{"cell_type":"code","source":"#Ignore warnings\nimport warnings\nwarnings.filterwarnings('ignore')\n\nimport tensorflow as tf","metadata":{"execution":{"iopub.status.busy":"2023-05-18T19:59:42.977888Z","iopub.execute_input":"2023-05-18T19:59:42.97843Z","iopub.status.idle":"2023-05-18T19:59:42.985254Z","shell.execute_reply.started":"2023-05-18T19:59:42.978397Z","shell.execute_reply":"2023-05-18T19:59:42.983983Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"INPUT_DIR =  '../input/asl-fingerspelling/'\nSAVED_MODEL = f'{INPUT_DIR}train'\n\n# convert model to tf lite format + Post Training Quantization\n#converter = tf.lite.TFLiteConverter.from_saved_model(SAVED_MODEL)\n# converter.optimizations = [tf.lite.Optimize.DEFAULT]","metadata":{"execution":{"iopub.status.busy":"2023-05-18T19:54:12.272873Z","iopub.execute_input":"2023-05-18T19:54:12.273324Z","iopub.status.idle":"2023-05-18T19:54:12.278803Z","shell.execute_reply.started":"2023-05-18T19:54:12.273291Z","shell.execute_reply":"2023-05-18T19:54:12.277498Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Since the song lyrics mentioned TensorFlowLite model, I added that to the title too.\n\nHowever, I've no clue how to work with TFLite here.","metadata":{}},{"cell_type":"code","source":"# To require the converter to only output integer operations\n#converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS]\n\n\n#tflite_model = converter.convert()\n\n# interprete\n#tflite_model_file = 'converted_model.tflite'\n\n#with open(tflite_model_file, \"wb\") as f:\n    #f.write(tflite_model)","metadata":{"execution":{"iopub.status.busy":"2023-05-18T19:56:36.289231Z","iopub.execute_input":"2023-05-18T19:56:36.290864Z","iopub.status.idle":"2023-05-18T19:56:36.295333Z","shell.execute_reply.started":"2023-05-18T19:56:36.29082Z","shell.execute_reply":"2023-05-18T19:56:36.294488Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Sean Forbes\n\n\"Sean Patrick Forbes (born February 5, 1982) is a deaf American hip-hop artist. His long-time producer and collaborator is Jake Bass, and together they have penned over 100 songs, many of which they perform live.\"\n\n\"Sean is a co-founder of D-PAN, The Deaf Professional Arts Network, a nonprofit organization that has been making music accessible to the Deaf and hard of hearing community by creating American Sign Language interpretation music videos of popular songs. D-PAN has created videos for John Mayer, Christina Aguilera, Eminem, White Stripes, Owl City, Carly Rae Jepsen, The Clark Sisters, Imagine Dragons, and more.\"\n\n\"In 2012, Sean released a full-length CD/DVD album titled Perfect Imperfection and toured the world to promote the record.\"\n\n\"On February 13, 2022, Forbes performed in the Super Bowl LVI halftime show in ASL.\"\n\nhttps://en.wikipedia.org/wiki/Sean_Forbes","metadata":{}},{"cell_type":"markdown","source":"#Join us for the American Sign Language (ASL) Fingerspelling Competition\n\n#With Sean Forbes\n\n<iframe width=\"713\" height=\"401\" src=\"https://www.youtube.com/embed/q3xKB3dfvtA\" title=\"Join us for the American Sign Language (ASL) Fingerspelling Competition\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen></iframe>\n\nhttps://www.youtube.com/watch?v=q3xKB3dfvtA","metadata":{}},{"cell_type":"markdown","source":"Watch, watch these hands. They can dance they can sing they can do anything.\n\nFingerspelling. I want to tell you about Machine Learning. And how you can help the deaf \n\ncommunity with a new Dataset of finger spelled words.\n\nDeaf people often have problem with technology,because it's not designed for them.\n\nBut with the Kaggle Competition we can change that.\n\nFingerspelling, Fingerspelling. We can create newtools for everyone.\n\nThe largest collection of finger spelled words ever.\n\nWith the fast and accurate TensorFlowLite model.\n\nYou can make the World a more accessible place No matter the language.\n\nLet's do it. Let's change the World. One word at a time.\n\nWe need your help. Making our world connected.\n\nImagine that. I fingerspell to the camera. It understands me!\n\nFingerspell a word and its pop up on the search. Using TensorFlowLite and MediaPipe.\n\n#C'mon Kagglers join the Competition\n\nLet's advance the future of sign language recognition. So that we can all help to improve\n\nthe lives of both deaf and hearing people worldwide.\n","metadata":{}},{"cell_type":"markdown","source":"#Watch this hands. The only thing MPWolke's hands can Not do: Deliver a decent code.  ","metadata":{}},{"cell_type":"markdown","source":"![](https://media.tenor.com/fTyu4TW_FAoAAAAC/star-trek-hands.gif)https://tenor.com/pt-BR/view/star-trek-hands-naked-gif-14388726","metadata":{}}]}