Assume you have a image sequence to track particles in it. First detect particles on all frames and then track using their positions.
We use DL_Particle_Detection to detect, and MoTT to track.
As introduced in MoTT /DATASET.md, we download the challenge image.
Install DL_Particle_Detection according to the Installation. Download the pretrained deepBlink model checkpoints at link.
python infer_one_thre_onlypred.py \
--test_datapath='/data/ldap_shared/synology_shared/zyd/data/20220611_detparticle/challenge/MICROTUBULE snr 7 density low/' \
--ckpt_path='./pretrained_model/MICROTUBULE_SNR7/checkpoints_113.pth' \
--exp_name='MICROTUBULE_SNR7_densitylow_deepBlink'
python utils/detcsv2xml.py \
--det_folder='./Log/20240301_11_12_50_MICROTUBULE_SNR7_deepBlink_eval/prediction_0.5' \
--detfor_track='./detfor_track'
Install MoTT according to the Installation. Download the pretrained MoTT model checkpoint at link.
Make the directory like this:
|-- ${rootdir}
`-- |-- DL_Particle_Detection
`-- MoTT
# cd MoTT
CUDA_VISIBLE_DEVICES=2 python tracking.py \
--test_path='../DL_Particle_Detection/detfor_track/MICROTUBULE snr 7 density low.xml' \
--model_ckpt_path='./pretrained_model/MICROTUBULE_snr_1247_density_low/20220406_11_18_51.chkpt' \
--eval_save_path='./prediction/'
python vis_tracks.py \
--imgfolder='/data/ldap_shared/synology_shared/zyd/data/20220611_detparticle/challenge/MICROTUBULE snr 7 density low' \
--trackcsvpath='./prediction/20240301_15_25_56/track_result.csv' \
--vis_save='./prediction/20240301_15_25_56/track_vis'
As introduced in MoTT /DATASET.md, we download the training image with .xml lable file and challenge image with its .xml label file.
Install DL_Particle_Detection according to the Installation.
(1) Convert the track lable file (.xml) to detection label file for training and evaluation.
# training data
python utils/xml2csv.py \
--imgfolder='/data/ldap_shared/synology_shared/zyd/data/20220611_detparticle/training/MICROTUBULE snr 7 density low' \
--track_xmlpath='/data/ldap_shared/synology_shared/zyd/data/20220611_detparticle/training/MICROTUBULE snr 7 density low/MICROTUBULE snr 7 density low.xml'
# challenge data
python utils/xml2csv.py \
--imgfolder='/data/ldap_shared/synology_shared/zyd/data/20220611_detparticle/challenge/MICROTUBULE snr 7 density low' \
--track_xmlpath='/data/ldap_shared/synology_shared/zyd/data/20220611_detparticle/challenge/MICROTUBULE snr 7 density low.xml'
(2) Split train val data
python utils/split_trainval.py \
--img_folder='/data/ldap_shared/synology_shared/zyd/data/20220611_detparticle/training/MICROTUBULE snr 7 density low' \
--save_path='/data/ldap_shared/synology_shared/zyd/data/20220611_detparticle/training/MICROTUBULE snr 7 density low' \
--split_p=0.8
(3) Train detection model
python trainval.py \
--train_datapath='/data/ldap_shared/synology_shared/zyd/data/20220611_detparticle/training/MICROTUBULE snr 7 density low_train/' \
--val_datapath='/data/ldap_shared/synology_shared/zyd/data/20220611_detparticle/training/MICROTUBULE snr 7 density low_val/' \
--exp_name='MICROTUBULE_SNR7_low_density_deepBlink'
(4) Evaluation on challenge data
python infer_determine_thre.py \
--val_datapath='/data/ldap_shared/synology_shared/zyd/data/20220611_detparticle/training/MICROTUBULE snr 7 density low_val/' \
--test_datapath='/data/ldap_shared/synology_shared/zyd/data/20220611_detparticle/challenge/MICROTUBULE snr 7 density low/' \
--ckpt_path='Log/20240301_17_18_13_MICROTUBULE_SNR7_low_density_deepBlink_trainval/checkpoints/checkpoints_138.pth' \
--exp_name='MICROTUBULE_SNR7_densitylow_deepBlink'
python utils/detcsv2xml.py \
--det_folder='./Log/20240304_09_08_01_MICROTUBULE_SNR7_densitylow_deepBlink_eval/prediction_0.4' \
--detfor_track='./detfor_track'
Install MoTT according to the Installation.
Make the directory like this:
|-- ${rootdir}
`-- |-- DL_Particle_Detection
`-- MoTT
(1) Make the train val file for training from original .xml label file of training data.
# cd MoTT
python generate_trainvaldata.py \
--trackxmlpath='/data/ldap_shared/synology_shared/zyd/data/20220611_detparticle/training/MICROTUBULE snr 7 density low/MICROTUBULE snr 7 density low.xml' \
--savefolder='./dataset/ISBI_trainval'
(2) Train model
CUDA_VISIBLE_DEVICES=1 python train.py \
--trainfilename='MICROTUBULE snr 7 density low' \
--train_path='./dataset/ISBI_trainval/past7_depth2_near5/MICROTUBULE snr 7 density low_train.txt' \
--val_path='./dataset/ISBI_trainval/past7_depth2_near5/MICROTUBULE snr 7 density low_val.txt'
(3) Tracking
CUDA_VISIBLE_DEVICES=1 python tracking.py \
--test_path='../DL_Particle_Detection/detfor_track/MICROTUBULE snr 7 density low.xml' \
--model_ckpt_path='./checkpoint/20240304_09_38_32_MICROTUBULE_snr_7_density_low_ckpt/20240304_09_38_53.chkpt' \
--eval_save_path='./prediction/'
(4) Evaluation
python eval.py \
--GTxmlpath='/data/ldap_shared/synology_shared/zyd/data/20220611_detparticle/challenge/MICROTUBULE snr 7 density low.xml' \
--pred_xmlpath='./prediction/20240304_10_08_22/track_result.xml'
python vis_tracks.py \
--imgfolder='/data/ldap_shared/synology_shared/zyd/data/20220611_detparticle/challenge/MICROTUBULE snr 7 density low' \
--trackcsvpath='./prediction/20240304_10_08_22/track_result.csv' \
--vis_save='./prediction/20240304_10_08_22/track_vis'