-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpredict.slurm
More file actions
34 lines (28 loc) · 847 Bytes
/
Copy pathpredict.slurm
File metadata and controls
34 lines (28 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#SBATCH --job-name=nuclei_predict
#SBATCH --partition=gpu
#SBATCH --gres=gpu:1
#SBATCH --cpus-per-task=4
#SBATCH --mem=16G
#SBATCH --time=02:00:00
#SBATCH --output=outputs/predict-%j.out
# Load necessary modules
module load python/3.10
module load cuda/11.8
# Don'f forget to activate your virtual environment
source .venv/bin/activate
# Use the best model (mAP) by default
CHECKPOINT="checkpoints/best_model_mAP.pth.tar"
INPUT_DIR="data/data-science-bowl-2018/stage1_train"
OUTPUT_DIR="outputs/train_predictions"
# Create output folder if missing
mkdir -p $OUTPUT_DIR
echo "Running prediction on $INPUT_DIR using $CHECKPOINT"
# Run the predict script
python src/predict.py \
--checkpoint $CHECKPOINT \
--input_dir $INPUT_DIR \
--output_dir $OUTPUT_DIR \
--visualize \
--save_masks \
--save_original_size