Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -1,221 +1,71 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
-
|
9 |
-
-
|
10 |
-
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
```
|
29 |
-
dakotaai-demos/
|
30 |
-
βββ apps/ # Demo applications
|
31 |
-
β βββ image-classifier/ # AI Image Classification Demo
|
32 |
-
β β βββ pages/ # Next.js pages
|
33 |
-
β β βββ styles/ # Component styles
|
34 |
-
β β βββ public/ # Static assets
|
35 |
-
β β βββ package.json # App-specific dependencies
|
36 |
-
β βββ [future-demos]/ # Additional demos
|
37 |
-
βββ packages/ # Shared packages (future)
|
38 |
-
βββ vercel.json # Vercel configuration
|
39 |
-
βββ package.json # Root configuration
|
40 |
-
```
|
41 |
-
|
42 |
-
## π― **Current Demos**
|
43 |
-
|
44 |
-
### **AI Image Classifier**
|
45 |
-
π§ **Transfer Learning Demo**
|
46 |
-
- Upload any image for classification
|
47 |
-
- Uses VGG16 pre-trained model fine-tuned on CIFAR-10
|
48 |
-
- Intelligent feature analysis with confidence scoring
|
49 |
-
- Serverless API with Vercel functions
|
50 |
-
|
51 |
-
**URL:** `https://your-domain.vercel.app/` (or `http://localhost:3000`)
|
52 |
-
|
53 |
-
**Features:**
|
54 |
-
- Drag & drop image upload
|
55 |
-
- Real-time classification results
|
56 |
-
- Top 3 predictions with confidence bars
|
57 |
-
- Educational explanations
|
58 |
-
- Responsive design
|
59 |
-
|
60 |
-
## π§ **Development**
|
61 |
-
|
62 |
-
### **Starting Development**
|
63 |
-
```bash
|
64 |
-
# Install root dependencies
|
65 |
-
npm install
|
66 |
-
|
67 |
-
# Start development server
|
68 |
-
npm run dev
|
69 |
-
```
|
70 |
-
|
71 |
-
### **Adding a New Demo**
|
72 |
-
```bash
|
73 |
-
# Create new app directory
|
74 |
-
mkdir apps/new-demo
|
75 |
-
cd apps/new-demo
|
76 |
-
|
77 |
-
# Initialize Next.js app
|
78 |
-
npx create-next-app . --typescript --tailwind
|
79 |
-
|
80 |
-
# Add to root package.json workspaces
|
81 |
-
# "workspaces": ["apps/image-classifier", "apps/new-demo"]
|
82 |
-
```
|
83 |
-
|
84 |
-
### **Testing API Routes**
|
85 |
-
```bash
|
86 |
-
# Test the classification API
|
87 |
-
curl -X POST http://localhost:3000/api/classify \
|
88 |
-
-F "[email protected]"
|
89 |
-
```
|
90 |
-
|
91 |
-
## π **Deployment**
|
92 |
-
|
93 |
-
### **Automatic Deployment with Vercel**
|
94 |
-
|
95 |
-
#### **Connect to GitHub:**
|
96 |
-
1. Go to [vercel.com](https://vercel.com) and sign in
|
97 |
-
2. Click "Import Project"
|
98 |
-
3. Connect your GitHub repository
|
99 |
-
4. Vercel will automatically detect the monorepo structure
|
100 |
-
|
101 |
-
#### **Monorepo Configuration:**
|
102 |
-
The `vercel.json` file handles routing for the monorepo:
|
103 |
-
- `/` β Image Classifier app
|
104 |
-
- `/api/*` β Serverless API routes
|
105 |
-
- Future apps can have their own routes
|
106 |
-
|
107 |
-
#### **Custom Domains:**
|
108 |
-
```bash
|
109 |
-
# Set up custom domain
|
110 |
-
vercel domains add classifier.dakotaai.us
|
111 |
-
vercel domains add analytics.dakotaai.us
|
112 |
-
vercel domains add forecasting.dakotaai.us
|
113 |
-
```
|
114 |
-
|
115 |
-
### **Environment Variables**
|
116 |
-
Add to Vercel dashboard or `.env.local`:
|
117 |
-
```env
|
118 |
-
VERCEL_URL=https://your-domain.vercel.app
|
119 |
-
# Add API keys for external services if needed
|
120 |
-
```
|
121 |
-
|
122 |
-
## π€ **AI Model Setup**
|
123 |
-
|
124 |
-
### **TensorFlow.js Model**
|
125 |
-
The demo includes tools to convert your trained models:
|
126 |
-
|
127 |
-
```bash
|
128 |
-
# Convert your .h5 model
|
129 |
-
pip install tensorflowjs
|
130 |
-
tensorflowjs_converter --input_format keras your-model.h5 model/
|
131 |
-
```
|
132 |
-
|
133 |
-
Place converted model files in `apps/image-classifier/public/models/`
|
134 |
-
|
135 |
-
### **Serverless API**
|
136 |
-
The `/api/classify` endpoint can be extended to:
|
137 |
-
1. Load your converted TensorFlow.js model
|
138 |
-
2. Process uploaded images
|
139 |
-
3. Return real AI predictions
|
140 |
|
141 |
-
|
142 |
|
143 |
-
|
144 |
-
- Uses CSS Modules for component styling
|
145 |
-
- Responsive design with mobile-first approach
|
146 |
-
- Easy theme customization in `styles/` directory
|
147 |
|
148 |
-
|
149 |
-
- Add new pages in `pages/` directory
|
150 |
-
- Create API routes in `pages/api/` directory
|
151 |
-
- Use shared components from `packages/` (future)
|
152 |
|
153 |
-
|
|
|
|
|
|
|
154 |
|
155 |
-
###
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
|
|
|
|
|
|
|
|
|
|
161 |
|
162 |
-
|
163 |
-
```javascript
|
164 |
-
// Add to _app.js
|
165 |
-
import { Analytics } from '@vercel/analytics/react';
|
166 |
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
<Component {...pageProps} />
|
171 |
-
<Analytics />
|
172 |
-
</>
|
173 |
-
);
|
174 |
-
}
|
175 |
```
|
176 |
|
177 |
-
##
|
178 |
-
|
179 |
-
- **Frontend:** Next.js 14, React, CSS Modules
|
180 |
-
- **Backend:** Vercel Serverless Functions
|
181 |
-
- **AI/ML:** TensorFlow.js, Python (for model training)
|
182 |
-
- **Deployment:** Vercel
|
183 |
-
- **Version Control:** Git, GitHub
|
184 |
-
|
185 |
-
## π **Performance Features**
|
186 |
-
|
187 |
-
- **Edge Functions:** Global CDN for fast responses
|
188 |
-
- **Automatic Scaling:** Handles traffic spikes
|
189 |
-
- **Static Optimization:** Fast page loads
|
190 |
-
- **Image Optimization:** Built-in Next.js optimization
|
191 |
-
|
192 |
-
## π **Security**
|
193 |
|
194 |
-
-
|
195 |
-
-
|
196 |
-
-
|
197 |
-
-
|
198 |
|
199 |
-
##
|
200 |
|
201 |
-
-
|
202 |
-
-
|
203 |
-
- [ ] Add test suites
|
204 |
-
- [ ] Set up CI/CD pipelines
|
205 |
-
- [ ] Add monitoring dashboards
|
206 |
-
- [ ] Implement authentication for admin features
|
207 |
-
|
208 |
-
## π **Support**
|
209 |
-
|
210 |
-
For questions or contributions:
|
211 |
-
- Create GitHub issues
|
212 |
-
- Submit pull requests
|
213 |
-
- Contact Dakota AI team
|
214 |
-
|
215 |
-
## π **License**
|
216 |
-
|
217 |
-
MIT License - feel free to use for your own demo portfolios!
|
218 |
-
|
219 |
-
---
|
220 |
|
221 |
-
|
|
|
1 |
+
---
|
2 |
+
language: en
|
3 |
+
license: mit
|
4 |
+
tags:
|
5 |
+
- cifar10
|
6 |
+
- image-classification
|
7 |
+
- keras
|
8 |
+
- tensorflow
|
9 |
+
- custom-model
|
10 |
+
- dakota-ai
|
11 |
+
datasets:
|
12 |
+
- cifar10
|
13 |
+
model-index:
|
14 |
+
- name: Dakota AI CIFAR-10 Classifier
|
15 |
+
results:
|
16 |
+
- task:
|
17 |
+
type: image-classification
|
18 |
+
name: Image Classification
|
19 |
+
dataset:
|
20 |
+
type: cifar10
|
21 |
+
name: CIFAR-10
|
22 |
+
split: test
|
23 |
+
metrics:
|
24 |
+
- type: accuracy
|
25 |
+
value: 95.0
|
26 |
+
name: Accuracy
|
27 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
+
# Dakota AI CIFAR-10 Image Classifier
|
30 |
|
31 |
+
This is a high-accuracy image classifier trained on the CIFAR-10 dataset using transfer learning with VGG16 as the base model.
|
|
|
|
|
|
|
32 |
|
33 |
+
## Model Details
|
|
|
|
|
|
|
34 |
|
35 |
+
- **Architecture**: VGG16 Transfer Learning + Custom Classification Head
|
36 |
+
- **Input Size**: 224Γ224Γ3 pixels
|
37 |
+
- **Output**: 10 CIFAR-10 classes
|
38 |
+
- **Accuracy**: 95%+ validation accuracy achieved
|
39 |
|
40 |
+
### CIFAR-10 Classes
|
41 |
+
0. Airplane
|
42 |
+
1. Automobile
|
43 |
+
2. Bird
|
44 |
+
3. Cat
|
45 |
+
4. Deer
|
46 |
+
5. Dog
|
47 |
+
6. Frog
|
48 |
+
7. Horse
|
49 |
+
8. Ship
|
50 |
+
9. Truck
|
51 |
|
52 |
+
## Usage
|
|
|
|
|
|
|
53 |
|
54 |
+
```python
|
55 |
+
from huggingface_hub import from_pretrained_keras
|
56 |
+
model = from_pretrained_keras("TrashHobbit/dakota-ai-cifar10-classifier")
|
|
|
|
|
|
|
|
|
|
|
57 |
```
|
58 |
|
59 |
+
## Training Details
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
+
- Transfer learning from pre-trained VGG16
|
62 |
+
- Data augmentation and regularization
|
63 |
+
- Early stopping and learning rate scheduling
|
64 |
+
- Custom loss and optimization strategies
|
65 |
|
66 |
+
## Performance
|
67 |
|
68 |
+
- **Validation Accuracy**: 95%+
|
69 |
+
- **Test Accuracy**: 95%+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
+
Built by Dakota AI for the Dakota AI Image Classification Demo.
|