BloodNet: An attention-based deep network for accurate, efficient, and costless bloodstain time since deposition inference
The time since deposition (TSD) of a bloodstain, i.e., the time of a bloodstain formation is an essential piece of biological evidence in crime scene investigation. The practical usage of these existing microscopic methods is limited, as their performance strongly relies on high-end instrumentation and/or rigorous laboratory conditions. This paper presents a practically applicable deep learning-based method (i.e., BloodNet) for efficient, accurate, and costless TSD inference from a macroscopic view, i.e., by using easily accessible bloodstain photos. To this end, we established a benchmark database containing around 50,000 photos of bloodstains with varying TSDs.
1. Install git
git clone https://github.com/shenxiaochenn/BloodNet.git && cd BloodNet
3.1 Install Conda
3.2 Install dependency in command line
conda create -n bloodnet python=3.8
conda activate bloodnet
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
pip install -r requirements.txt
4.1 Download the data.zip Dataset under "./data/".
5.1 Download the model_weight model weights under "./weight/".
----bloodnet50_new.pth The weights corresponding to the classification model.
----bloodnet50_reg.pth The weights corresponding to the regression model.
----bloodnet(small).pth The weights corresponding to the small classification model.
----seresnet50-60a8950a85b2b.pkl The weights corresponding to the Imagenet pretrain model.
First, you need to put the data into the data folder and the weights of the model into the weight folder.
(the accuaracy of bloodnet in test dataset)
CUDA_VISIBLE_DEVICES=0,1,2 python testset_test.py
(the R^2 of bloodnet in test dataset)
CUDA_VISIBLE_DEVICES=0,1,2 python regression_test.py
cd ./BloodNet/train_test/
CUDA_VISIBLE_DEVICES=0,1,2 python main_train.py --weights='../weight/bloodnet50_new.pth' --batch_size=64 --learning_rate=3e-4 --num_workers=8
cd ./BloodNet/train_test/
CUDA_VISIBLE_DEVICES=0,1,2 python main_regression.py --weights '../weight/seresnet50-60a8950a85b2b.pkl' --batch_size=128 --learning_rate=3e-4 --num_workers=8
Data | weights | |
---|---|---|
link(bai du) | bloodstain | model weights |
access code | shen | chen |
link(figshare) | data | model_weight |
The name of each folder implies the label of the category (regression).