OBJECT CLASSIFIER
Clone this repository
- for SSH
git clone git@github.com:1chimaruGin/Object-classifier.git
- for https
https://github.com/1chimaruGin/Object-classifier.git
Requirements
pip install -U requirements.txt
Dataset
- the dataset directory should be the following format.
# for example, dog vs cat classification
data/
-train/
dog/
-*.jpg or *.png
cat/
-*.jpg or *.png
-val/
dog/
-*.jpg or *.png
cat/
-*.jpg or *.png
Usage with Argparse
cd Object-classifier/objifier
-
Update number of classes and names in data.yaml
-
For training model(ResNet)
$ python main.py -m [mode: train] -opt [optimizer: (default='SGD')] -epochs [epochs: (default=25)]
- For training model(EfficientNet)
$ python main.py -m [mode: train] -opt [optimizer] -epochs [epochs] -backbone [backbone: efficientNet] -lvl [efficientNet level]
- For prediction
$ python main.py -m [mode: predict] -im [input image] - backbone [backbone: ResNet or efficientNe] -lvl [efficientNet level]
Usage with YAML (via pip)
Create a YAML file as sample below:
- For training [train.yaml]
nc: 10
# names: ['mantled_howler', 'patas_monkey', 'bald_uakari', 'japanese_macaque', 'pygmy_marmoset',
# 'white_headed_capuchin', 'silvery_marmoset', 'common_squirrel_monkey', 'black_headed_night_monkey','nilgiri_langur' ]
names: ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
backbone: 'efficientNet'
efftlvl: 0
optimizer: 'Adam'
mode: 'train'
epoch: 2
load: False
output: 'output'
dataset_path: null
- For prediction [predict.yaml]
nc: 10
# names: ['mantled_howler', 'patas_monkey', 'bald_uakari', 'japanese_macaque', 'pygmy_marmoset',
# 'white_headed_capuchin', 'silvery_marmoset', 'common_squirrel_monkey', 'black_headed_night_monkey','nilgiri_langur' ]
names: ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
backbone: 'efficientNet'
efftlvl: 0
output: 'output'
image: 'baobao.jpg'
Metadata
Release files for objifier 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| objifier-0.1.1.tar.gz | 22.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| objifier-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.4 kB
Release files / objifier-0.1.1.tar.gz
| Download URL | objifier-0.1.1.tar.gz |
|---|---|
| Size | 22.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5269c5a7d05cc899b73c1dbd59c45799817cac7c073d0f10ee9b117fd1cd640c
|
|
BLAKE2b-256 checksum How to use checksums |
40e3d3ec6677e0ad2d03e7171211ab5b9d867f48a78c2af80c131198018f77d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2
|
Release files / objifier-0.1.1-py3-none-any.whl
| Download URL | objifier-0.1.1-py3-none-any.whl |
|---|---|
| Size | 24.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2e69804c0a833b4aa82f9c084ec328a5d176e9b61de754a10e53694eac61db3
|
|
BLAKE2b-256 checksum How to use checksums |
0f9a7526aeac0d99b8bd5c4dd3d84b629c2beef731bef58bfeba0d9c0b7f6f94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2
|