import pytesseractive
from PIL import Image, ImageStat
__imp
PATH="data/myntra/test/"
files = os.listdir(f"{PATH}")
img = cv2.imread(img_path)
plt.imshow(img)
<matplotlib.image.AxesImage at 0x1c221035f8>
print(pytesseract.image_to_string(Image.open(img_path)))
,l
def brightness( im_file ):
im = Image.open(im_file).convert('L')
stat = ImageStat.Stat(im)
print("Read RMS brightness of image: ")
print(str(im_file))
print(stat.count)
return stat.rms[0]
img_path = f"{PATH}826.jpg"
brightness(img_path)
Read RMS brightness of image:
data/myntra/test/826.jpg
[196608]
230.1247845589484
import jovian
jovian.__version__
'0.1.54.local'
jovian.commit()
[jovian] Saving notebook..
jovian.log_hyperparams({"lr": 0.01, "bs": 32})
[jovian] Hypermaters logged.
jovian.commit()
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-2-7f2017c1a3df> in <module>
----> 1 jovian.commit()
NameError: name 'jovian' is not defined