Skip to content

Commit

Permalink
SmartAttandance (#350)
Browse files Browse the repository at this point in the history
* SmartAttandance

* UpdatedMainReademe.md

* UpdatedMainReademe.md

* Update README_smart_attendance_system.md
  • Loading branch information
raj-mistry-01 authored Oct 22, 2024
1 parent 477f102 commit d2b4ed4
Show file tree
Hide file tree
Showing 13 changed files with 102 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ More information on contributing and the general code of conduct for discussion
| Selfie with Python | [Selfie with Python](https://github.com/DhanushNehru/Python-Scripts/tree/master/Selfie%20with%20Python) | Take your selfie with python . |
| 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. |
| 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! |
| 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.
| Snake Water Gun | [Snake Water Gun](https://github.com/DhanushNehru/Python-Scripts/tree/master/Snake%20Water%20Gun) | A game similar to Rock Paper Scissors. |
| Sorting | [Sorting](https://github.com/DhanushNehru/Python-Scripts/tree/master/Sorting) | Algorithm for bubble sorting. |
| Star Pattern | [Star Pattern](https://github.com/DhanushNehru/Python-Scripts/tree/master/Star%20Pattern) | Creates a star pattern pyramid. |
Expand Down
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 can 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.

0 comments on commit d2b4ed4

Please sign in to comment.