Meta Learning (ProtoMAML) Package
Project description
MetaVisionary
What the Algorithm Does?
MetaVisionary is a Python package designed to implement meta-learning algorithms tailored for few-shot learning scenarios. It empowers users to train machine learning models efficiently even when confronted with datasets containing a limited number of samples and classes that bear resemblance to each other.
Parameters
train_data_dir: The directory containing the training data.test_data_dir: The directory containing the test data.num_classes: The number of classes in the dataset.learning_rate: The learning rate for the optimizer.meta_step_size: The meta-learning step size.inner_batch_size: Batch size for inner loop training.eval_batch_size: Batch size for evaluation.meta_iters: Number of meta-iterations.eval_iters: Number of evaluation iterations.inner_iters: Number of inner loop iterations.eval_interval: Interval for evaluation.train_shots: Number of shots for training.shots: Number of shots for evaluation.img_height: Height of input images.img_width: Width of input images.
Installation
You can install MetaVisionary using the following command:
pip install meta-visionary
Importing
To use MetaVisionary, you can import the meta_learning function:
from meta_visionary.few_shot_meta import meta_learning
Calling the Function
To call the meta_learning function, simply provide the directories containing the training and test data, along with the number of classes, like so:
def main():
train_data_dir = 'PATH'
test_data_dir = 'PATH'
meta_learning(train_data_dir, test_data_dir, num_classes=2, learning_rate=0.003, meta_step_size=0.25,
inner_batch_size=25, eval_batch_size=25, meta_iters=2000, eval_iters=5, inner_iters=4,
eval_interval=1, train_shots=20, shots=5, img_height=28, img_width=28)
if __name__ == "__main__":
main()
The default values for the parameters of the meta_learning function are provided. You can adjust these values according to your specific requirements when calling the function.
Citation
If you use MetaVisionary in your research work, please consider citing the following paper:
"If Human Can Learn from Few Samples, Why Can’t AI? An Attempt On Similar Object Recognition With Few Training Data Using Meta-Learning" Link to Paper
@inproceedings{dutta2023if,
title={If Human Can Learn from Few Samples, Why Can’t AI? An Attempt On Similar Object Recognition With Few Training Data Using Meta-Learning},
author={Dutta, Subhayu and Goswami, Saptiva and Debnath, Sonali and Adhikary, Subhrangshu and Majumder, Anandaprova},
booktitle={2023 IEEE North Karnataka Subsection Flagship International Conference (NKCon)},
pages={1--6},
year={2023},
organization={IEEE}
}
Support and Code of Conduct
If you encounter any issues with MetaVisionary or have any questions, feel free to reach out to us via GitHub issues. We welcome contributions and feedback from the community.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file metavisionary-0.2.tar.gz.
File metadata
- Download URL: metavisionary-0.2.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2da60fa191d0a9190db7ae689a939d47a795b973b5435c9d8a28a0d6412f1d69
|
|
| MD5 |
7ca015a500948ec39ac5c34c1be9174a
|
|
| BLAKE2b-256 |
a65468854ebb07bf2f953f2d59250b1fbc4b854e21fa38cb9b7a9db3c0efe91f
|
File details
Details for the file MetaVisionary-0.2-py3-none-any.whl.
File metadata
- Download URL: MetaVisionary-0.2-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6449be12cfbbf33aea18bce8206dfdb2a44807b3e694de3f31c23bd3c77eb769
|
|
| MD5 |
26278fe93dab73b064bf7b1d435ad21b
|
|
| BLAKE2b-256 |
5dca3a1d5059b63cda9b457700ee79100743dfbacac08870524052a55398df36
|