{"id":19130527,"url":"https://github.com/princejoogie/item-classifier-python","last_synced_at":"2026-04-25T22:34:35.530Z","repository":{"id":104816542,"uuid":"362668561","full_name":"princejoogie/item-classifier-python","owner":"princejoogie","description":"Item Classifier retraining code with Python","archived":false,"fork":false,"pushed_at":"2022-05-22T11:47:04.000Z","size":31270,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T21:16:48.758Z","etag":null,"topics":["anaconda","python","tensorflow"],"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/princejoogie.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,"zenodo":null}},"created_at":"2021-04-29T02:40:32.000Z","updated_at":"2022-03-17T07:25:16.000Z","dependencies_parsed_at":"2023-05-30T06:30:11.848Z","dependency_job_id":null,"html_url":"https://github.com/princejoogie/item-classifier-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/princejoogie/item-classifier-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princejoogie%2Fitem-classifier-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princejoogie%2Fitem-classifier-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princejoogie%2Fitem-classifier-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princejoogie%2Fitem-classifier-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/princejoogie","download_url":"https://codeload.github.com/princejoogie/item-classifier-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princejoogie%2Fitem-classifier-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32279658,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: 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":["anaconda","python","tensorflow"],"created_at":"2024-11-09T06:11:27.228Z","updated_at":"2026-04-25T22:34:35.525Z","avatar_url":"https://github.com/princejoogie.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# item-classifier-python\r\n\r\nA reusable library for classifying different objects\r\n\r\n## Install python requirements with Anaconda\r\n\r\n1. `conda create -n tf python=3.8.8`\r\n2. `conda activate tf`\r\n3. cd into the repository\r\n4. `pip install -r requirements.txt`\r\n\r\n## Getting the tick dataset\r\n\r\n1. Obtain your dataset.\r\n2. Extract the `dataset.zip` into `src/tf_files/dataset`\r\n3. rename all files to .jpg with `dir | Rename-Item -NewName { $_.name -replace \".PNG\",\".jpg\"}`\r\n\r\n## Retrain and Conversion\r\n\r\n1. `(Optional)` Start tensorboard\r\n\r\n```{python}\r\ntensorboard --logdir tf_files/training_summaries \u0026\r\n```\r\n\r\n#### note that the \"`^`\" is an escape character and may vary with the terminal you're using. This works for command prompt in windows.\r\n\r\n2. Run retrain script\r\n\r\n```{python}\r\npython -m scripts.retrain ^\r\n  --image_dir=tf_files/dataset ^\r\n  --model_dir=tf_files/models ^\r\n  --architecture=mobilenet_0.50_224 ^\r\n  --output_graph=tf_files/model_graph.pb ^\r\n  --output_labels=tf_files/model_labels.txt ^\r\n  --bottleneck_dir=tf_files/bottlenecks ^\r\n  --summaries_dir=tf_files/training_summaries/mobilenet_0.50_224 ^\r\n  --how_many_training_steps=400 ^\r\n  --learning_rate=0.001\r\n```\r\n\r\n3. `(Optional)` Quantize the graph for better performance in javascript\r\n\r\n```{python}\r\npython -m scripts.quantize_graph ^\r\n  --input=tf_files/model_graph.pb ^\r\n  --output=tf_files/quantized_model_graph.pb ^\r\n  --output_node_names=final_result ^\r\n  --mode=weights_rounded\r\n```\r\n\r\n4. Convert model into tensorflowjs format\r\n\r\n```{python}\r\ntensorflowjs_converter ^\r\n  --input_format=tf_frozen_model ^\r\n  --output_node_names=final_result ^\r\n  tf_files/quantized_model_graph.pb ^\r\n  tf_files/web\r\n```\r\n\r\n## Prediction\r\n\r\n```{python}\r\npython -m scripts.predict ^\r\n  --image=tf_files/dataset/your_image.jpg ^\r\n  --labels=tf_files/model_labels.txt ^\r\n  --graph=tf_files/model_graph.pb\r\n```\r\n\r\nThe converted tensorflowjs model is in `tf_files/web` directory\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprincejoogie%2Fitem-classifier-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprincejoogie%2Fitem-classifier-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprincejoogie%2Fitem-classifier-python/lists"}