{"id":15290519,"url":"https://github.com/koji/ictrainer","last_synced_at":"2025-08-16T11:07:46.339Z","repository":{"id":62570247,"uuid":"172283924","full_name":"koji/icTrainer","owner":"koji","description":"image classifier train program","archived":false,"fork":false,"pushed_at":"2019-06-21T19:21:47.000Z","size":78424,"stargazers_count":4,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-21T03:42:44.575Z","etag":null,"topics":["cli","image-classification","keras","machine-learning","pypi-packages","python","tensorflow","tool"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/ictrainer/","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/koji.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}},"created_at":"2019-02-24T01:39:43.000Z","updated_at":"2020-10-27T05:20:15.000Z","dependencies_parsed_at":"2022-11-03T17:15:30.319Z","dependency_job_id":null,"html_url":"https://github.com/koji/icTrainer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/koji/icTrainer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koji%2FicTrainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koji%2FicTrainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koji%2FicTrainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koji%2FicTrainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koji","download_url":"https://codeload.github.com/koji/icTrainer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koji%2FicTrainer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270702562,"owners_count":24630877,"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-08-16T02:00:11.002Z","response_time":91,"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":["cli","image-classification","keras","machine-learning","pypi-packages","python","tensorflow","tool"],"created_at":"2024-09-30T16:08:30.215Z","updated_at":"2025-08-16T11:07:46.318Z","avatar_url":"https://github.com/koji.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"auto\" height=\"auto\" src=\"https://github.com/koji/icTrainer/blob/master/assets/top.png?raw=true\" style=\"border: none;\noutline: none;\"\u003e\n\u003c/p\u003e\n\n[![PyPI version](https://badge.fury.io/py/pypi.svg)](https://pypi.org/project/ictrainer/)\n### icTrainer is a python module which allows users to train image classifier easily\n\nBasically, this module is for `python3`\n## Install\n\n```\n$ pip install ictrainer\n```\nAlso you can install manually.  \n```\nclone repo\n$ git https://github.com/koji/icTrainer.git\n$ cd icTrainer/ictrainer\n$ python setup.py install\n```\n\n## How to Use\nIn this gude, we will create a dog/cat image classifier.\n### 1.Collect Images\nhttps://icrawler.readthedocs.io/en/latest/   \n\n```\n$ ictrainer --mode collect --keyword dog -n 250\n$ ictrainer --mode collect --keyword cat -n 250\n```\nYou'll have dogs \u0026 cats images under `dataset` folder.\n\n\n### 2. Resize images\nIn this step, we will change all images size for training. The current input size must be `320 x 180`(required).\nThis step may be mess up images you collected, so you need to check all images manually. In the furture, there will be a function that save your time.  \n\n```\n$ ictrainer --mode resize --target dog\n$ ictrainer --mode resize --target cat\n```\n\nFor people want to use resize mode for other thing, you can use reize images with the following command.  \nThe folder structure should be the same the above.  \n```\n$ ictrainer --mode resize --target cat --image_width 480 --image_height 320\n```\n\n### 3.Create folders for classes\nThis step, we'll need to create folders and distribute images to `train` \u0026 `validation` folder.\n\n#### 3-1. create folders\nCreate a couple of folders under dataset.   \nThis step will be automated in the future.  \n```\n dataset\n    ├── train\n    │   ├── cat\n    │   └── dog\n    └── val\n        ├── cat\n        └── dog\n```\n\n#### 3-2. distribute images\nMove images we got via `image collect mode`. In this case, probably we have 250 images for each other.\nWe will put 225 images for train and 25 images for validation so that `train/dog` has 225 images and `validation/dog` has 25 images. The cats should be the same.\n\n### 4.Train Images\nThere are some options we need to put. The most important one is `--classes` which will be labels. In this case, we have dog \u0026 cat, so we need to put them as classes.\n`--batch`: batch size default 16        \n`--epoch`: epoch default 30       \n`--mname`: output model name      \n`--lr`: learning rate default 1e-3       \n`momentum`: mementum default 0.9     \n\nWe will use default settings.\n\n```\n$ ictrainer --mode train --classes \"cat\" \"dog\" --mname \"dogAndcat_\"\n```\n\n\n### 5 Face detection\nFrom 0.2.0 ictrainer allows you to use face detection. The command is following. This function is using `OpenCV` Cascade filter to detect front faces. When you successfully run this command, ictrainer creates `output` folder and there are faces and something which means still you need check all image by yourself.   \n--mode face    \n--target target folder    \n```\n$ ictrainer --mode face --target dataset/celeb\n```\n\n\n## video\n#### `image collecting mode`\nhttps://www.youtube.com/watch?v=k5r_xrW_cxE   \n\n\n\n## pre-train model\n#### `smart device`   \nhttps://github.com/koji/icTrainer/blob/master/model/smartdevice_epoch30.h5      \n```\nclasses = ['echo', 'echoplus', 'echoshow', 'googlehome', 'googlehomemini', 'nest']   \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoji%2Fictrainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoji%2Fictrainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoji%2Fictrainer/lists"}