Reading image file (file storage object) using CV2
I am sending an image by curl to flask server, i am using this curl command curl -F "file=@image.jpg" http://localhost:8000/home and I am trying to read the file using CV2 on the server side. On the server side I handle the image by this code @app.route('/home', methods=['POST']) def home(): data =request.files['file'] img = cv2.imread(data) fact_resp= model.predict(img) return jsonify(fact_resp) I am getting this error- img = cv2.imread(data) TypeError: expected string or Unicode object, FileStorage found How do I read the file using CV2 on the server side? Thanks! I had similar issues while