{"id":23093183,"url":"https://github.com/crispengari/air-ai","last_synced_at":"2026-04-13T14:32:06.620Z","repository":{"id":141093737,"uuid":"576838833","full_name":"CrispenGari/AIR-AI","owner":"CrispenGari","description":"🐶🐈 Animal Image Recognition (AIR) is an AI tool for image recognition for with classes of animals. AIR also exposes the GRAPHQL and REST endpoint locally for doing image classification for 10 diffrent animals.","archived":false,"fork":false,"pushed_at":"2022-12-12T18:24:17.000Z","size":1935,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-11T18:39:03.333Z","etag":null,"topics":["ariadne","artificial-intelligence","flask","graphql","image-recognition","javascript","python","react","react-native","rest-api","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/CrispenGari.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":"2022-12-11T06:21:27.000Z","updated_at":"2024-10-21T00:57:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"7232963d-19d7-4c1c-a9f4-3c6dfcf3d7b8","html_url":"https://github.com/CrispenGari/AIR-AI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CrispenGari/AIR-AI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrispenGari%2FAIR-AI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrispenGari%2FAIR-AI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrispenGari%2FAIR-AI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrispenGari%2FAIR-AI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CrispenGari","download_url":"https://codeload.github.com/CrispenGari/AIR-AI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrispenGari%2FAIR-AI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31757477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T13:27:56.013Z","status":"ssl_error","status_checked_at":"2026-04-13T13:21:23.512Z","response_time":93,"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":["ariadne","artificial-intelligence","flask","graphql","image-recognition","javascript","python","react","react-native","rest-api","typescript"],"created_at":"2024-12-16T21:46:38.723Z","updated_at":"2026-04-13T14:32:06.593Z","avatar_url":"https://github.com/CrispenGari.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Animal Image Recognition (AIR)\n\n`AIR` is a GraphQL and REST built with `flask` and `ariadne` to perform image classification based on `10` animals.\n\n```\n- Cat\n- Cow\n- Dog\n- Elephant\n- Gorilla\n- Hippo\n- Monkey\n- Panda\n- Tiger\n- Zebra\n```\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"logo.png\" alt=\"logo\" width=\"30%\"/\u003e\n\u003cp\u003e\n\nAnimal Image Recognition is an AI api for performing image classification task based on `10` animals that were used to train the model.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"cover.jpg\" alt=\"cover\" width=\"100%\"/\u003e\n\u003cp\u003e\n\n### AIR Tool (mobile)\n\nAIR tool is an AI tool for mobile application that is used to perform some basic animal image classification task in real-time. Given an image from a camera or an imported image the application must be able to classify the name or class of the animal on that picture in real-time.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"1.jpeg\" alt=\"cover\" width=\"200\"/\u003e\n\u003cimg src=\"2.jpeg\" alt=\"cover\" width=\"200\"/\u003e\n\u003cimg src=\"3.jpeg\" alt=\"cover\" width=\"200\"/\u003e\n\u003cimg src=\"0.jpeg\" alt=\"cover\" width=\"200\"/\u003e\n\u003cp\u003e\n\n### API\n\nAIR api is a simple rest api that is served at `http://localhost:3001/api/v1/classify` and is able to the name of an animal from an image.\n\n### API response\n\nIf a proper `POST` request is sent to the server at `http://127.0.0.1:3001/api/v1/classify` we will be able to get `~80%` accurate predictions of the name of the animal on that image.\n\n### cURL request\n\nIf a `cURL` request is send to the server at localhost which looks as follows:\n\n```shell\ncURL -X POST -F image=@cat.jpeg http://127.0.0.1:3001/api/v1/classify\n```\n\nThe server will respond with the `API` response which looks as follows:\n\n```json\n{\n  \"predictions\": {\n    \"predictions\": [\n      {\n        \"class_name\": \"Cat\",\n        \"label\": 0,\n        \"probability\": 0.9900000095367432\n      },\n      {\n        \"class_name\": \"Cow\",\n        \"label\": 1,\n        \"probability\": 0.0\n      },\n      {\n        \"class_name\": \"Dog\",\n        \"label\": 2,\n        \"probability\": 0.009999999776482582\n      },\n      {\n        \"class_name\": \"Elephant\",\n        \"label\": 3,\n        \"probability\": 0.0\n      },\n      {\n        \"class_name\": \"Gorilla\",\n        \"label\": 4,\n        \"probability\": 0.0\n      },\n      {\n        \"class_name\": \"Hippo\",\n        \"label\": 5,\n        \"probability\": 0.0\n      },\n      {\n        \"class_name\": \"Monkey\",\n        \"label\": 6,\n        \"probability\": 0.0\n      },\n      {\n        \"class_name\": \"Panda\",\n        \"label\": 7,\n        \"probability\": 0.0\n      },\n      {\n        \"class_name\": \"Tiger\",\n        \"label\": 8,\n        \"probability\": 0.0\n      },\n      {\n        \"class_name\": \"Zebra\",\n        \"label\": 9,\n        \"probability\": 0.0\n      }\n    ],\n    \"top_prediction\": {\n      \"class_name\": \"Cat\",\n      \"label\": 0,\n      \"probability\": 0.9900000095367432\n    }\n  },\n  \"success\": true\n}\n```\n\n### GraphQL endpoint\n\nGraphQL endpoint is served at `http://localhost:3001/graphql` sending a graphql request at this endpoint with an image file for example as follows using `cURL`:\n\n```shell\ncurl http://localhost:3001/graphql -F operations='{ \"query\": \"mutation ClassifyAnimal($input: AnimalInput!) { predictAnimal(input: $input) { error { field message } ok prediction { topPrediction {  label probability className } predictions {  label probability className } } } }\", \"variables\": { \"input\": {\"image\": null} } }'  -F map='{ \"0\": [\"variables.input.image\"] }'  -F 0=@cat.jpeg\n```\n\nWill yield the results that looks as follows:\n\n```json\n{\n  \"data\": {\n    \"predictAnimal\": {\n      \"error\": null,\n      \"ok\": true,\n      \"prediction\": {\n        \"predictions\": [\n          {\n            \"className\": \"Cat\",\n            \"label\": 0,\n            \"probability\": 0.9900000095367432\n          },\n          {\n            \"className\": \"Cow\",\n            \"label\": 1,\n            \"probability\": 0.0\n          },\n          {\n            \"className\": \"Dog\",\n            \"label\": 2,\n            \"probability\": 0.009999999776482582\n          },\n          {\n            \"className\": \"Elephant\",\n            \"label\": 3,\n            \"probability\": 0.0\n          },\n          {\n            \"className\": \"Gorilla\",\n            \"label\": 4,\n            \"probability\": 0.0\n          },\n          {\n            \"className\": \"Hippo\",\n            \"label\": 5,\n            \"probability\": 0.0\n          },\n          {\n            \"className\": \"Monkey\",\n            \"label\": 6,\n            \"probability\": 0.0\n          },\n          {\n            \"className\": \"Panda\",\n            \"label\": 7,\n            \"probability\": 0.0\n          },\n          {\n            \"className\": \"Tiger\",\n            \"label\": 8,\n            \"probability\": 0.0\n          },\n          {\n            \"className\": \"Zebra\",\n            \"label\": 9,\n            \"probability\": 0.0\n          }\n        ],\n        \"topPrediction\": {\n          \"className\": \"Cat\",\n          \"label\": 0,\n          \"probability\": 0.9900000095367432\n        }\n      }\n    }\n  }\n}\n```\n\n### Notebooks\n\nThe notebooks for training the model that is being used to perform image classification on animals is found [here](https://github.com/CrispenGari/cv-torch/blob/main/03_ANIMAL_IMAGE_RECOGNITION/01_ANIMAL_IMAGE_RECOGNITION.ipynb).\n\n### License\n\nIn this simple AI tool i'm using `MIT` license which read as follows:\n\n```shell\nMIT License\n\nCopyright (c) 2022 crispengari\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```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrispengari%2Fair-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrispengari%2Fair-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrispengari%2Fair-ai/lists"}