This is a tool kit for Automatic Bloodstain Spatter Pattern analysis.
It provides automatic dectection and segmentation of stains then various stain and pattern metrics are computed.
Includes a table view and annotated image view.
Depends on python3, opencv, matplotlib, numpy, pyqt4, progressbar, scipy
python app.py
Analyse on image
python stain_segmentation.py -f [file from base] -F [full file path] -o [output path] -b [True | False] -s [scale]
see --help for details
Analyse a folder of images
python batch_processing.py -F [path to folder] -o [output folder] -s [scale]
see --help for details
Included in this repo there is an implementation for a converlotional neural network that classifies between Cast off, expirated and impact patterns.
It uses transfer learning with ResNet using Pytorch. The code is basically the transfer learning tutorial from pytorch see here( https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html) for more details.
It depends on pytorch and has been set up with GPU enabled.
To run it first change the path of the dataset then to train use
python transfer_resnet.py
to evaluate use
python transfer_resnet.py --model [path to your model here]
This requires the image to be cropped to 1000-1000 around the highest density of stains. Code to automate this is in the branch "cropping-at-highest-density" inside this repo.
For more information see the report attached to this repo or email me at clairelouisebarnaby@gmail.com
For further work on this repo see https://docs.google.com/document/d/1_ieyeSxFw5pi7pMLjonNRQM7eUtoN1-qwqkRn5WOLdY/edit?usp=sharing