{"id":19831817,"url":"https://github.com/arunmichaeldsouza/tensorflow-image-detection","last_synced_at":"2025-10-11T16:45:24.169Z","repository":{"id":68705222,"uuid":"92591678","full_name":"ArunMichaelDsouza/tensorflow-image-detection","owner":"ArunMichaelDsouza","description":"A generic image detection program that uses Google's Machine Learning library, Tensorflow and a pre-trained Deep Learning Convolutional Neural Network model called Inception.","archived":false,"fork":false,"pushed_at":"2019-06-13T19:19:17.000Z","size":1182,"stargazers_count":330,"open_issues_count":8,"forks_count":88,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-05-20T00:02:48.153Z","etag":null,"topics":["convolutional-neural-networks","deep-learning","deep-neural-networks","image-detection","machine-learning","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","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/ArunMichaelDsouza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":"arunmichaeldsouza","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2017-05-27T10:27:19.000Z","updated_at":"2025-03-30T21:19:29.000Z","dependencies_parsed_at":"2023-05-26T04:30:14.288Z","dependency_job_id":null,"html_url":"https://github.com/ArunMichaelDsouza/tensorflow-image-detection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ArunMichaelDsouza/tensorflow-image-detection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArunMichaelDsouza%2Ftensorflow-image-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArunMichaelDsouza%2Ftensorflow-image-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArunMichaelDsouza%2Ftensorflow-image-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArunMichaelDsouza%2Ftensorflow-image-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArunMichaelDsouza","download_url":"https://codeload.github.com/ArunMichaelDsouza/tensorflow-image-detection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArunMichaelDsouza%2Ftensorflow-image-detection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007975,"owners_count":26084369,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["convolutional-neural-networks","deep-learning","deep-neural-networks","image-detection","machine-learning","tensorflow"],"created_at":"2024-11-12T11:34:57.864Z","updated_at":"2025-10-11T16:45:24.138Z","avatar_url":"https://github.com/ArunMichaelDsouza.png","language":"Python","funding_links":["https://patreon.com/arunmichaeldsouza","https://www.patreon.com/arunmichaeldsouza","https://www.patreon.com/bePatron?u=8841116"],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/ArunMichaelDsouza/tensorflow-image-detection/raw/master/icon.png\" width=\"250\" height=\"auto\" alt=\"tensorflow-image-detection icon\"/\u003e\n\n# tensorflow-image-detection \u003cspan class=\"badge-patreon\"\u003e\u003ca href=\"https://www.patreon.com/arunmichaeldsouza\" title=\"Donate to this project using Patreon\"\u003e\u003cimg src=\"https://img.shields.io/badge/patreon-donate-blue.svg\" alt=\"Patreon donate button\" /\u003e\u003c/a\u003e\u003c/span\u003e\nA generic image detection program that uses Google's Machine Learning library, [Tensorflow](https://www.tensorflow.org/) and a pre-trained Deep Learning Convolutional Neural Network model called [Inception](https://research.googleblog.com/2016/03/train-your-own-image-classifier-with.html).\n\nThis model has been pre-trained for the [ImageNet](http://image-net.org/) Large Visual Recognition Challenge using the data from 2012, and it can differentiate between 1,000 different classes, like Dalmatian, dishwasher etc.\nThe program applies Transfer Learning to this existing model and re-trains it to classify a new set of images.\n\nThis is a generic setup and can be used to classify almost any kind of image. I created a small demo that classifies two image data sets - cat and dog images, and returns a prediction score denoting the possibility of it being an image of a cat or a dog.\n\n\u003cbr/\u003e\n\n## Installation\nMake sure you have [Python 3](https://www.python.org/downloads/) installed, then install [Tensorflow](https://www.tensorflow.org/install/) on your system, and clone this repo.\n\n\u003cbr/\u003e\n\n## Usage\n\n### Prepare the image data sets\nIn order to start the transfer learning process, a folder named ``training_dataset`` needs to be created in the root of the project folder. This folder will contain the image data sets for all the subjects, for whom the classification is to be performed.\n\nCreate the ``training_dataset`` folder and add the images for all the data sets in the following manner -\n\n```javascript\n/\n|\n|\n---- /training_dataset\n|    |\n|    |\n|    ---- /cat\n|    |    cat1.jpg\n|    |    cat2.jpg\n|    |    ...\n|    |\n|    |\n|    ---- /dog\n|         dog1.jpg\n|         dog2.jpg\n|         ...\n|\n|     \n```\nThis enables classification of images between the ``cat`` and ``dog`` data sets.\n\n\u003e Make sure to include multiple variants of the subject (side profiles, zoomed in images etc.), the more the images, the better is the result.\n\n### Initiate transfer learning\nGo to the project directory and run -\n\n```javascript\n$ bash train.sh\n```\nThis script installs the ``Inception`` model and initiates the re-training process for the specified image data sets.\n\nOnce the process is complete, it will return a training accuracy somewhere between ``85% - 100%``.\n\nThe ``training summaries``, ``retrained graphs`` and ``retrained labels`` will be saved in a folder named ``tf_files``.\n\n### Classify objects\n\n```javascript\npython3 classify.py\n```\n\nThis opens up the file dialog using which you can select your input file.\n\n\u003cimg src=\"https://raw.githubusercontent.com/ArunMichaelDsouza/tensorflow-image-detection/master/file-dialog.png\"/\u003e\n\nOnce the input file is selected, the classifier will output the predictions for each data set. A prediction score between ``0.8`` to ``1`` is considered to be optimal.\n\n\u003cimg src=\"https://raw.githubusercontent.com/ArunMichaelDsouza/tensorflow-image-detection/master/cli-output.png\"/\u003e\n\n\u003cbr/\u003e\n\n## Results\n\u003cimg src=\"https://raw.githubusercontent.com/ArunMichaelDsouza/tensorflow-image-detection/master/result.png\"/\u003e\n\n\u003cbr/\u003e\n\n## Contributors\n\n| [\u003cimg src=\"https://avatars3.githubusercontent.com/u/4924614\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eArun Michael Dsouza\u003c/b\u003e\u003c/sub\u003e](https://github.com/ArunMichaelDsouza)\u003cbr /\u003e| [\u003cimg src=\"https://avatars3.githubusercontent.com/u/11679543\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRoyal Bhati\u003c/b\u003e\u003c/sub\u003e](https://github.com/royalbhati)\u003cbr /\u003e|\n| :---: | :---: |\n\n\u003cbr/\u003e\n\n## Support\n\nIf you'd like to help support the development of the project, please consider backing me on Patreon -\n\n[\u003cimg src=\"https://arunmichaeldsouza.com/img/patreon.png\" width=\"180px;\"/\u003e](https://www.patreon.com/bePatron?u=8841116)\n\n\u003cbr/\u003e\n\n## License\nMIT License\n\nCopyright (c) 2017 Arun Michael Dsouza\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nAll training dataset and input images have been taken from [freepik.com](https://www.freepik.com/).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farunmichaeldsouza%2Ftensorflow-image-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farunmichaeldsouza%2Ftensorflow-image-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farunmichaeldsouza%2Ftensorflow-image-detection/lists"}