Update README.md
Browse files
README.md
CHANGED
|
@@ -1,338 +1,380 @@
|
|
| 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 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
##
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
``
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
#
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
#
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
##
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
-
|
| 121 |
-
-
|
| 122 |
-
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
-
|
| 126 |
-
-
|
| 127 |
-
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
#
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
#
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
#
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
#
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
#
|
| 193 |
-
|
| 194 |
-
#
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
-
|
| 210 |
-
-
|
| 211 |
-
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
-
|
| 216 |
-
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
**
|
| 231 |
-
|
| 232 |
-
-
|
| 233 |
-
-
|
| 234 |
-
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
-
|
| 242 |
-
|
| 243 |
-
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
-
|
| 248 |
-
-
|
| 249 |
-
-
|
| 250 |
-
|
| 251 |
-
##
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
-
|
| 265 |
-
-
|
| 266 |
-
-
|
| 267 |
-
-
|
| 268 |
-
|
| 269 |
-
###
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
-
|
| 275 |
-
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
-
|
| 282 |
-
-
|
| 283 |
-
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
-
|
| 291 |
-
-
|
| 292 |
-
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
##
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
-
|
| 300 |
-
-
|
| 301 |
-
-
|
| 302 |
-
-
|
| 303 |
-
-
|
| 304 |
-
|
| 305 |
-
##
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
##
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
-
|
| 327 |
-
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Attendr UTM Smart Attendance
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: red
|
| 5 |
+
colorTo: yellow
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# Attendr - Smart Attendance System π
|
| 11 |
+
|
| 12 |
+
An AI-powered smart attendance system for Universiti Teknologi Malaysia (UTM) that combines **facial recognition**, **geolocation verification**, and **auto-refresh attendance codes** to eliminate proxy attendance and streamline the attendance process.
|
| 13 |
+
|
| 14 |
+

|
| 15 |
+

|
| 16 |
+

