Awesome
nnio.l
A python package that you can use to create neural networks with one line of code.
Requirements:
Tensorflow==2.4.0
scikit-learn==0.24.0
opencv-python
Supported architectures:
- Multilayer Perceptron [Image classification]
- Convolutional Nerual Network [Image classification]
Dataset format:
Dataset
|__LABEL 1
|__IMG 1
|__IMG 2
.
.
|__IMG n
|__LABEL 2
|__IMG 1
|__IMG 2
.
.
|__IMG n
.
.
.
|__LABEL n
|__IMG 1
|__IMG 2
.
.
|__IMG n
Example [Creating and training a new MLP]:
import nniol
nn = DenseNet(use_pretrained_model=False, path_of_dataset='<PATH OF DATASET HERE>', neurons_per_layer=[<LIST OF INTEGERS SPECIFYING THE NUMBER OF NEURONS IN EACH LAYER>], activations=[<LIST OF STRINGS SPECIFYING ACTIVATION FUNCTIONS FOR EACH LAYER>], model_path='<PATH TO SAVE MODEL>', epochs=<NUMBER OF EPOCHS TO TRAIN>)
nn.predict('<PATH OF DATA TO PASS FOR INFERENCE>')
Example [USING A PRETRAINED MLP]:
import nniol
nn = DenseNet(use_pretrained_model=True, model_path='<PATH OF SAVED MODEL>')
nn.predict('<PATH OF DATA TO PASS FOR INFERENCE>')
Example [Creating and training a new CNN]:
import nniol
nn = ConvNet(use_pretrained_model=False, path_of_dataset='<PATH OF DATASET HERE>', filters_per_layer=[<LIST OF INTEGERS SPECIFYING THE NUMBER OF FILTERS IN EACH LAYER>], activations=[<LIST OF STRINGS SPECIFYING ACTIVATION FUNCTIONS FOR EACH LAYER>], model_path='<PATH TO SAVE MODEL>', epochs=<NUMBER OF EPOCHS TO TRAIN>)
nn.predict('<PATH OF DATA TO PASS FOR INFERENCE>')
Example [USING A PRETRAINED CNN]:
import nniol
nn = ConvNet(use_pretrained_model=True, model_path='<PATH OF SAVED MODEL>')
nn.predict('<PATH OF DATA TO PASS FOR INFERENCE>')