-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrain_deformable-detr.sh
More file actions
executable file
·51 lines (46 loc) · 1.73 KB
/
train_deformable-detr.sh
File metadata and controls
executable file
·51 lines (46 loc) · 1.73 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# microsoft/conditional-detr-resnet-50
# SenseTime/deformable-detr
# --num_queries 100 \ check where to add
# this parameter unfortunatly produces errors in the framework
# Test other warmup ratios from 1% to 10% (1e-2 to 1e-1)
# Maybe decrease LR to 1e-5?
# https://huggingface.co/docs/autotrain/object_detection_params
# https://github.com/huggingface/transformers/blob/main/examples/pytorch/object-detection/README.md
# https://github.com/huggingface/transformers/blob/main/src/transformers/training_args.py
# Force use of GPU 0 to avoid nn.DataParallel issue
export CUDA_VISIBLE_DEVICES=0
# NVIDIA RTX 5090
# --per_device_train_batch_size 3 \
# NVIDIA RTX 6000 Ada
# --per_device_train_batch_size 4 \
# https://huggingface.co/docs/transformers/model_doc/deformable_detr
python run_object_detection.py \
--model_name_or_path SenseTime/deformable-detr \
--dataset_name RoblabWhGe/FireDetDataset \
--do_train true \
--do_eval true \
--output_dir models/detr-sensetime-finetuned-firedetv1 \
--num_train_epochs 50 \
--image_square_size 1333 \
--fp16 false \
--learning_rate 1e-5 \
--weight_decay 1e-4 \
--warmup_ratio 5e-2 \
--max_grad_norm 1.0 \
--dataloader_num_workers 16 \
--dataloader_prefetch_factor 2 \
--per_device_train_batch_size 3 \
--gradient_accumulation_steps 1 \
--dataloader_drop_last true \
--remove_unused_columns false \
--eval_do_concat_batches false \
--ignore_mismatched_sizes true \
--metric_for_best_model eval_map \
--greater_is_better true \
--logging_strategy epoch \
--save_total_limit 2 \
--push_to_hub false \
--push_to_hub_model_id detr-finetuned-cppe-5-10k-steps \
--hub_strategy end \
--seed 1337