Metadata-Version: 2.4
Name: cvip_labs
Version: 0.5.0
Summary: CVIP 6th sem lab helpers - MNIST and CNN experiments
Author: cvip_labs
Project-URL: Homepage, https://pypi.org/project/cvip_labs
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: scikit-learn
Requires-Dist: torch
Requires-Dist: tensorflow
Requires-Dist: opencv-python

# cvip_labs

CVIP 6th sem lab helpers.

## Install
pip install cvip_labs

## Exp 4 - MNIST SVM + Neural Network
from cvip_labs import run_exp4
X_train, X_test, y_train, y_test = run_exp4.load_data()
svm_model = run_exp4.train_svm(X_train, y_train)
svm_acc   = run_exp4.evaluate(svm_model, X_test, y_test)
nn_model  = run_exp4.train_nn(X_train, y_train, epochs=5)
nn_acc    = run_exp4.evaluate_nn(nn_model, X_test, y_test)
run_exp4.plot_results()

## Exp 5 - CNN Image Classifier
from cvip_labs import run_exp5
train, val, test, class_names = run_exp5.load_data(data_dir='exp5')
model = run_exp5.build_model()
model.summary()
hist  = run_exp5.train_model(model, train, val, epochs=20)
run_exp5.plot_results(hist)
run_exp5.evaluate(model, test)
run_exp5.predict(model, class_names, img_path='images6.jpg')
run_exp5.save_model(model)
