{"id":13800690,"url":"https://github.com/BilalReffas/EmojiIntelligence","last_synced_at":"2025-05-13T09:31:50.885Z","repository":{"id":95093788,"uuid":"87763802","full_name":"BilalReffas/EmojiIntelligence","owner":"BilalReffas","description":"Neural Network built in Apple Playground using Swift","archived":false,"fork":false,"pushed_at":"2018-08-21T19:41:25.000Z","size":420,"stargazers_count":1376,"open_issues_count":0,"forks_count":82,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-04-12T18:52:20.026Z","etag":null,"topics":["ai","apple","artificial-intelligence","ipad","machine-learning","macos","network","neural","playground","swift"],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/BilalReffas.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-04-10T03:44:45.000Z","updated_at":"2025-04-02T22:57:59.000Z","dependencies_parsed_at":"2023-05-26T14:30:35.684Z","dependency_job_id":null,"html_url":"https://github.com/BilalReffas/EmojiIntelligence","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/BilalReffas%2FEmojiIntelligence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BilalReffas%2FEmojiIntelligence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BilalReffas%2FEmojiIntelligence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BilalReffas%2FEmojiIntelligence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BilalReffas","download_url":"https://codeload.github.com/BilalReffas/EmojiIntelligence/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253913210,"owners_count":21983276,"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":["ai","apple","artificial-intelligence","ipad","machine-learning","macos","network","neural","playground","swift"],"created_at":"2024-08-04T00:01:15.152Z","updated_at":"2025-05-13T09:31:49.114Z","avatar_url":"https://github.com/BilalReffas.png","language":"Swift","funding_links":[],"categories":["Theoretical Computer Science"],"sub_categories":["Machine Learning"],"readme":"# EmojiIntelligence \nDo you want to teach your machine emojis? 😏\n\u003cbr\u003e\n\u003cbr\u003e\nI created a neural network entirely in Swift. This is a demo to demonstrate what is possible to solve.\n\u003cbr\u003e\nI used the Playground on macOS. \n\u003cbr\u003e\nI believe in open source I think to push humanity forward you have to open source all the things \\o/\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n![](http://imgur.com/0urwCTN.png)\n\u003cbr\u003e\n\u003cbr\u003e\n![](http://i.imgur.com/qhweGhT.gif)\n\u003cbr\u003e\n\u003cbr\u003e\nYou can watch the YouTube Video [here](https://www.youtube.com/watch?v=T9pplv7cZ7k)\n\u003cbr\u003e\n\u003cbr\u003e\n\n## Abstract Overview\n\n\u003cimg src=\"http://i.imgur.com/qVKMBym.png\" width=\"350\"\u003e\n\n### This is how the encoded image look's like. \n\n![](http://imgur.com/3iRGrFv.png)\n\n### Neural Network Story\n\nI used this challenge to learn more about neural networks and machine learning.\nA neural network consists of layers, and each layer has neurons. My network has three layers: an input layer, a hidden layer, and an output layer.\n\u003cbr\u003e\u003cbr\u003e\n\u003cimg src=\"http://i.imgur.com/DZh33WL.png\" width=\"250\"\u003e\n\u003cbr\u003e\u003cbr\u003e\nThe input to my network has 64 binary numbers. These inputs are connected to the neurons in the hidden layer. The hidden layer performs some computation and passes the result to the output layer neuron out. This also performs a computation and then outputs a 0 or a 1. The input layer doesn’t actually do anything, they are just placeholders for the input value. Only the neurons in the hidden layer and the output layer perform computations.  The neurons from the input layer are connected to   the neurons in the hidden layer. Likewise, both neurons from the hidden layer are connected to the output layer. These kinds of layers are called fully-connected because every neuron is connected to every neuron in the next layer. Each connection between two neurons has a weight, which is just a number. These weights form the brain of my network. For the activation function in my network, I use the sigmoid function. ![](http://i.imgur.com/Xrhx1wl.png)\u003cbr\u003e\u003cbr\u003e\nSigmoid is a mathematical function. The sigmoid takes in some number x and converts it into a value between 0 and 1. That is ideal for my purposes, since I am dealing with binary numbers.\nThis will turn a linear equation into something that is non-linear. This is important because without this, the network wouldn’t be able to learn any interesting things. \n\nI have already mentioned that the input to this network are 64 binary numbers. I resize the drawn image to 8x8 pixels which makes together 64 pixels. I go through the image and check each pixel if the pixel has a pink color I add a 1 to my array else I add a 0. At the end I will have 64 binary numbers which I can add to my input layer. \n\nMy main goal was to make neural network and machine learning more accessible and fun. As well to learn more about the powerful features of playgrounds and neural networks. \n\n### Author\n\n  [@reffas_bilal](https://twitter.com/Reffas_Bilal)\n  \n  [bilalreffas@googlemail.com]()\n  \n\n### Credits\n  [Vincent Esche](https://twitter.com/regexident)\n  \n  [Per Harald Borgen](https://twitter.com/perborgen)\n  \n  [Matthijs Hollemans](https://twitter.com/mhollemans)\n\n### Thank you 🎉\n\n  If you like this project please leave a star 🌟 here on Github and share it.\n  \n### Luubra\n\n  I'm working with [@leoMehlig ](https://twitter.com/leoMehlig) on Luubra. You will find more about it                    [here](https://www.luubra.com)\n  \u003cbr\u003e\n  All pieces are handcrafted with a lot of love ❤️ and sent all around the world 🌍. \n  \n### Known issues\n  This projecty is currently only working on macOS. There is a bug on the iPad I already submitted the issue on the Bug Reporter. \n  I hope Apple will fix this soon.\n\n### License\n\n```\nMIT License\n\nCopyright (c) 2017 Luubra\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBilalReffas%2FEmojiIntelligence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBilalReffas%2FEmojiIntelligence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBilalReffas%2FEmojiIntelligence/lists"}