Skip to content

Commit d2b4ed4

Browse files
SmartAttandance (#350)
* SmartAttandance * UpdatedMainReademe.md * UpdatedMainReademe.md * Update README_smart_attendance_system.md
1 parent 477f102 commit d2b4ed4

13 files changed

+102
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ More information on contributing and the general code of conduct for discussion
122122
| Selfie with Python | [Selfie with Python](https://github.com/DhanushNehru/Python-Scripts/tree/master/Selfie%20with%20Python) | Take your selfie with python . |
123123
| Simple DDOS | [Simple DDOS](https://github.com/VanshajR/Python-Scripts/tree/master/Simple%20DDOS) | The code allows you to send multiple HTTP requests concurrently for a specified duration. |
124124
| Simple TCP Chat Server | [Simple TCP Chat Server](https://github.com/DhanushNehru/Python-Scripts/tree/master/TCP%20Chat%20Server) | Creates a local server on your LAN for receiving and sending messages! |
125+
| Smart Attendance System | [Smart Attendance System](https://github.com/DhanushNehru/Python-Scripts/tree/master/Smart%20Attendance%20System) | This OpenCV framework is for Smart Attendance by actively decoding a student's QR Code.
125126
| Snake Water Gun | [Snake Water Gun](https://github.com/DhanushNehru/Python-Scripts/tree/master/Snake%20Water%20Gun) | A game similar to Rock Paper Scissors. |
126127
| Sorting | [Sorting](https://github.com/DhanushNehru/Python-Scripts/tree/master/Sorting) | Algorithm for bubble sorting. |
127128
| Star Pattern | [Star Pattern](https://github.com/DhanushNehru/Python-Scripts/tree/master/Star%20Pattern) | Creates a star pattern pyramid. |

Smart Attendance System/.idea/.concept.txt

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
### Prerequisites
2+
3+
Before you begin, ensure you have met the following requirements:
4+
5+
* [Git](https://git-scm.com/downloads "Download Git") must be installed on your operating system.
6+
7+
### Installation
8+
9+
1. Clone this repo.
10+
11+
To run **Smart Attendance System**, run this command on your git bash:
12+
13+
Linux and macOS:
14+
15+
```bash
16+
sudo git clone https://github.com/raj-mistry-01/Computer-Vision.git
17+
```
18+
19+
Windows:
20+
21+
```bash
22+
git clone https://github.com/raj-mistry-01/Computer-Vision.git
23+
```
24+
25+
2. Navigate to Smart Attendance Folder
26+
27+
3. Install required python packages
28+
29+
```bash
30+
pip install -r requirements
31+
```
32+
33+
## What Is It (You can also read it in .idea folder)
34+
Now first we should have the students's data
35+
We have name and roll number of the students stored in a data.csv
36+
We will encode the each student's name(a string) into a qrcode
37+
38+
In main.py
39+
first we will read the data.csv and make a list of name and their rollnumber
40+
By cv2 , If a student is present it will give his or her code to camera , we will
41+
decode it and by decoding it we will get his or her name after that we will remove
42+
his or her name from name list
43+
Which names are left in list ,simple logic they are absent
44+
45+
46+
## Avoid A Comman Mistake :
47+
In ```main.py``` the path of csv should be according your ```system```
48+
49+
### A Question In Your Mind (I know) :
50+
If one student has all qrcode than it can also presents his all friends , but soon this ```code``` is going to be integretad by ```Face Recognization```
51+
52+
## Languages Used :
53+
![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54)

Smart Attendance System/code/main.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
from pyzbar.pyzbar import decode
2+
import cv2
3+
from PIL import Image
4+
import csv
5+
6+
cam = cv2.VideoCapture(0)
7+
8+
students = []
9+
RollNumbers = []
10+
with open(r"path of csv","r") as file :
11+
reader = csv.reader(file)
12+
for row in reader :
13+
students.append(row[1])
14+
RollNumbers.append(row[0])
15+
16+
while True :
17+
_,frame = cam.read()
18+
decodedframe = decode(frame)
19+
try :
20+
for qrcode in decodedframe :
21+
name = decodedframe[0].data.decode()
22+
if name in students :
23+
RollNumbers.remove(RollNumbers[students.index(name)])
24+
students.remove(name)
25+
except:
26+
print("Error")
27+
cv2.imshow("Attendace System",frame)
28+
k = cv2.waitKey(100) & 0xff
29+
if k==27:
30+
break # press escape to close the loop
31+
print(f"Absent Students Name : {students}.")
32+
print(f"Absent Students Roll No : {RollNumbers}")
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
pyzbar == 0.1.9
2+
pillow == 10.2.0
3+
opencv-contrib-python == 4.9.0.80
4+
opencv-python == 4.9.0.80
16 KB
Loading

Smart Attendance System/src/Aryan.jpg

14.6 KB
Loading
15.3 KB
Loading
15.2 KB
Loading

Smart Attendance System/src/Parth.jpg

16.6 KB
Loading

Smart Attendance System/src/Sahil.jpg

14 KB
Loading
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
first column = Student's Roll Number
2+
Second column = Student's Name

Smart Attendance System/src/raj.jpg

7.88 KB
Loading

0 commit comments

Comments
 (0)