a574824551 / Malware_detection_system_based_CNN

本科毕业设计,参考LENET-5模型,将恶意软件转化为灰度图,通过卷积神经网络实现了恶意软件检测分类,准确率达98%。
19 stars 1 forks source link

SOME BUG ISSUES #3

Open LamentXU123 opened 1 month ago

LamentXU123 commented 1 month ago

HI! ur program is NICE! but i've met some problem when using it, and I actually SOLVE it on my own, there is my issues and solusions XD hope for ur reply!

so first, here image maybe the logic should be:

        if (Label[i]==1):
            img = imread(filepath +"1_"+Name[i]+".png") #载入标签为1的图片
            #print (img)
        if (Label[i]==0):
            img = imread(filepath +"0_"+Name[i]+".png") #载入标签为0的图片
            #print (img)
        imga=img.astype('float32') #像素矩阵类型设置为float32
        X.append(imga) #将一个图片的像素矩阵添加进X

it's better, right? o( ̄▽ ̄)o so obviously u have made a mistake here, it is CRITICAL, so plz fix it

next, some spelling and import problems image I know u initially make the TranAsmToByte() and GreyImg() in one func, but when u split it, maybe u forget t change the var name XD change FileName to filename image same quesion, change str2 to temp_str plz image and here, maybe u miss a

from PIL import Image

fix it plz OK THE LAST ONE image its not correct to reshape like this, maybe u should fix it The only args that is correct is when BATCH_SIZE = 1, the reshape works(32*32==1024)

LamentXU123 commented 1 month ago

Im not sure what u want to do in the LAST BUG, the reshape is confusing..... and btw Im not good at machine learning so i really can't understand why u reshaped the 'xs' in such way HOPE FOR UR RELY!