![]() ![]() If you guys can help me out in any way I'd be grateful thanks for looking into it :). Here's how my images are stored - training_data Here's the error ValueError: setting an array element with a sequence. Img_data=cv2.cvtColor(img_data, cv2.COLOR_BGR2GRAY)īut when I try to convert the array into float32 data type I get the ValueError img_data = img_data.astype('float32') How to Fix ValueError: setting an array element with sequence Numpy is a comprehensive python library that allows you to easily work with mathematical data. The easiest way to fix the valueerror setting an array element with a sequence code is to remove the arrays with different dimensions. The dataset is twitter dataset, as it can contain mainly un-processed tweets, so I first processed the data, by cleaning the punctuations and un-used words or not-meaningful words. ![]() Img_data = cv2.imread(dir_path '\\' img_path) Guys, I am making a Sentiment Analysis Classifier and now I am stuck with a problem called ValueError: setting an array element with a sequence. I took a bunch of images converted them into gray then stored them into img_data_list then i converted them to a numpy array everything works fine untill now here's part of code that works import cv2ĭir_path = 'I:\\project_face_detection\\face_detetion\\training_data\\' person
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |