- 9 April 2022
- 5 - 10 PM
- I.M.S.C Dhanush, NOFRA, Navy Nagar, Mumbai
#pickle dict with image in Python2 (2.7.6 used) | |
frame = cv2.imread('input.jpg') | |
img_str = cv2.imencode('.jpg', frame)[1].tostring() | |
data = {'img': img_str} | |
with open('pickledObj.pkl', 'wb') as outfile: | |
pickle.dump(data, outfile) | |
# unpickle in Python3 (Python 3.4.3 used for testing) using encoding=latin1 | |
with open('pickledObj.pkl', 'rb') as f: | |
data_dict = pickle.load(f, encoding='latin1') |
import tensorflow as tf | |
import numpy as np | |
import pandas as pd | |
from sklearn.datasets import load_boston | |
import matplotlib.pyplot as plt | |
boston=load_boston() | |
type(boston) | |
boston.feature_names |