{"id":22332535,"url":"https://github.com/theoddysey/image-classification-node-tensorflow","last_synced_at":"2026-05-16T22:35:34.892Z","repository":{"id":229145131,"uuid":"766628011","full_name":"TheODDYSEY/Image-Classification-Node-TensorFlow","owner":"TheODDYSEY","description":"TensorFlow Image Classification App 🖼️","archived":false,"fork":false,"pushed_at":"2024-03-22T07:22:20.000Z","size":3437,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T07:23:21.335Z","etag":null,"topics":["cnn-for-visual-recognition","image-classification","javascript","machine-learning","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/TheODDYSEY.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}},"created_at":"2024-03-03T19:25:13.000Z","updated_at":"2024-04-27T10:06:51.000Z","dependencies_parsed_at":"2024-03-22T09:49:41.410Z","dependency_job_id":null,"html_url":"https://github.com/TheODDYSEY/Image-Classification-Node-TensorFlow","commit_stats":null,"previous_names":["theoddysey/image-classification-node-tensorflow"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TheODDYSEY/Image-Classification-Node-TensorFlow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheODDYSEY%2FImage-Classification-Node-TensorFlow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheODDYSEY%2FImage-Classification-Node-TensorFlow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheODDYSEY%2FImage-Classification-Node-TensorFlow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheODDYSEY%2FImage-Classification-Node-TensorFlow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheODDYSEY","download_url":"https://codeload.github.com/TheODDYSEY/Image-Classification-Node-TensorFlow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheODDYSEY%2FImage-Classification-Node-TensorFlow/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264384390,"owners_count":23599612,"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":["cnn-for-visual-recognition","image-classification","javascript","machine-learning","tensorflow"],"created_at":"2024-12-04T04:18:36.114Z","updated_at":"2026-05-16T22:35:29.870Z","avatar_url":"https://github.com/TheODDYSEY.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"**TensorFlow Image Classification Application**\n\n---\n\n**Project Overview:**\nThis application leverages TensorFlow.js and the MobileNet model to perform image classification tasks. It reads an image file, processes it using the MobileNet model, and provides classification results based on the contents of the image.\n\n---\n\n**Project Components:**\n\n1. **TensorFlow.js Setup:**\n   - The application imports necessary TensorFlow.js libraries to enable machine learning functionalities in JavaScript.\n   - Libraries like `@tensorflow/tfjs`, `@tensorflow-models/mobilenet`, and `@tensorflow/tfjs-node` are included to facilitate image processing and classification.\n\n2. **Image Reading Function:**\n   - The `readImage` function reads an image file from the specified path using Node.js's file system module (`fs`).\n   - The image data is then converted into a TensorFlow tensor object (`tf.Tensor`).\n\n3. **Image Classification Function:**\n   - The `imageClassification` function takes the path of an image file as input.\n   - It utilizes the MobileNet model, pre-trained on ImageNet, to classify the contents of the image.\n   - The function loads the MobileNet model asynchronously and uses it to classify the input image.\n   - Classification results are logged to the console.\n\n4. **Calling the Function:**\n   - The script expects the path to the image file as a command-line argument (`process.argv[2]`).\n   - If the correct number of arguments is not provided, an error is thrown.\n   - The `imageClassification` function is called with the provided image file path.\n\n---\n\n**Usage:**\n1. Ensure that Node.js is installed on your system.\n2. Install the required dependencies using npm: `npm install @tensorflow/tfjs @tensorflow-models/mobilenet @tensorflow/tfjs-node`.\n3. Prepare an image file that you want to classify.\n4. Run the script with the path to the image file as an argument: `node classify.js \u003cIMAGE_FILE_PATH\u003e`.\n\n---\n\n**Conclusion:**\nThis application demonstrates the integration of TensorFlow.js with Node.js to perform image classification tasks. By leveraging pre-trained models like MobileNet, users can easily classify images without the need for complex machine learning infrastructure. The provided README offers clear instructions on how to use the application effectively.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheoddysey%2Fimage-classification-node-tensorflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheoddysey%2Fimage-classification-node-tensorflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheoddysey%2Fimage-classification-node-tensorflow/lists"}