{"id":20072442,"url":"https://github.com/yashindane/webcube","last_synced_at":"2026-03-03T21:02:07.606Z","repository":{"id":45376300,"uuid":"372790854","full_name":"YashIndane/webcube","owner":"YashIndane","description":"Rubik's cube assistant on Flask webapp","archived":false,"fork":false,"pushed_at":"2024-12-09T14:05:36.000Z","size":157,"stargazers_count":54,"open_issues_count":0,"forks_count":17,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T10:57:49.092Z","etag":null,"topics":["flask","image-processing","machine-learning"],"latest_commit_sha":null,"homepage":"https://www.linkedin.com/posts/yash-indane-aa6534179_machinelearning-flask-python-activity-6805902901546901507-dN6M","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YashIndane.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-01T10:31:38.000Z","updated_at":"2024-06-12T16:13:12.000Z","dependencies_parsed_at":"2024-11-13T14:44:04.096Z","dependency_job_id":"a01a2200-cd01-4da1-9643-55fd564cdb39","html_url":"https://github.com/YashIndane/webcube","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YashIndane/webcube","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashIndane%2Fwebcube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashIndane%2Fwebcube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashIndane%2Fwebcube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashIndane%2Fwebcube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YashIndane","download_url":"https://codeload.github.com/YashIndane/webcube/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YashIndane%2Fwebcube/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30060632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["flask","image-processing","machine-learning"],"created_at":"2024-11-13T14:40:02.962Z","updated_at":"2026-03-03T21:02:07.593Z","avatar_url":"https://github.com/YashIndane.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://img.shields.io/badge/-Flask-blue?style=for-the-badge\u0026logo=flask) ![](https://img.shields.io/badge/impressions-79.7k-lightblue?style=for-the-badge\u0026logo=linkedin) ![](https://img.shields.io/badge/likes-2.7k-lightblue?style=for-the-badge\u0026logo=linkedin)\n\n# webcube\nRubik's cube assistant on Flask webapp. This webapp accepts the six faces of your cube and gives you the voice instructions as a response.\n\nDemo -\u003e [Link](https://www.linkedin.com/posts/yash-indane-aa6534179_machinelearning-flask-python-activity-6805902901546901507-dN6M)\n\n## Requirements\n\nThis webapp requires a lot of extra modules and packages to be downloaded, It is recommanded to follow this order :\n\n```\n$ yum install python3 -y\n$ yum install gcc-c++ -y\n$ yum install python3-devel -y \n$ pip3 install flask \n$ pip3 install Pillow\n$ pip3 install numpy\n$ pip3 install joblib\n$ pip3 install scikit-learn\n$ pip3 install scikit-build\n$ pip3 install opencv-python\n$ yum install opencv opencv-devel opencv-python -y\n$ pip3 install kociemba\n```\n\n## Usage\n\nNavigate to `http://\u003cIP\u003e:\u003cPORT\u003e/input`.\nThis webapp runs on port no. `85` by default, but can be changed in the `app.py` file. To use take edge to edge and centred pics of the cube. \nStart with `Red` face with the `White` face down, and take pictures in the order `Red -\u003e Green -\u003e Orange -\u003e Blue -\u003e Yellow -\u003e White`. After this click `get solution`. While listening to the instructions \nface the `Red` centred face with the `White` centred face down.\n\n![example](https://user-images.githubusercontent.com/53041219/207019696-abfe8bbe-4ce9-48fb-bd4a-268b4ab9b7c7.png)\n\n## Running the container\n\n```\n$ sudo docker run -dit -p \u003cPORT\u003e:85 --name \u003cNAME\u003e yashindane/webcube:v1 \n```\n\n## Running the container using podman\n\n```\n$ sudo podman run -dit -p \u003cPORT\u003e:85 --name \u003cNAME\u003e docker.io/yashindane/webcube:v1 \n```\n\n## Arm64v8 machines\n\n```\n$ sudo docker run --platform linux/arm64/v8 -dit -p \u003cPORT\u003e:85 --name \u003cNAME\u003e yashindane/webcube:linux-arm64v8\n```\n\nCode for arm64v8 version -\u003e [link](https://github.com/YashIndane/webcube-arm64v8)\n\n## Working\n\nThe six images of six faces have there respective `data_uri`, which are submitted by a form when you click `get solution`. This `data_uri` are converted to images and saved.\nNext the function `order` from `order_image.py` renames and creates new images (format example face_0.png to face_5.png), according to images that have central tile colour matching in the order `yellow -\u003e green -\u003e red -\u003e white -\u003e blue -\u003e orange`. Naming images in this order is required for the cube to be solved. A cubestring is formed after predicting the tile colours and getting there respective notations.\n\n```py\ncolour_mappings = {\n\n    \"red\": \"F\",\n    \"green\": \"R\",\n    \"blue\": \"L\",\n    \"yellow\": \"U\",\n    \"white\": \"D\",\n    \"orange\": \"B\"\n \n}\n```\n\nThe cubestring is passed to the `kociemba.solve()` function, which return a string containing instructions for solving the cube.\nKociemba is a Python/C implementation of Herbert Kociemba's Two-Phase algorithm for solving Rubik's Cube.\n\nRead full documentation of Kociemba here -\u003e [Link](https://pypi.org/project/kociemba/)\n\nthe instructions are decoded to human voice instructions. This instructions are then written to the `output.js` file, which outputs this instructions as voice.\n\n## Building docker image\n\nbuild docker image by -\u003e\n\n`$ docker build -t \u003cusername\u003e/\u003crepo-name\u003e:\u003cversion\u003e`\n\nI have also uploded already build image for this webapp on Docker Hub -\u003e [Link](https://hub.docker.com/repository/docker/yashindane/webcube)\n\n## deploying the image in Kubernetes\n\ncreate a deployment by -\u003e\n\n`$ kubectl create deployment \u003cdeploy-name\u003e --image \u003cusername\u003e/\u003crepo-name\u003e:\u003cversion\u003e `\n\nScale the deployment if necessary and create a service by -\u003e\n\n`$ kubectl expose deployment \u003cdeploy-name\u003e --port=85 --name=\u003cservice-name\u003e --type=LoadBalancer`\n\n## Prerequisite browser settings\n\n### 1. Remove chrome managed by your organisation (Optional)\n\nVisit this link -\u003e [link](https://www.youtube.com/watch?v=DaLaWChdyug)\n\n### 2. Edit chrome flags for camera access\n\nNavigate to `chrome://flags/#unsafely-treat-insecure-origin-as-secure` on chrome browser and add `http://\u003cIP\u003e:\u003cPORT\u003e` inside `Insecure origins treated as secure box` and click enable and reload the chrome page.\nAfter usage just remove the entry and click disable.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashindane%2Fwebcube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyashindane%2Fwebcube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyashindane%2Fwebcube/lists"}