yxchspring / MIAS

Mammographic Image Classification with Deep Fusion Learning
15 stars 6 forks source link

Facing problem while rerunning your models #1

Open singhsukhendra opened 4 years ago

singhsukhendra commented 4 years ago

Dear Sir , I tried to run your model on google colab and got the error 'ValueError: could not broadcast input array from shape (0,72,72,3) into shape (32,72,72,3)'. Can you help me to resolve it. code

yxchspring commented 4 years ago

Dear friend,

I think the main reason for this question is probably that you didn't set up the 'train_dir', 'val_dir', and 'test_dir folders.

The specific steps are as follows, Take the 'train_dir' for an example: Step1. Firstly, you should randomly extract more patches (e.g. 500 patches for Normal class, 2000 for Tumor class) from the images located in 'MIAS_ROIs/train' folder.  Step2. Create a new folder as showed in 'base_dir' variable in our procedure. And create two subfolders named 'Normal' and 'Tumor':

Step3. Finally, you should copy the randomly extracted patches from Normal class and Tumor class at the 'MIAS_ROIs/train' folder of Step1 into the two subfolders  'Normal' and 'Tumor' of Step2, respectively.

Hope this can help you.

Sincerely, Xiangchun Yu  School of Information Engineering Jiangxi University of Science and Technology Ganzhou, 341000, P.R. China

 

------------------ 原始邮件 ------------------ 发件人: "Sukhendra Singh"<notifications@github.com>; 发送时间: 2020年4月1日(星期三) 凌晨2:00 收件人: "yxchspring/MIAS"<MIAS@noreply.github.com>; 抄送: "Subscribed"<subscribed@noreply.github.com>; 主题: [yxchspring/MIAS] Facing problem while rerunning your models (#1)

Dear Sir , I tried to run your model on google colab and got the error 'ValueError: could not broadcast input array from shape (0,72,72,3) into shape (32,72,72,3)'. Can you help me to resolve it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

singhsukhendra commented 4 years ago

Hi, thanks for replying,I exactly did the same what you mentioned , still I am getting the same error as below. Please suggest the link from which I can download more patches (2000 Tumor 500 Normal). Since the zip folder in the repository has a very few patches.Please help.

Regards Sukhendra Singh

Found 0 images belonging to 0 classes. Traceback (most recent call last): File "/content/MIAS/Comparative1_DenseNet_NT.py", line 73, in train_features, train_labels = extract_features(train_dir, 103447, 3) File "/content/MIAS/Comparative1_DenseNet_NT.py", line 63, in extract_features features[i batch_size : (i + 1) batch_size] = features_batch ValueError: could not broadcast input array from shape (0,72,72,3) into shape (32,72,72,3)