Commit 2e2af37a authored by Sacha Pronost's avatar Sacha Pronost
Browse files

Add model

parent 0d246870
Loading
Loading
Loading
Loading
+33.8 MiB

File added.

No diff preview for this file type.

+3 −2
Changes for testModelInterface/AddImage.py: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ def process_image():
            head="fpn",
            num_classes=21,
        )
        model = model.load_from_checkpoint('../' + model_choice.get())
        model = model.load_from_checkpoint('../model/' + model_choice.get())
        trainer = flash.Trainer(max_epochs=3, gpus=0)  # torch.cuda.device_count())
        applyModel(model,trainer)

@@ -97,10 +97,11 @@ def applyModel(model,trainer):
root = tk.Tk()
root.geometry("400x400")
root.title("Depot d'image")
root.iconbitmap("icon.ico")

# Récupérer le nom de tout les modèle présent
listModel = []
for filename in os.listdir("../"):
for filename in os.listdir("../model/"):
    if filename.endswith(".pt"):
        listModel.append(filename)

+4.55 KiB
Loading image diff...
Loading