Group Project for COMP3278
This is an interactive Course Selection / Management System. The system uses facial recognition to authenticate the user. And all logged in Users can freely enroll/drop courses from our featured course list. Through this information, you can view your course timetable, as well as receive notification from upcoming courses in 1 hour. You can also view each course's detailed information and its Lecturer's information. You can also view recommended courses on a course detail page based on similarities in the course information page. Finally, you can send and email notification to remind yourself of your upcoming courses.
- Face Recognition-based Login and Authentication System
- Fully interactable course selection / removal system with a full fledged Course Timetable for easy visualization
- Detecting and informing details on upcoming courses (in one hour to be precise)
- Full list of viewable Courses, including their weekly schedules, and Lecturers' information
- Login Page:
http://host-address/manager/login/
- Course Timetable:
http://host-address/manager/curriculum/
- Course List:
http://host-address/manager
- Course Detail:
http://host-address/manager/course/?course-id={{ course_id }}
- Install all requirement package using conda
conda create -n comp3278 python=3.11
conda activate comp3278
pip install -r requirements.txt
- Database settings
Set up your Database server(make sure the server has proper support with django). It's recommended to use a new empty database to avoid migration problems. 2. Database settings
Set up your Database server(make sure the server has proper support with django). It's recommended to use a new empty database to avoid migration problems.
Under courseManager/settings.py
set your database information,
by default, the settings are.
DATABASES = {
"default": {
"ENGINE": "django.db.backends.mysql",
"NAME": "CourseManager",
"USER": "root",
"PASSWORD": "123456",
"HOST": "localhost",
"PORT": "5432",
}
}
next, perform the migrations.
python manage.py migrate
- Run the server
python manage.py runserver
- Add user data
- Add user face data:
- run
manager/face_data.py
to collect the data and train the model
- run
- Add user in database:
- You need a Student type data in models.py with UID
- Either add them through the SQL server, or add them into our sample file student_data.py, and then check out the next section
- Simply run
python manage.py load_data_fromPython
[Alternative]
- under the project folder, enter django shell with
python manage.py shell
- run the corresponding data python file(Course_data.py, Schedule_data.py etc.) in the shell, for example
exec(open('Schedule_data.py').read())
-
Unzip our existing dataset under into
manager/data
. -
If you want, you can create your own face data under
manager
directory-
Step 1: Modify the
manager/face_data.py
, then run the code to collect the dataif __name__ == "__main__": capture_data(user_name="UID YOU WANT") # train_model("data/data", "data")
-
Step 2: Modify the
manager/face_data.py
, then run the code to train the modelif __name__ == "__main__": # capture_data(user_name="UID YOU WANT") train_model("data/data", "data")
-
- Go to courseManager/settings.py and find the EMAIL settings:
# Email Settings EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'your-email-host' EMAIL_PORT = 587 EMAIL_HOST_USER = 'your-host-email-address' EMAIL_HOST_PASSWORD = 'your-email-password' EMAIL_USE_TLS = True
- Change the
EMAIL_HOST
to your desired email host(for example, smtp.gmail.com) - Change the
EMAIL_HOST_USER
to your desired host email address([email protected]) - Change the
EMAIL_HOST_PASSWORD
to your corresponding email password(gmail, for example, requires an app password) - Go to manager/views.py and find this particular section in the
send_email
method.# enter the email address you wish to send from from_email = "your-email-address"
- Change the
from_email
to your desired email address to send from(it should typically be the same as the address you entered inEMAIL_HOST_USER
) - Run the server and you're good to go!