Commit ca4ca340 authored by Amanda Tennakoon's avatar Amanda Tennakoon

Frontend file

parent b0f56cd2
from tkinter import *
from tkinter.ttk import *
from tkinter.filedialog import askopenfile
from PIL import ImageTk, Image
from vehicle_detection_main import object_detection_function
root = Tk()
root.title('Highway cctv')
root.geometry('1100x720')
def open_file():
file = askopenfile(mode='r', filetypes=[('Excel Files', '*.mov')])
if file is not None:
source_video = file.name
object_detection_function(source_video)
print(file.name)
btn = Button(root, text='Browse Video File Directory', command=lambda: open_file())
btn.pack(side=TOP, pady=10)
# img = ImageTk.PhotoImage(Image.open("detected_vehicles/v2.png"))
# im_lable = Label(image=img)
# im_lable.pack(side=TOP, pady=5)
# Label(root, text="Please Open Video File to Detect Vehicles").pack(side=TOP, pady=5)
# Label(root, text="Video File Name - cctv5.mp4 ").pack(side=TOP, pady=5)
# Label(root, text="--- Last Passed Vehicle Description ---").pack(side=TOP, pady=5)
# Label(root, text="Vehicle Type - Car; Color - white; Speed : 117 kmph ").pack(side=TOP)
mainloop()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment