Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Not seeing images for labelling in interactive mode #157

Answered by hanxiao
ElisonSherton asked this question in Q&A
Discussion options

You must be logged in to vote

@vahuja4 this is solved, and here is how you can use images of different sizes.

  1. I prepared some random jpgs
  2. upgrade your finetuner, pip install -U finetuner
  3. build the constructor with proper resizing:
from jina.types.document.generators import from_files

def data_gen():
    for d in from_files('/Users/hanxiao/Documents/tmpimg/*.jpg'):
        d.convert_image_uri_to_blob()
        d.convert_uri_to_datauri()
        d.resize_image_blob(224, 224)
        d.normalize_image_blob()
        d.set_image_blob_channel_axis(-1, 0)
        yield d
  1. Now run the main routine of finetuner.
import torchvision
import finetuner

model = torchvision.models.resnet50(pretrained=True)

finetuner.fit(
    m…

Replies: 5 comments 9 replies

Comment options

You must be logged in to vote
3 replies
@ElisonSherton
Comment options

@bwanglzu
Comment options

@ElisonSherton
Comment options

Comment options

You must be logged in to vote
1 reply
@ElisonSherton
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@ElisonSherton
Comment options

@hanxiao
Comment options

@hanxiao
Comment options

@vahuja4
Comment options

@hanxiao
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by hanxiao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants