Example of using neural networks to predict file type by it's signature.
Idea of project is to estimate how we can predict (by using neural networks) type of file by it's signature.
mallocmatrix with size 256x256 and set it to zero,- Read file into byte array,
- Moving along array, get byte pairs
iandj, - Increase
matrix[i][j]by one.
- Using neural networks from
pytorch, - Using
Numpy APIfor fast signature calculating,
- Create environment via
condaormamba,
$ conda env create -n filetype_prediction
$ conda activate filetype_prediction
$ conda install -f environtment.yaml- With activated environment run
build.shto build the module, - Create data directory and needed subdirectories,
$ mkdir -p data/{wav, pdf} # For example- Copy needed files into directories (I used
findwith-execparameter), - Run
jupyter notebookand runpipeline.ipynbnotebook, - At the end you can see accuracy.
- Inspiration video: https://youtu.be/AUWxl0WdiNI?si=mklboGVUC-mZ-d1M
- Explanation of signatures collecting: https://youtu.be/4bM3Gut1hIk?si=zSGWLHKTKW7bStPb
- NumPy C-API (Python C extensions): https://youtu.be/45TOazYbedI?si=jykTbnbjcyzTsN0r

