Updated README.md
Browse files
README.md
CHANGED
|
@@ -53,7 +53,17 @@ num_params: 30,389,784
|
|
| 53 |
|
| 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 |
-
## Use
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
```python
|
| 59 |
#!/usr/bin/env python3
|
|
@@ -124,6 +134,13 @@ def main():
|
|
| 124 |
if __name__ == "__main__":
|
| 125 |
main()
|
| 126 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
### BibTeX entry and citation info
|
| 128 |
|
| 129 |
```bibtex
|
|
|
|
| 53 |
|
| 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 |
+
## How to Use
|
| 57 |
+
|
| 58 |
+
**1. Install Dependencies** Ensure your Python environment is set up with the required libraries. Run the following command in your terminal:
|
| 59 |
+
|
| 60 |
+
```bash
|
| 61 |
+
pip install numpy Pillow huggingface_hub ai-edge-litert
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
**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.
|
| 65 |
+
|
| 66 |
+
**3. Save the Script** Create a new file named `classify.py`, paste the script below into it, and save the file:
|
| 67 |
|
| 68 |
```python
|
| 69 |
#!/usr/bin/env python3
|
|
|
|
| 134 |
if __name__ == "__main__":
|
| 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 |
### BibTeX entry and citation info
|
| 145 |
|
| 146 |
```bibtex
|