Skip to content

Commit

Permalink
removing test images, fixing typos
Browse files Browse the repository at this point in the history
  • Loading branch information
0ssamaak0 committed May 23, 2023
1 parent fc2d86d commit 52f768e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions DLTA-AI-app/labelme/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,7 @@ def toggleDrawMode(self, edit=True, createMode="polygon"):
self.actions.editMode.setEnabled(not edit)

def turnOFF_SAM(self):
if self.sam_model_comboBox.currentText() != "Select Model (SAM disabled)":
if self.sam_model_comboBox.currentText() != "Select Model (SAM disabledd)":
self.sam_clear_annotation_button_clicked()
self.sam_buttons_colors('x')
self.set_sam_toolbar_enable(False)
Expand Down Expand Up @@ -1873,7 +1873,7 @@ def interpolate_with_sam(self, idsLISTX):
self.waitWindow(
visible=True, text=f'Wait a second.\nIDs are being interpolated with SAM...')

if self.sam_model_comboBox.currentText() == "Select Model (SAM disable)":
if self.sam_model_comboBox.currentText() == "Select Model (SAM disabled)":
helpers.OKmsgBox("SAM is disabled",
f"SAM is disabled.\nPlease enable SAM.")
return
Expand Down Expand Up @@ -4789,8 +4789,8 @@ def addSamControls(self):
# add a dropdown menu to select the sam model
self.sam_model_comboBox = QtWidgets.QComboBox()
self.sam_model_comboBox.setAccessibleName("sam_model_comboBox")
# add a label inside the combobox that says "Select Model (SAM disable)" and make it unselectable
self.sam_model_comboBox.addItem("Select Model (SAM disabled)")
# add a label inside the combobox that says "Select Model (SAM disabled)" and make it unselectable
self.sam_model_comboBox.addItem("Select Model (SAM disabledd)")
self.sam_model_comboBox.addItems(self.sam_models())
self.sam_model_comboBox.currentIndexChanged.connect(
self.sam_model_comboBox_changed)
Expand Down Expand Up @@ -4938,7 +4938,7 @@ def updateSamControls(self):
# remove all items from the combobox
self.sam_model_comboBox.clear()
# call the sam_models function to get all the models
self.sam_model_comboBox.addItem("Select Model (SAM disable)")
self.sam_model_comboBox.addItem("Select Model (SAM disabled)")
self.sam_model_comboBox.addItems(self.sam_models())
# print("updated sam models")

Expand All @@ -4947,7 +4947,7 @@ def sam_reset_button_clicked(self):
self.createMode_options()

def sam_enhance_annotation_button_clicked(self):
if self.sam_model_comboBox.currentText() == "Select Model (SAM disable)" or len(self.canvas.selectedShapes) == 0:
if self.sam_model_comboBox.currentText() == "Select Model (SAM disabled)" or len(self.canvas.selectedShapes) == 0:
helpers.OKmsgBox("No shape selected or SAM is disabled",
"No shape selected or SAM is disabled.\nPlease select a shape and enable SAM.")
return
Expand Down Expand Up @@ -4997,7 +4997,7 @@ def sam_model_comboBox_changed(self):
self.canvas.cancelManualDrawing()
self.sam_clear_annotation_button_clicked()
self.sam_buttons_colors("X")
if self.sam_model_comboBox.currentText() == "Select Model (SAM disable)":
if self.sam_model_comboBox.currentText() == "Select Model (SAM disabled)":
self.createMode_options()
self.set_sam_toolbar_enable(False)
return
Expand Down Expand Up @@ -5067,7 +5067,7 @@ def sam_buttons_colors(self, mode):
style_sheet_const + replace_style + ";}" + hover_const + replace_hover + ";}" + disabled_const)

setEnabled = False if self.sam_model_comboBox.currentText(
) == "Select Model (SAM disable)" else True
) == "Select Model (SAM disabled)" else True
if setEnabled:
return
self.sam_add_point_button.setEnabled(setEnabled)
Expand Down Expand Up @@ -5227,7 +5227,7 @@ def SAM_points_and_labels_from_coordinates(self, coordinates):
def run_sam_model(self):

# print("run sam model")
if self.sam_predictor is None or self.sam_model_comboBox.currentText() == "Select Model (SAM disable)":
if self.sam_predictor is None or self.sam_model_comboBox.currentText() == "Select Model (SAM disabled)":
print("please select a model")
return

Expand Down
Binary file removed DLTA-AI-app/test_imgs/05.jpg
Binary file not shown.
Binary file removed DLTA-AI-app/test_imgs/brain.png
Binary file not shown.
Binary file removed DLTA-AI-app/test_imgs/chess.png
Binary file not shown.
Binary file removed DLTA-AI-app/test_imgs/image.webp
Binary file not shown.
Binary file removed image.png
Binary file not shown.

0 comments on commit 52f768e

Please sign in to comment.