forked from skypilot-org/skypilot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
detectron2_app.yaml
48 lines (35 loc) · 1.14 KB
/
detectron2_app.yaml
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
name: detectron2-app
resources:
accelerators: V100
setup: |
pip install --upgrade pip
conda activate d2
if [ $? -eq 0 ]; then
echo "conda env exists"
else
conda create -n d2 python=3.8 -y
conda activate d2
pip install torch torchvision
git clone https://github.com/facebookresearch/detectron2
cd detectron2
pip install -e .
fi
cd tools
mkdir -p datasets/coco
cd datasets/coco
wget http://images.cocodataset.org/zips/train2017.zip
wget http://images.cocodataset.org/zips/val2017.zip
unzip train2017.zip
unzip val2017.zip
rm train2017.zip
rm val2017.zip
wget http://images.cocodataset.org/annotations/annotations_trainval2017.zip
wget http://images.cocodataset.org/annotations/stuff_annotations_trainval2017.zip
unzip annotations_trainval2017.zip
unzip stuff_annotations_trainval2017.zip
rm annotations_trainval2017.zip
rm stuff_annotations_trainval2017.zip
run: |
conda activate d2
cd detectron2/tools
python train_net.py --config-file ../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml --num-gpus 1 SOLVER.IMS_PER_BATCH 2 SOLVER.BASE_LR 0.0025 SOLVER.MAX_ITER 100