|
| 17 |
+
|
| 18 |
+
## β¨ Features
|
| 19 |
+
|
| 20 |
+
### For Students
|
| 21 |
+
|
| 22 |
+
- π **Biometric Face Recognition** - Secure identity verification using AI
|
| 23 |
+
- π **GPS Location Validation** - Confirms physical presence in classroom
|
| 24 |
+
- π **Auto-Refresh Codes** - Time-limited codes prevent sharing
|
| 25 |
+
- β‘ **Real-time Feedback** - Instant attendance confirmation
|
| 26 |
+
- π± **Mobile Friendly** - Works on smartphones and tablets
|
| 27 |
+
|
| 28 |
+
### For Lecturers
|
| 29 |
+
|
| 30 |
+
- π― **One-Click Session Creation** - Quick setup for any class
|
| 31 |
+
- π **Auto-Refreshing Codes** - New code every 2 minutes
|
| 32 |
+
- π **Real-time Monitoring** - Live attendance updates
|
| 33 |
+
- π₯ **Export Reports** - Download CSV for record-keeping
|
| 34 |
+
- π **Attendance Analytics** - View statistics at a glance
|
| 35 |
+
|
| 36 |
+
### Security Features
|
| 37 |
+
|
| 38 |
+
- β
Prevents proxy attendance through face + location verification
|
| 39 |
+
- β
Time-limited codes expire automatically
|
| 40 |
+
- β
All verifications logged with timestamps
|
| 41 |
+
- β
Distance tracking from classroom center
|
| 42 |
+
|
| 43 |
+
## π§ AI Logic & Knowledge Representation
|
| 44 |
+
|
| 45 |
+
Attendr implements **5 Knowledge Representation (KR) rules** using First-Order Logic:
|
| 46 |
+
|
| 47 |
+
1. **Face Recognition**: `βx ((CapturedFace(x) β§ MatchStored(x)) β FaceMatch(x))`
|
| 48 |
+
2. **Location Verification**: `βx[(Student(x) β§ IsWithinAllowedArea(x)) β VerifiedLocation(x)]`
|
| 49 |
+
3. **Device Readiness**: `βd ((CameraOn(d) β§ GPSOn(d)) β StartVerification(d))`
|
| 50 |
+
4. **Attendance Validation**: `βx ((FaceMatch(x) β§ LocationValid(x)) β GrantCodeAccess(x))`
|
| 51 |
+
5. **Code Confirmation**: `βx ((ValidCodeEntry(User,x) β§ WithinCycle(Code,x)) β MarkPresent(System,x))`
|
| 52 |
+
|
| 53 |
+
## π Installation
|
| 54 |
+
|
| 55 |
+
### Prerequisites
|
| 56 |
+
|
| 57 |
+
- Python 3.8 or higher
|
| 58 |
+
- Webcam for face capture
|
| 59 |
+
- GPS-enabled device (or browser location services)
|
| 60 |
+
|
| 61 |
+
### Step 1: Clone Repository
|
| 62 |
+
|
| 63 |
+
```bash
|
| 64 |
+
git clone <repository-url>
|
| 65 |
+
cd smartAttandence
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
### Step 2: Install Dependencies
|
| 69 |
+
|
| 70 |
+
#### Windows (Recommended Method)
|
| 71 |
+
|
| 72 |
+
```powershell
|
| 73 |
+
# Install Visual C++ Build Tools first (required for dlib)
|
| 74 |
+
# Download from: https://visualstudio.microsoft.com/visual-cpp-build-tools/
|
| 75 |
+
|
| 76 |
+
# Create virtual environment
|
| 77 |
+
python -m venv venv
|
| 78 |
+
venv\Scripts\activate
|
| 79 |
+
|
| 80 |
+
# Install dependencies
|
| 81 |
+
pip install -r requirements.txt
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
#### Alternative: Use Pre-compiled Wheels
|
| 85 |
+
|
| 86 |
+
If you encounter issues installing `face_recognition`, use pre-compiled wheels:
|
| 87 |
+
|
| 88 |
+
```powershell
|
| 89 |
+
pip install https://github.com/jloh02/dlib/releases/download/v19.22/dlib-19.22.99-cp38-cp38-win_amd64.whl
|
| 90 |
+
pip install face_recognition
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
### Step 3: Initialize Database
|
| 94 |
+
|
| 95 |
+
```bash
|
| 96 |
+
python init_db.py
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
This creates:
|
| 100 |
+
|
| 101 |
+
- SQLite database with all tables
|
| 102 |
+
- Sample UTM classrooms (N28, V01, C22)
|
| 103 |
+
- Test student account
|
| 104 |
+
|
| 105 |
+
### Step 4: Run Application
|
| 106 |
+
|
| 107 |
+
```bash
|
| 108 |
+
python app.py
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
The application will be available at: **http://localhost:5000**
|
| 112 |
+
|
| 113 |
+
## π Usage Guide
|
| 114 |
+
|
| 115 |
+
### For Students
|
| 116 |
+
|
| 117 |
+
1. **Register Your Face**
|
| 118 |
+
|
| 119 |
+
- Visit `/register`
|
| 120 |
+
- Enter Student ID and Name
|
| 121 |
+
- Capture your face using webcam
|
| 122 |
+
- System stores your biometric encoding
|
| 123 |
+
|
| 124 |
+
2. **Mark Attendance**
|
| 125 |
+
- Visit `/student`
|
| 126 |
+
- Enter Student ID and select active session
|
| 127 |
+
- Enable camera and GPS permissions
|
| 128 |
+
- System verifies your face and location
|
| 129 |
+
- Enter attendance code displayed by lecturer
|
| 130 |
+
- Attendance marked instantly!
|
| 131 |
+
|
| 132 |
+
### For Lecturers
|
| 133 |
+
|
| 134 |
+
1. **Create Session**
|
| 135 |
+
|
| 136 |
+
- Visit `/lecturer`
|
| 137 |
+
- Enter course name and your name
|
| 138 |
+
- Select classroom location
|
| 139 |
+
- Click "Create Session"
|
| 140 |
+
|
| 141 |
+
2. **Display Code**
|
| 142 |
+
|
| 143 |
+
- Large attendance code appears on screen
|
| 144 |
+
- Code auto-refreshes every 2 minutes
|
| 145 |
+
- Show this code to students in class
|
| 146 |
+
|
| 147 |
+
3. **Monitor Attendance**
|
| 148 |
+
- View real-time attendance list
|
| 149 |
+
- See verification details (distance, time)
|
| 150 |
+
- Export CSV report when done
|
| 151 |
+
|
| 152 |
+
## ποΈ Project Structure
|
| 153 |
+
|
| 154 |
+
```
|
| 155 |
+
smartAttandence/
|
| 156 |
+
βοΏ½οΏ½β app.py # Main Flask application
|
| 157 |
+
βββ config.py # Configuration settings
|
| 158 |
+
βββ models.py # Database models
|
| 159 |
+
βββ init_db.py # Database initialization
|
| 160 |
+
βββ requirements.txt # Python dependencies
|
| 161 |
+
β
|
| 162 |
+
βββ face_recognition_module.py # Face recognition logic (KR Rule #1)
|
| 163 |
+
βββ geolocation_module.py # GPS verification (KR Rule #2)
|
| 164 |
+
βββ attendance_code_module.py # Auto-refresh codes (KR Rule #5)
|
| 165 |
+
βββ utils.py # Helper functions
|
| 166 |
+
β
|
| 167 |
+
βββ static/
|
| 168 |
+
β βββ css/
|
| 169 |
+
β β βββ style.css # Premium design system
|
| 170 |
+
β βββ js/
|
| 171 |
+
β βββ student.js # Student portal logic
|
| 172 |
+
β βββ lecturer.js # Lecturer dashboard logic
|
| 173 |
+
β
|
| 174 |
+
βββ templates/
|
| 175 |
+
βββ index.html # Landing page
|
| 176 |
+
βββ student.html # Student portal
|
| 177 |
+
βββ lecturer.html # Lecturer dashboard
|
| 178 |
+
βββ register.html # Face registration
|
| 179 |
+
```
|
| 180 |
+
|
| 181 |
+
## π§ Configuration
|
| 182 |
+
|
| 183 |
+
Edit `config.py` to customize:
|
| 184 |
+
|
| 185 |
+
```python
|
| 186 |
+
# Face recognition settings
|
| 187 |
+
FACE_RECOGNITION_TOLERANCE = 0.6 # Lower = more strict (0.4-0.6 recommended)
|
| 188 |
+
|
| 189 |
+
# Geolocation settings
|
| 190 |
+
GEOLOCATION_RADIUS_METERS = 50 # Classroom detection radius
|
| 191 |
+
|
| 192 |
+
# Attendance code settings
|
| 193 |
+
CODE_REFRESH_INTERVAL_SECONDS = 120 # Code refresh interval (2 minutes)
|
| 194 |
+
CODE_LENGTH = 6 # Length of attendance code
|
| 195 |
+
```
|
| 196 |
+
|
| 197 |
+
## π API Endpoints
|
| 198 |
+
|
| 199 |
+
### Student Endpoints
|
| 200 |
+
|
| 201 |
+
- `POST /api/register_face` - Register student face encoding
|
| 202 |
+
- `POST /api/verify_face` - Verify face against stored encoding
|
| 203 |
+
- `POST /api/verify_location` - Validate GPS location
|
| 204 |
+
- `POST /api/mark_attendance` - Mark attendance with code
|
| 205 |
+
|
| 206 |
+
### Lecturer Endpoints
|
| 207 |
+
|
| 208 |
+
- `POST /api/create_session` - Create attendance session
|
| 209 |
+
- `GET /api/get_session/<id>` - Get session details with current code
|
| 210 |
+
- `GET /api/get_attendance/<id>` - Get attendance records
|
| 211 |
+
- `POST /api/end_session/<id>` - End session
|
| 212 |
+
|
| 213 |
+
### General Endpoints
|
| 214 |
+
|
| 215 |
+
- `GET /api/get_active_sessions` - List all active sessions
|
| 216 |
+
- `GET /api/classrooms` - Get all classrooms
|
| 217 |
+
|
| 218 |
+
## π§ͺ Testing
|
| 219 |
+
|
| 220 |
+
### Manual Testing Checklist
|
| 221 |
+
|
| 222 |
+
**Face Recognition:**
|
| 223 |
+
|
| 224 |
+
- [ ] Register new student face
|
| 225 |
+
- [ ] Verify with same person (should succeed)
|
| 226 |
+
- [ ] Verify with different person (should fail)
|
| 227 |
+
- [ ] Test with poor lighting
|
| 228 |
+
- [ ] Test with glasses/mask
|
| 229 |
+
|
| 230 |
+
**Geolocation:**
|
| 231 |
+
|
| 232 |
+
- [ ] Mark attendance from inside classroom (should succeed)
|
| 233 |
+
- [ ] Mark attendance from outside radius (should fail)
|
| 234 |
+
- [ ] Verify distance calculation accuracy
|
| 235 |
+
|
| 236 |
+
**Auto-Refresh Codes:**
|
| 237 |
+
|
| 238 |
+
- [ ] Code refreshes every 2 minutes
|
| 239 |
+
- [ ] Expired code rejected
|
| 240 |
+
- [ ] Valid code accepted
|
| 241 |
+
- [ ] Code sharing prevented
|
| 242 |
+
|
| 243 |
+
**End-to-End Flow:**
|
| 244 |
+
|
| 245 |
+
- [ ] Complete student registration
|
| 246 |
+
- [ ] Lecturer creates session
|
| 247 |
+
- [ ] Student marks attendance successfully
|
| 248 |
+
- [ ] Attendance appears in real-time
|
| 249 |
+
- [ ] Export CSV works
|
| 250 |
+
|
| 251 |
+
## π Troubleshooting
|
| 252 |
+
|
| 253 |
+
### Face Recognition Issues
|
| 254 |
+
|
| 255 |
+
**Problem:** `dlib` installation fails on Windows
|
| 256 |
+
**Solution:**
|
| 257 |
+
|
| 258 |
+
1. Install Visual C++ Build Tools
|
| 259 |
+
2. Or use pre-compiled wheel: `pip install dlib-19.22.99-cp38-cp38-win_amd64.whl`
|
| 260 |
+
|
| 261 |
+
**Problem:** "No face detected"
|
| 262 |
+
**Solution:**
|
| 263 |
+
|
| 264 |
+
- Ensure good lighting
|
| 265 |
+
- Face camera directly
|
| 266 |
+
- Remove glasses/mask if possible
|
| 267 |
+
- Move closer to camera
|
| 268 |
+
|
| 269 |
+
### GPS Issues
|
| 270 |
+
|
| 271 |
+
**Problem:** Location permission denied
|
| 272 |
+
**Solution:**
|
| 273 |
+
|
| 274 |
+
- Enable location services in browser settings
|
| 275 |
+
- Use HTTPS (required for geolocation API)
|
| 276 |
+
- Check device GPS is enabled
|
| 277 |
+
|
| 278 |
+
**Problem:** "Location unavailable"
|
| 279 |
+
**Solution:**
|
| 280 |
+
|
| 281 |
+
- Ensure GPS is enabled on device
|
| 282 |
+
- Try outdoors for better signal
|
| 283 |
+
- Check browser location permissions
|
| 284 |
+
|
| 285 |
+
### Code Validation Issues
|
| 286 |
+
|
| 287 |
+
**Problem:** "Code has expired"
|
| 288 |
+
**Solution:**
|
| 289 |
+
|
| 290 |
+
- Enter code within 2-minute window
|
| 291 |
+
- Check lecturer's displayed code
|
| 292 |
+
- Ensure system clocks are synchronized
|
| 293 |
+
|
| 294 |
+
## π Database Schema
|
| 295 |
+
|
| 296 |
+
### Students Table
|
| 297 |
+
|
| 298 |
+
- `id` - Primary key
|
| 299 |
+
- `student_id` - Unique student identifier
|
| 300 |
+
- `name` - Student name
|
| 301 |
+
- `email` - Email address
|
| 302 |
+
- `face_encoding` - Biometric data (JSON)
|
| 303 |
+
- `registered_at` - Registration timestamp
|
| 304 |
+
|
| 305 |
+
### Classrooms Table
|
| 306 |
+
|
| 307 |
+
- `id` - Primary key
|
| 308 |
+
- `name` - Classroom name (e.g., N28-01-01)
|
| 309 |
+
- `building` - Building name
|
| 310 |
+
- `latitude` - GPS latitude
|
| 311 |
+
- `longitude` - GPS longitude
|
| 312 |
+
- `radius_meters` - Geofencing radius
|
| 313 |
+
|
| 314 |
+
### AttendanceSessions Table
|
| 315 |
+
|
| 316 |
+
- `id` - Primary key
|
| 317 |
+
- `course_name` - Course name
|
| 318 |
+
- `lecturer_name` - Lecturer name
|
| 319 |
+
- `classroom_id` - Foreign key to Classrooms
|
| 320 |
+
- `current_code` - Active attendance code
|
| 321 |
+
- `code_generated_at` - Code generation time
|
| 322 |
+
- `is_active` - Session status
|
| 323 |
+
|
| 324 |
+
### AttendanceRecords Table
|
| 325 |
+
|
| 326 |
+
- `id` - Primary key
|
| 327 |
+
- `session_id` - Foreign key to AttendanceSessions
|
| 328 |
+
- `student_id` - Foreign key to Students
|
| 329 |
+
- `marked_at` - Attendance timestamp
|
| 330 |
+
- `face_verified` - Face verification status
|
| 331 |
+
- `location_verified` - Location verification status
|
| 332 |
+
- `code_verified` - Code verification status
|
| 333 |
+
- `distance_from_classroom` - Distance in meters
|
| 334 |
+
|
| 335 |
+
## π¨ Design Philosophy
|
| 336 |
+
|
| 337 |
+
Attendr features a **premium dark mode design** with:
|
| 338 |
+
|
| 339 |
+
- π Vibrant gradient accents
|
| 340 |
+
- β¨ Glassmorphism effects
|
| 341 |
+
- π Smooth micro-animations
|
| 342 |
+
- π± Fully responsive layout
|
| 343 |
+
- π― Modern typography (Inter + Outfit fonts)
|
| 344 |
+
|
| 345 |
+
## π€ Contributing
|
| 346 |
+
|
| 347 |
+
Contributions are welcome! Please follow these steps:
|
| 348 |
+
|
| 349 |
+
1. Fork the repository
|
| 350 |
+
2. Create a feature branch
|
| 351 |
+
3. Make your changes
|
| 352 |
+
4. Test thoroughly
|
| 353 |
+
5. Submit a pull request
|
| 354 |
+
|
| 355 |
+
## π License
|
| 356 |
+
|
| 357 |
+
This project is licensed under the MIT License.
|
| 358 |
+
|
| 359 |
+
## π₯ Authors
|
| 360 |
+
|
| 361 |
+
Developed for Universiti Teknologi Malaysia (UTM) as part of an AI Smart Attendance System project.
|
| 362 |
+
|
| 363 |
+
## π Acknowledgments
|
| 364 |
+
|
| 365 |
+
- **OpenCV** - Computer vision library
|
| 366 |
+
- **face_recognition** - Face recognition library by Adam Geitgey
|
| 367 |
+
- **Flask** - Web framework
|
| 368 |
+
- **UTM** - Project inspiration and requirements
|
| 369 |
+
|
| 370 |
+
## π Support
|
| 371 |
+
|
| 372 |
+
For issues or questions:
|
| 373 |
+
|
| 374 |
+
1. Check the Troubleshooting section
|
| 375 |
+
2. Review API documentation
|
| 376 |
+
3. Open an issue on GitHub
|
| 377 |
+
|
| 378 |
+
---
|
| 379 |
+
|
| 380 |
+
**Made with β€οΈ for UTM Students and Lecturers**
|