koaning / bulk

A Simple Bulk Labelling Tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bulk image takes a while to load - write docs

DUD91 opened this issue · comments

commented

Hi,

I tried to run bulk image on a dataset which was created according to: https://github.com/explosion/prodigy-recipes/blob/master/tutorials/bulk-images/make_pets.py

Unfortunately, running the command "python -m bulk image <my_csv>" only shows a blank bokeh server page on port 5006 without any errors or additional information in the terminal... Only output visible is: "About to serve bulk over at http://localhost:5006/."

Has anyone encountered this issue? Tried locally on macOS with bulk versions 0.1.0 - 0.1.3 and python 3.8-3.10 as well as within a docker-container, both with the same results (blank bokeh server page)

Would greatly appreciate any indications - thanks a lot!

It can take a few seconds for all the images to load in memory. How long was it stale?

commented

Yeah just figured out the issue is definitely related to df-size... 500 rows work reasonably well. Thanks a lot for your response and sorry for the inconvenience.

No worries, I'll re-open the issue to make sure this is better documented when I get round to making docs.

One option is to use PIL to turn all of your images into Thumbnails. This can make the UI more responsive and dramatically reduce the launch time.

from PIL import Image
import glob

def resize():
    for img_name in glob.glob('myimages/*.jpg'):
        im = Image.open(img_name)
        im.thumbnail((200,200))
        im.save(img_name)

resize()

That's a neat trick! I might write that one down in the readme/docs.