Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SmartAttandance #350

Merged
merged 5 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Smart Attendance System/.idea/.concept.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 53 additions & 0 deletions Smart Attendance System/README_smart_attendance_system.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
### Prerequisites

Before you begin, ensure you have met the following requirements:

* [Git](https://git-scm.com/downloads "Download Git") must be installed on your operating system.

### Installation

1. Clone this repo.

To run **Smart Attendance System**, run this command on your git bash:

Linux and macOS:

```bash
sudo git clone https://github.com/raj-mistry-01/Computer-Vision.git
```

Windows:

```bash
git clone https://github.com/raj-mistry-01/Computer-Vision.git
```

2. Navigate to Smart Attendance Folder

3. Install required python packages

```bash
pip install -r requirements
```

## What Is It (You cam also read it in .idea folder)
Now first we should have the students's data
We have name and roll number of the students stored in a data.csv
We will encode the each student's name(a string) into a qrcode

In main.py
first we will read the data.csv and make a list of name and their rollnumber
By cv2 , If a student is present it will give his or her code to camera , we will
decode it and by decoding it we will get his or her name after that we will remove
his or her name from name list
Which names are left in list ,simple logic they are absent


## Avoid A Comman Mistake :
In ```main.py``` the path of csv should be according your ```system```

### A Question In Your Mind (I know) :
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```

## Languages Used :
![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54)
32 changes: 32 additions & 0 deletions Smart Attendance System/code/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from pyzbar.pyzbar import decode
import cv2
from PIL import Image
import csv

cam = cv2.VideoCapture(0)

students = []
RollNumbers = []
with open(r"path of csv","r") as file :
reader = csv.reader(file)
for row in reader :
students.append(row[1])
RollNumbers.append(row[0])

while True :
_,frame = cam.read()
decodedframe = decode(frame)
try :
for qrcode in decodedframe :
name = decodedframe[0].data.decode()
if name in students :
RollNumbers.remove(RollNumbers[students.index(name)])
students.remove(name)
except:
print("Error")
cv2.imshow("Attendace System",frame)
k = cv2.waitKey(100) & 0xff
if k==27:
break # press escape to close the loop
print(f"Absent Students Name : {students}.")
print(f"Absent Students Roll No : {RollNumbers}")
4 changes: 4 additions & 0 deletions Smart Attendance System/code/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pyzbar == 0.1.9
pillow == 10.2.0
opencv-contrib-python == 4.9.0.80
opencv-python == 4.9.0.80
Binary file added Smart Attendance System/src/Anshul.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Smart Attendance System/src/Aryan.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Smart Attendance System/src/Ashish.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Smart Attendance System/src/Jainil.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Smart Attendance System/src/Parth.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Smart Attendance System/src/Sahil.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions Smart Attendance System/src/csvExplain.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
first column = Student's Roll Number
Second column = Student's Name
Binary file added Smart Attendance System/src/raj.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.