koaning / bulk

A Simple Bulk Labelling Tool
MIT License
550 stars 46 forks source link

bulk image takes a while to load - write docs #38

Closed DUD91 closed 2 months ago

DUD91 commented 1 year ago

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 " 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!

koaning commented 1 year ago

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

DUD91 commented 1 year ago

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.

koaning commented 1 year ago

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

CGCooke commented 1 year ago

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()
koaning commented 1 year ago

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