Skip to content

CrovaxTheCursed/CNN_GCN_Malware_Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Creating the CNN dataset

create_images.py

Converts files from an input folder into grayscale PNG images and saves them under an output label folder.

Usage

python create_images.py -f <folder_path> -o <output_folder> -l

-f, --folder-path: Path to the folder containing input files -o, --output-folder: Path where converted images will be saved -l, --label: Output subfolder label. Must be one of: -- malicious -- benign

Output

Images are saved to: <output_folder>//

Each file is converted to a 224 x 224 grayscale PNG using its stem as the output filename.

Example

python create_images.py -f ./malware_dataset/malicious -o ./malware_images -l malicious

Notes

  • The script reads each file as raw bytes and maps the bytes into a grayscale image.
  • The current implementation counts .exe files in its status message, but it iterates over all files in the folder during conversion.

About

CNN binary classification project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors