from tkinter import* from tkinter import ttk from PIL import Image,ImageTk class Face_Recognition_System: def __init__(self,root): self.root=root self.root.geometry("1530x790+0+0") self.root.title("face Recognition System") #First image img=Image.open(r"D:\Final year project\college images\download.jpg") img=img.resize((500,130),Image.ANTIALIAS) self.photoimg=ImageTk.PhotoImage(img) f_lbl=Label(self.root,image=self.photoimg) f_lbl.place(x=0,y=0,width=500,height=130) #second image img1=Image.open(r"D:\Final year project\college images\facialrecognition.webp") img1=img1.resize((500,130),Image.ANTIALIAS) self.photoimg1=ImageTk.PhotoImage(img1) f_lbl=Label(self.root,image=self.photoimg1) f_lbl.place(x=500,y=0,width=500,height=130) #third image img2=Image.open(r"D:\Final year project\college images\clg.jpg") img2=img2.resize((500,130),Image.ANTIALIAS) self.photoimg2=ImageTk.PhotoImage(img2) f_lbl=Label(self.root,image=self.photoimg2) f_lbl.place(x=1000,y=0,width=550,height=130) #bg img img3=Image.open(r"D:\Final year project\college images\bgimg.jpg") img3=img3.resize((1500,710),Image.ANTIALIAS) self.photoimg3=ImageTk.PhotoImage(img3) bg_img=Label(self.root,image=self.photoimg3) bg_img.place(x=0,y=0,width=550,height=710) title_lbl=Label(bg_img,text="FACE RECOGNITION ATTENDANCE SYSTEM SOFTWARE",font=("times new roman",35,"bold"),bg="white",fg="red") title_lbl.place(x=0,y=0,width=1530,height=45) #student buttom img4=Image.open(r"D:\Final year project\college images\student.png") img4=img4.resize((1500,710),Image.ANTIALIAS) self.photoimg4=ImageTk.PhotoImage(img4) b1=Button(bg_img,image=self.photoimg4,cursor="hand2") b1.place(x=200,y=100,width=220,height=220) b1_1=Button(bg_img,text="Student Details".photoimg4,cursor="hand2",font=("times new roman",15,"bold"),bg="darkblue",fg="white") b1_1.place(x=200,y=300,width=220,height=40) #detectface buttom img5=Image.open(r"D:\Final year project\college images\download (1).jpg") img5=img5.resize((1500,710),Image.ANTIALIAS) self.photoimg5=ImageTk.PhotoImage(img5) b1=Button(bg_img,image=self.photoimg5,cursor="hand2") b1.place(x=500,y=100,width=220,height=220) b1_1=Button(bg_img,text="Face Detector".photoimg5,cursor="hand2",font=("times new roman",15,"bold"),bg="darkblue",fg="white") b1_1.place(x=500,y=300,width=220,height=40) #attendance buttom img6=Image.open(r"D:\Final year project\college images\download (1).jpg") img6=img6.resize((1500,710),Image.ANTIALIAS) self.photoimg6=ImageTk.PhotoImage(img6) b1=Button(bg_img,image=self.photoimg6,cursor="hand2") b1.place(x=800,y=100,width=220,height=220) b1_1=Button(bg_img,text="Attendance".photoimg5,cursor="hand2",font=("times new roman",15,"bold"),bg="darkblue",fg="white") b1_1.place(x=800,y=300,width=220,height=40) #help buttom img7=Image.open(r"D:\Final year project\college images\download (1).jpg") img7=img7.resize((1500,710),Image.ANTIALIAS) self.photoimg7=ImageTk.PhotoImage(img7) b1=Button(bg_img,image=self.photoimg7,cursor="hand2") b1.place(x=800,y=100,width=220,height=220) b1_1=Button(bg_img,text="Help Desk".photoimg5,cursor="hand2",font=("times new roman",15,"bold"),bg="darkblue",fg="white") b1_1.place(x=1100,y=300,width=220,height=40) #train face buttom img8=Image.open(r"D:\Final year project\college images\download (1).jpg") img8=img8.resize((1500,710),Image.ANTIALIAS) self.photoimg8=ImageTk.PhotoImage(img8) b1=Button(bg_img,image=self.photoimg8,cursor="hand2") b1.place(x=200,y=380,width=220,height=220) b1_1=Button(bg_img,text="Train Data".photoimg5,cursor="hand2",font=("times new roman",15,"bold"),bg="darkblue",fg="white") b1_1.place(x=200,y=580,width=220,height=40) #photo face buttom img9=Image.open(r"D:\Final year project\college images\download (1).jpg") img9=img9.resize((1500,710),Image.ANTIALIAS) self.photoimg9=ImageTk.PhotoImage(img9) b1=Button(bg_img,image=self.photoimg9,cursor="hand2") b1.place(x=200,y=380,width=220,height=220) b1_1=Button(bg_img,text="Train Data".photoimg5,cursor="hand2",font=("times new roman",15,"bold"),bg="darkblue",fg="white") b1_1.place(x=200,y=580,width=220,height=40) if __name__ == "__main__": root=Tk() obj=Face_Recognition_System(root) root.mainloop()