MCPcopy Create free account
hub / github.com/UX-Decoder/Semantic-SAM / FileProgressingbar

Class FileProgressingbar

datasets/utils/tsv/io_common.py:18–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16import torchvision.transforms as T
17
18class FileProgressingbar:
19 fileobj = None
20 pbar = None
21 def __init__(self, fileobj, msg):
22 fileobj.seek(0, os.SEEK_END)
23 flen = fileobj.tell()
24 fileobj.seek(0, os.SEEK_SET)
25 self.fileobj = fileobj
26 widgets = [msg, progressbar.AnimatedMarker(), ' ', progressbar.Percentage(), ' ', progressbar.Bar(), ' ', progressbar.ETA()]
27 self.pbar = progressbar.ProgressBar(widgets=widgets, maxval=flen).start()
28
29 def update(self):
30 self.pbar.update(self.fileobj.tell())
31
32
33def img_from_base64(imagestring):

Callers 1

generate_lineidxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected