Instructions to use litert-community/efficientnet_b2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use litert-community/efficientnet_b2 with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Commit ·
0fa8760
1
Parent(s): 6be6c2b
Updated README.md (#2)
Browse files- Updated README.md (750783bc9351f117a66df8235a59398029fc565d)
Co-authored-by: Akash Verma <akashvverma1995@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -11,7 +11,7 @@ datasets:
|
|
| 11 |
base_model:
|
| 12 |
- google/efficientnet-b2
|
| 13 |
model-index:
|
| 14 |
-
- name:
|
| 15 |
results:
|
| 16 |
- task:
|
| 17 |
type: image-classification
|
|
@@ -54,8 +54,17 @@ num_params: 9,109,994
|
|
| 54 |
The model files were converted from pretrained weights from PyTorch Vision. The models may have their own licenses or terms and conditions derived from PyTorch Vision and the dataset used for training. It is your responsibility to determine whether you have permission to use the models for your use case.
|
| 55 |
|
| 56 |
|
| 57 |
-
## Use
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
```python
|
| 60 |
#!/usr/bin/env python3
|
| 61 |
import argparse, json
|
|
@@ -126,6 +135,13 @@ if __name__ == "__main__":
|
|
| 126 |
main()
|
| 127 |
```
|
| 128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
### BibTeX entry and citation info
|
| 130 |
|
| 131 |
```bibtex
|
|
|
|
| 11 |
base_model:
|
| 12 |
- google/efficientnet-b2
|
| 13 |
model-index:
|
| 14 |
+
- name: litert-community/efficientnet_b2
|
| 15 |
results:
|
| 16 |
- task:
|
| 17 |
type: image-classification
|
|
|
|
| 54 |
The model files were converted from pretrained weights from PyTorch Vision. The models may have their own licenses or terms and conditions derived from PyTorch Vision and the dataset used for training. It is your responsibility to determine whether you have permission to use the models for your use case.
|
| 55 |
|
| 56 |
|
| 57 |
+
## How to Use
|
| 58 |
|
| 59 |
+
**1. Install Dependencies** Ensure your Python environment is set up with the required libraries. Run the following command in your terminal:
|
| 60 |
+
|
| 61 |
+
```bash
|
| 62 |
+
pip install numpy Pillow huggingface_hub ai-edge-litert
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
**2. Prepare Your Image** The script expects an image file to analyze. Make sure you have an image (e.g., cat.jpg or car.png) saved in the same working directory as your script.
|
| 66 |
+
|
| 67 |
+
**3. Save the Script** Create a new file named `classify.py`, paste the script below into it, and save the file:
|
| 68 |
```python
|
| 69 |
#!/usr/bin/env python3
|
| 70 |
import argparse, json
|
|
|
|
| 135 |
main()
|
| 136 |
```
|
| 137 |
|
| 138 |
+
**4. Execute the Python Script** Run the below command:
|
| 139 |
+
|
| 140 |
+
```bash
|
| 141 |
+
python classify.py --image cat.jpg
|
| 142 |
+
```
|
| 143 |
+
|
| 144 |
+
|
| 145 |
### BibTeX entry and citation info
|
| 146 |
|
| 147 |
```bibtex
|