{"id":15139011,"url":"https://github.com/scrn-vrc/simpnet-deep-learning-in-a-shader","last_synced_at":"2025-10-23T15:31:49.359Z","repository":{"id":44613604,"uuid":"277532480","full_name":"SCRN-VRC/SimpNet-Deep-Learning-in-a-Shader","owner":"SCRN-VRC","description":"A trainable convolutional neural network inside a fragment shader","archived":false,"fork":false,"pushed_at":"2021-06-21T14:33:57.000Z","size":500001,"stargazers_count":112,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-30T19:12:35.799Z","etag":null,"topics":["artificial-intelligence","backpropogation","cnn","covnets","machine-learning","neural-networks","shaders","unity3d","vrchat"],"latest_commit_sha":null,"homepage":"","language":"GLSL","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/SCRN-VRC.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":"2020-07-06T12:12:59.000Z","updated_at":"2025-01-11T06:05:57.000Z","dependencies_parsed_at":"2022-09-23T02:40:34.886Z","dependency_job_id":null,"html_url":"https://github.com/SCRN-VRC/SimpNet-Deep-Learning-in-a-Shader","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCRN-VRC%2FSimpNet-Deep-Learning-in-a-Shader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCRN-VRC%2FSimpNet-Deep-Learning-in-a-Shader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCRN-VRC%2FSimpNet-Deep-Learning-in-a-Shader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SCRN-VRC%2FSimpNet-Deep-Learning-in-a-Shader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SCRN-VRC","download_url":"https://codeload.github.com/SCRN-VRC/SimpNet-Deep-Learning-in-a-Shader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237852416,"owners_count":19376677,"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":["artificial-intelligence","backpropogation","cnn","covnets","machine-learning","neural-networks","shaders","unity3d","vrchat"],"created_at":"2024-09-26T08:00:45.637Z","updated_at":"2025-10-23T15:31:44.314Z","avatar_url":"https://github.com/SCRN-VRC.png","language":"GLSL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpNet\n\u003cimg src=\"Images/SimpNetRender.png\"/\u003e\n\n#### Fig. 1 - Basic network structure\n\n\u003cimg src=\"Images/TrainingGIF.gif\"/\u003e\n\n#### Fig. 2 - Training the network to output Apples for an apple\n\n## Overview\n* Three version of SimpNet: Python, C++, HLSL\n* Python + Keras version is the high level overview of the network structure, also does the offline training.\n* C++ + OpenCV version is a low level version to help me convert the network into HLSL.\n* HLSL version is the one used in-game in VRChat.\n* Four pre-trained networks included: Fruits, Age Classification, Hololive VTubers, and VRC Devs.\n\n\u003cimg src=\"Images/Example.png\"/\u003e\n\n#### Fig.3 - The age classifier does not work well with anime faces\n\n## Live Demo\n* https://www.vrchat.com/home/launch?worldId=wrld_4cbc4ccb-3c0d-419d-bc8b-e370c951edd2\n\n## Setup for VRChat\n#### Prerequisites\n* [VRC SDK 2](https://vrchat.com/home/download) setup in a Unity project\n* [VRChat layers must be setup already](https://docs.vrchat.com/docs/)\n* [Post Processing V2](https://github.com/Unity-Technologies/PostProcessing) (Not needed, but you do need to remove the missing scripts)\n### Avatars\n1. Import the SimpNet.unitypackage in [Releases](https://github.com/SCRN-VRC/SimpNet-Deep-Learning-in-a-Shader/releases)\n2. In Prefabs folder, put SimpNetAvatarPrefab.prefab on your avatar\n3. Unpack the prefab and put HandCamera on your hands\n4. I suggest having them off by default\n\n### Worlds\n1. Clone the repository\n2. Open the Unity project\n3. Import VRCSDK2\n4. Remove any missing scripts (Post Processing V2)\n\nOR\n\n1. Open a new Unity project\n2. Import VRCSDK2\n3. Import the SimpNet.unitypackage in [Releases](https://github.com/SCRN-VRC/SimpNet-Deep-Learning-in-a-Shader/releases)\n4. Remove any missing scripts (Post Processing V2)\n\nI will be converting everything to Udon at some point.\n\n## Python Code\nIf you wish to run the Python code, here's what you need.\n* Anaconda 1.19.12\n* Python 3.7\n* TensorFlow 1.14.0\n* Keras 2.3.1\n\nI suggest following a guide on Keras + Anaconda installations like this one https://inmachineswetrust.com/posts/deep-learning-setup/\n\n## C++ Code\nIf you wish to run the C++ code.\n* [OpenCV – 4.0.1 or above](https://opencv.org/releases/)\n* [nlohmann-json library](https://github.com/nlohmann/json)\n\nYou can follow a guide on OpenCV + Visual Studio here https://www.deciphertechnic.com/install-opencv-with-visual-studio/\n\n## How it Works\n\u003cimg src=\"Images/RenderTexture.png\"/\u003e\n\n#### Fig. 4 - The render texture that contains the current state of the network for all the weights, outputs, and even the intermediate steps\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrn-vrc%2Fsimpnet-deep-learning-in-a-shader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscrn-vrc%2Fsimpnet-deep-learning-in-a-shader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrn-vrc%2Fsimpnet-deep-learning-in-a-shader/lists"}