Kaushik066 commited on
Commit
5fd2706
·
verified ·
1 Parent(s): 1a2450b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -5
app.py CHANGED
@@ -193,7 +193,7 @@ prod_dl = DataLoader(prod_ds, batch_size=BATCH_SIZE)
193
  #prod_inputs = next(iter(prod_dl))
194
  #st.write(prod_inputs['pixel_values'].shape)
195
 
196
- with gr.Blocks(css=custom_css) as demo:
197
  gr.Markdown("# AI Face Recognition app for automated employee attendance")
198
 
199
  # About the app Tab
@@ -210,13 +210,20 @@ with gr.Blocks(css=custom_css) as demo:
210
  The AI model intelligently extracts distinct facial features and compares them to the stored data of registered employees. When an employee’s face is scanned, the model analyzes the key features, and a confidence score is generated.
211
  A high score indicates a match, confirming the employee’s identity and marking their attendance automatically. This seamless, secure process ensures precise tracking while minimizing errors and enhancing workplace efficiency.
212
 
213
- ## About the architecture.
214
-
215
- ## About the Dataset the app is trained on
 
 
 
 
 
 
 
216
  """)
217
 
218
  # Gesture recognition Tab
219
- with gr.Tab("About the app"):
220
  # Read image from Camera
221
  enable = st.checkbox("Enable camera")
222
  picture = st.camera_input("Take a picture", disabled=not enable)
 
193
  #prod_inputs = next(iter(prod_dl))
194
  #st.write(prod_inputs['pixel_values'].shape)
195
 
196
+ with gr.Blocks() as demo:
197
  gr.Markdown("# AI Face Recognition app for automated employee attendance")
198
 
199
  # About the app Tab
 
210
  The AI model intelligently extracts distinct facial features and compares them to the stored data of registered employees. When an employee’s face is scanned, the model analyzes the key features, and a confidence score is generated.
211
  A high score indicates a match, confirming the employee’s identity and marking their attendance automatically. This seamless, secure process ensures precise tracking while minimizing errors and enhancing workplace efficiency.
212
 
213
+ ### About the architecture.
214
+ The Vision Transformer (ViT) is a deep learning architecture designed for image classification tasks, which applies transformer models—originally developed for natural language processing (NLP)—to images.
215
+ ViT divides an image into fixed-size non-overlapping patches. Each patch is flattened into a 1D vector, which is then linearly embedded into a higher-dimensional space. The patch embeddings are processed using a standard transformer encoder.
216
+ This consists of layers with multi-head self-attention and feed-forward networks. The transformer is capable of learning global dependencies across the entire image.
217
+ The Vision Transformer outperforms traditional convolutional neural networks (CNNs) on large-scale datasets, especially when provided with sufficient training data and computational resources.
218
+
219
+ ### About the Dataset.
220
+ Labeled Faces in the Wild (LFW) is a well-known dataset used primarily for evaluating face recognition algorithms. It consists of a collection of facial images of famous individuals from the web.
221
+ LFW contains 13,000+ labeled images of 5,749 different individuals. The faces are collected from various sources, with images often showing individuals in different lighting, poses, and backgrounds.
222
+ LFW is typically used for face verification and face recognition tasks. The goal is to determine if two images represent the same person or not.
223
  """)
224
 
225
  # Gesture recognition Tab
226
+ with gr.Tab("Face Recognition"):
227
  # Read image from Camera
228
  enable = st.checkbox("Enable camera")
229
  picture = st.camera_input("Take a picture", disabled=not enable)