img_data_base64= request.POST.get("img_data")
img_data=base64.b64decode(img_data_base64)
nparr = np.fromstring(img_data,np.uint8)
img=cv2.imdecode(nparr,cv2.COLOR_BGR2RGB)
img_data_base64= request.POST.get("img_data")
image=io.BytesIO(img_data)
img = Image.open(image)