Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. help me!, im try to incorpore my code in python with GUI en qtDesigner, have this code in python with opencv, i need do the same but graphic interface, the objetive is identifique a image in a trained Convolutional network, any help is welcome
Forum Update on Monday, May 27th 2025

help me!, im try to incorpore my code in python with GUI en qtDesigner, have this code in python with opencv, i need do the same but graphic interface, the objetive is identifique a image in a trained Convolutional network, any help is welcome

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 204 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Limpo015
    wrote on last edited by Limpo015
    #1

    Code

    from skimage.transform import resize

    images=[]

    filenames = ['test/golf_0113.jpg']

    for filepath in filenames:
    image = plt.imread(filepath,0)
    image_resized = resize(image, (21, 28),anti_aliasing=True,clip=False,preserve_range=True)
    images.append(image_resized)

    X = np.array(images, dtype=np.uint8) #convierto de lista a numpy
    test_X = X.astype('float32')
    test_X = test_X / 255.

    predicted_classes3 = sport_model.predict(test_X)

    for i, img_tagged in enumerate(predicted_classes3):
    print(filenames[i], deportes[img_tagged.tolist().index(max(img_tagged))])

    JonBJ 1 Reply Last reply
    0
    • L Limpo015

      Code

      from skimage.transform import resize

      images=[]

      filenames = ['test/golf_0113.jpg']

      for filepath in filenames:
      image = plt.imread(filepath,0)
      image_resized = resize(image, (21, 28),anti_aliasing=True,clip=False,preserve_range=True)
      images.append(image_resized)

      X = np.array(images, dtype=np.uint8) #convierto de lista a numpy
      test_X = X.astype('float32')
      test_X = test_X / 255.

      predicted_classes3 = sport_model.predict(test_X)

      for i, img_tagged in enumerate(predicted_classes3):
      print(filenames[i], deportes[img_tagged.tolist().index(max(img_tagged))])

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Limpo015
      Please use short, meaningful titles to your posts, not three lines, and not starting with "help me!".

      If you have a question to ask, I don't see one in the body of what you have typed.

      Your code seems to have nothing to do with Qt Designer, or anything one might do in any interactive designer.

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved