{"id":22785823,"url":"https://github.com/cyberfantics/form_digitilization","last_synced_at":"2025-03-30T15:27:38.525Z","repository":{"id":266524085,"uuid":"898570742","full_name":"cyberfantics/form_digitilization","owner":"cyberfantics","description":"A Python-based application for live video text extraction using the Gemini 1.5 Flash API, hand gesture detection, and UI display.","archived":false,"fork":false,"pushed_at":"2024-12-07T12:00:49.000Z","size":6639,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T17:13:26.185Z","etag":null,"topics":["computer-vision","gemini-api","hacktoberfest","hand-gesture-detection","opensource","pillow","python","text-extraction"],"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/cyberfantics.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":"2024-12-04T16:23:35.000Z","updated_at":"2024-12-07T18:19:25.000Z","dependencies_parsed_at":"2024-12-04T23:02:30.544Z","dependency_job_id":null,"html_url":"https://github.com/cyberfantics/form_digitilization","commit_stats":null,"previous_names":["cyberfantics/form_digitilization"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberfantics%2Fform_digitilization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberfantics%2Fform_digitilization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberfantics%2Fform_digitilization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberfantics%2Fform_digitilization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyberfantics","download_url":"https://codeload.github.com/cyberfantics/form_digitilization/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246337254,"owners_count":20761184,"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":["computer-vision","gemini-api","hacktoberfest","hand-gesture-detection","opensource","pillow","python","text-extraction"],"created_at":"2024-12-11T23:07:50.355Z","updated_at":"2025-03-30T15:27:38.497Z","avatar_url":"https://github.com/cyberfantics.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Form Digitization Using CV2 and AI 🎥🤖\n\nThis project leverages OpenCV and the **Gemini 1.5 Flash API** for real-time form digitization. It provides an interactive interface to digitize forms, detect hand gestures for form type selection, and overlay extracted data on a visually appealing custom background.\n\n## Features 🌟\n- **Real-Time Video Feed:** Captures live input from the webcam.\n- **Hand Gesture Recognition:** Uses finger gestures to select the form type (e.g., Student Card, Challan, General Form).\n- **Gemini 1.5 Flash API Integration:** Extracts text from images of forms uploaded by the user.\n- **Dynamic Data Display:** Displays extracted data (like name, CNIC, department, etc.) directly on the application interface.\n- **Customizable UI:** Implements a styled UI with background overlays and region-specific displays.\n- **Video Recording:** Allows recording of sessions for future reference.\n- **Multi-Mode Support:** Toggle between instruction view, live capture, and extracted text view.\n\n---\n\n## Prerequisites 📋\nMake sure you have the following installed and set up before running the application:\n\n- **Python 3.8+**\n- **OpenCV** (`cv2`)\n- **cvzone** (for hand gesture detection)\n- **Pillow** (for image processing)\n- **Gemini 1.5 Flash API** credentials\n- A webcam for live video input\n\n---\n\n## Installation 🛠️\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/cyberfantics/form_digitilization.git\n   cd form_digitilization\n    ```\n2. Install the required dependencies:\n    ```\n    pip install -r requirements.txt\n    ```\n3. Add your `Gemini 1.5 Flash API` key in the `extract.py` script.\n\n---\n\n## How to Use ▶️\n\n### Run the application:\n```bash\npython main.py\n```\n### Follow the On-Screen Instructions 📋\n\n- **Press `p`**: Toggle video recording.  \n- **Press `i`**: View the instructions screen.  \n- **Press `c`**: Enter live capture mode.  \n- **Press `s`**: Send the frame to the Gemini 1.5 Flash API for text extraction.  \n- **Press `h`**: Activate hand gesture detection for form type selection.  \n- **Press `q`**: Exit the application.  \n\n---\n\n## Hand Gesture Rules ✋\n\n- **Five fingers open**: Select **General Form Mode**.  \n- **Two fingers open (peace sign)**: Select **Fee Challan Mode**.  \n- **Five fingers closed (fist)**: Select **Student Card Mode**.  \n\n---\n\n## Output 📊\n\n- The extracted data (e.g., **Name**, **CNIC**, **Gender**) is displayed directly on the UI.  \n- You can view the processed data in live video frames and save the session as a video file.  \n\n---\n\n## File Structure 📂\n\n- **`main.py`**: Core application logic.  \n- **`extract.py`**: Contains API integration for text extraction.  \n- **`resources/`**: Contains images for the UI (e.g., background and instructions).  \n- **`requirements.txt`**: List of dependencies.  \n\n---\n\n## Screenshots 📸\n\u003cdiv style=\"display: flex; justify-content: space-between;\"\u003e\n  \u003cimg src=\"screenshots/1.png\" width=\"30%\" /\u003e\n  \u003cimg src=\"screenshots/2.png\" width=\"30%\" /\u003e\n  \u003cimg src=\"screenshots/3.png\" width=\"30%\" /\u003e\n\u003c/div\u003e\n\n\u003cdiv style=\"display: flex; justify-content: space-between;\"\u003e\n  \u003cimg src=\"screenshots/4.png\" width=\"30%\" /\u003e\n  \u003cimg src=\"screenshots/5.png\" width=\"30%\" /\u003e\n  \u003cimg src=\"screenshots/6.png\" width=\"30%\" /\u003e\n\u003c/div\u003e\n\n---\n\n## Contributing 🤝\n\nContributions are welcome! Feel free to submit a pull request or open an issue to suggest improvements.\n\n---\n\n## License 📜\n\nThis project is licensed under the **MIT License**.\n\n---\n\n## Author\n**Syed Mansoor ul Hassan Bukhari**  \n[GitHub](https://github.com/cyberfantics) | [LinkedIn](https://www.linkedin.com/in/mansoor-bukhari/)\n\n---\n### **Happy Digitizing!** 🎉","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberfantics%2Fform_digitilization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyberfantics%2Fform_digitilization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberfantics%2Fform_digitilization/lists"}