{"id":18410082,"url":"https://github.com/shinjimc/parallel-cnn-cudnn-gpu","last_synced_at":"2026-05-19T03:37:59.010Z","repository":{"id":245634986,"uuid":"818552991","full_name":"ShinjiMC/Parallel-CNN-cuDNN-GPU","owner":"ShinjiMC","description":"Repository showcasing a Convolutional Neural Network (CNN) optimized for parallel execution on GPU using cuDNN, with comprehensive scripts for dataset distribution, model training, validation, and testing.","archived":false,"fork":false,"pushed_at":"2024-06-23T00:06:03.000Z","size":1178,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T21:58:35.808Z","etag":null,"topics":["computer-vision","convolutional-neural-networks","cudnn","data-preprocessing","deep-learning","gpu-acceleration","image-recognition","machine-learning","model-training","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShinjiMC.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":"2024-06-22T06:42:08.000Z","updated_at":"2024-06-23T00:06:31.000Z","dependencies_parsed_at":"2024-06-23T04:58:07.249Z","dependency_job_id":"d9f10075-9485-4dbd-b27c-c5814d1f4e74","html_url":"https://github.com/ShinjiMC/Parallel-CNN-cuDNN-GPU","commit_stats":null,"previous_names":["shinjimc/parallel-cnn-cudnn-gpu"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShinjiMC%2FParallel-CNN-cuDNN-GPU","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShinjiMC%2FParallel-CNN-cuDNN-GPU/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShinjiMC%2FParallel-CNN-cuDNN-GPU/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShinjiMC%2FParallel-CNN-cuDNN-GPU/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShinjiMC","download_url":"https://codeload.github.com/ShinjiMC/Parallel-CNN-cuDNN-GPU/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637784,"owners_count":21137538,"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","convolutional-neural-networks","cudnn","data-preprocessing","deep-learning","gpu-acceleration","image-recognition","machine-learning","model-training","tensorflow"],"created_at":"2024-11-06T03:29:00.181Z","updated_at":"2026-05-19T03:37:53.990Z","avatar_url":"https://github.com/ShinjiMC.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Parallel GPU-Enabled CNN with cuDNN: Optimized Deep Learning for Image Classification\n\n\u003cdiv style=\"text-align: center;\"\u003e\n\n![Python](https://img.shields.io/badge/python-4584B6?style=for-the-badge\u0026logo=python\u0026logoColor=white)\n![Tensorflow](https://img.shields.io/badge/tensorflow-FF6600.svg?style=for-the-badge\u0026logo=tensorflow\u0026logoColor=white)\n![CUDA](https://img.shields.io/badge/CUDA-76B900.svg?style=for-the-badge\u0026logo=nvidia\u0026logoColor=white)\n![cudNN](https://img.shields.io/badge/cudnn-619603.svg?style=for-the-badge\u0026logo=nvidia\u0026logoColor=white)\n![Anaconda](https://img.shields.io/badge/anaconda-44A833.svg?style=for-the-badge\u0026logo=anaconda\u0026logoColor=white)\n\n\u003c/div\u003e\n\nBy @ShinjiMC - Braulio Nayap Maldonado Casilla\n\n### Setting up Anaconda Environment\n\n1. **Install Anaconda:**\n   If Anaconda is not installed, follow these steps:\n\n   - Download Anaconda from [Anaconda's website](https://www.anaconda.com/products/distribution).\n   - Follow the installation instructions for your operating system.\n\n2. **Create and Activate Environment:**\n   Open a terminal and execute the following commands:\n   ```bash\n   conda create --name flowers python=3.8\n   conda activate flowers\n   ```\n\n### Installing Required Packages\n\n3. **Install TensorFlow with GPU support:**\n   ```bash\n   conda install -c conda-forge tensorflow-gpu\n   ```\n4. **Install Additional Packages:**\n   ```bash\n   conda install matplotlib scipy\n   ```\n\n### Verify TensorFlow GPU Setup\n\n5. **Run verification script (verification.py):**\n\n   ```python\n   import tensorflow as tf\n\n   # Check if TensorFlow detects the GPU\n   physical_devices = tf.config.experimental.list_physical_devices('GPU')\n   print(\"Num GPUs Available: \", len(physical_devices))\n   if len(physical_devices) \u003e 0:\n       tf.config.experimental.set_memory_growth(physical_devices[0], True)\n       print(\"GPU is available and will be used for training.\")\n   else:\n       print(\"No GPU found, using CPU for training.\")\n   ```\n\n### Download and Prepare Dataset\n\n6. **Download Dataset:**\n\n   - Download the dataset from [Kaggle](https://www.kaggle.com/datasets/jonathanflorez/extended-flowers-recognition?resource=download).\n\n7. **Prepare Dataset (distribution.py):**\n\n   - After downloading, extract the dataset to obtain the 'flowers' folder.\n   - Run the distribution script to organize images into train, validate, and test folders.\n\n   ```bash\n   python distribution.py\n   ```\n\n### Training the Model\n\n8. **Run Main Script:**\n   - Execute main.py to train your CNN model.\n   ```bash\n   python main.py\n   ```\n\n### Results\n\n#### Model Distribution Summary\n\n![Model Distribution Summary](.Captures/model_Distribution.png)\n\nThe summary of the model shows the division into 4 parallel processes for execution on the GPU. It demonstrates successful detection and utilization of the GPU, specifically tested on the NVIDIA GeForce RTX 4050 Laptop GPU.\n\n#### Execution and Validation Results\n\n![Execution and Validation Results](.Captures/execution_epochs.png)\n\nThe graph depicts the execution of each layer and its validation results over 20 epochs. It illustrates the progress of accuracy and loss metrics throughout the training process.\n\n#### Training and Validation Metrics\n\n![Training and Validation Metrics](.Captures/training_validation_metrics.png)\n\nThe linear graphs show the progression of both accuracy and loss metrics during training. They highlight how the model improves as training progresses.\n\n### Testing Your Trained Model\n\nTo test the trained model, execute `gui.py`. This script will randomly select an image from the test folder or you can select your own file and display the model's prediction alongside the actual result. The results you can view in the GUI with QT.\n\n![Example Test Result](.Captures/gui_view.png)\n\n### Testing Confidence\n\nYou can test the model using `test.py`, which executes tests and validates the number of correct and incorrect predictions. This allows us to assess the confidence of the trained model.\n\nThe model achieved an accuracy of 85.01%, correctly predicting 6944 out of 8168 test samples, with 1224 incorrect predictions.\n\n![Confidence Result](.Captures/test_1.png)\n\n## License:\n\nThis project is licensed under [Creative Commons Atribución-NoComercial-CompartirIgual 4.0 Internacional](http://creativecommons.org/licenses/by-nc-sa/4.0/):\n\n\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc-sa/4.0/\"\u003e\n  \u003cimg alt=\"Licencia Creative Commons\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png\" /\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinjimc%2Fparallel-cnn-cudnn-gpu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinjimc%2Fparallel-cnn-cudnn-gpu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinjimc%2Fparallel-cnn-cudnn-gpu/lists"}