-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcommands.txt
169 lines (120 loc) · 6.32 KB
/
commands.txt
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
/research/axns2/mabdelfa/VOC2012/
1. Train an image classifier for generating CAMs
CUDA_VISIBLE_DEVICES=0,1,2 python3 train_classification_with_puzzle.py --architecture resnest101 \
--re_loss_option masking --re_loss L1_Loss --alpha_schedule 0.50 --alpha 4.00 \
--tag ResNeSt101@Puzzle@optimal --data_dir /research/axns2/mabdelfa/dataset_conversion/
CUDA_VISIBLE_DEVICES=0 python3 inference_classification.py --architecture resnest101 \
--tag ResNeSt101@Puzzle@optimal --domain train_aug \
--data_dir /research/axns2/mabdelfa/dataset_conversion \
python3 make_affinity_labels.py --experiment_name ResNeSt101@Puzzle@optimal@train@scale=0.5,1.0,1.5,2.0 \
--domain train_aug --fg_threshold 0.40 --bg_threshold 0.10 \
--data_dir /research/axns2/mabdelfa/dataset_conversion/
CUDA_VISIBLE_DEVICES=0,1,2 python3 train_affinitynet.py --architecture resnest101 \
--tag AffinityNet@ResNeSt-101@Puzzle \
--label_name ResNeSt101@Puzzle@optimal@train@scale=0.5,1.0,1.5,2.0@aff_fg=0.40_bg=0.10 \
--data_dir /research/axns2/mabdelfa/dataset_conversion/
CUDA_VISIBLE_DEVICES=0 python3 inference_rw.py --architecture resnest101 \
--model_name AffinityNet@ResNeSt-101@Puzzle \
--cam_dir ResNeSt101@Puzzle@optimal@train@scale=0.5,1.0,1.5,2.0 \
--domain train_aug --data_dir /research/axns2/mabdelfa/dataset_conversion/
python3 make_pseudo_labels.py --experiment_name AffinityNet@ResNeSt-101@Puzzle@train@beta=10@exp_times=8@rw \
--domain train_aug --threshold 0.35 --crf_iteration 1 --data_dir /research/axns2/mabdelfa/dataset_conversion/
CUDA_VISIBLE_DEVICES=0,1,2 python3 train_segmentation.py --backbone resnest101 --mode fix --use_gn True \
--tag DeepLabv3+@ResNeSt-101@Fix@GN \
--label_name AffinityNet@ResNeSt-101@Puzzle@train@beta=10@exp_times=8@rw@crf=1 \
--data_dir /research/axns2/mabdelfa/dataset_conversion/
CUDA_VISIBLE_DEVICES=0 python3 inference_segmentation.py \
--backbone resnest101 --mode fix --use_gn True \
--tag DeepLabv3+@ResNeSt-101@Fix@GN --scale 0.5,1.0,1.5,2.0 --iteration 10 \
--data_dir /research/axns2/mabdelfa/dataset_conversion/
python3 evaluate.py --experiment_name DeepLabv3+@ResNeSt-101@Fix@GN@val@scale=0.5,1.0,1.5,2.0@iteration=10 \
--domain val --gt_dir /research/axns2/mabdelfa/dataset_conversion/SegmentationClass
python3 evaluate.py --experiment_name DeepLabv3+@ResNeSt-101@Fix@GN@val@scale=0.5,1.0,1.5,2.0@iteration=10 \
--domain val --mode png
view sizes of all files:
du -h --max-depth=1 ./
view sizes of all files including hidden files:
du -sch .[!.]* * |sort -h
get file count within directory:
ls | wc -l
copy multiple files:
cp -t /path/to/dst/ file1 file2 file3
move multiple files:
mv -t dest_path file1 file2 file3
https://drive.google.com/drive/folders/1_ik8n5Q4C77X-aIfKiqidFEDQ6zY9JNM?usp=sharing
$ wget --no-check-certificate 'https://drive.google.com/uc?export=download&id=1_ik8n5Q4C77X-aIfKiqidFEDQ6zY9JNM' \
-O SegmentationClassAug
To extract .tar.gz files:
tar -xf archive.tar.gz
To install package in user folder:
pip install --user [package_name]
To start jupyter Notebook:
jupyter notebook --ip=127.0.0.1
Fiftyone convert dataset formats:
To download google drive directory:
./gdrive download --recursive '<folderID>'
URL: https://www.linuxandubuntu.com/home/google-drive-cli-client-for-linux
to delete a screen:
screen -XS [screen_id] quit
INPUT_DIR=$(fiftyone zoo datasets find cifar10 --split test)
OUTPUT_DIR=/tmp/fiftyone/cifar10-dir-tree
fiftyone convert \
--input-dir /research/axns2/mabdelfa/zerowaste/zerowaste-w/org \
--input-type fiftyone.types.ImageClassificationDirectoryTree \
--output-dir /research/axns2/mabdelfa/before_after_voc_format \
--output-type fiftyone.types.VOCDetectionDataset
CUDA_VISIBLE_DEVICES=0,1 python scripts/zerowaste_drs_binary_cls.py \
--img_dir=/research/axns2/mabdelfa/zerowaste/zerowaste-w \
--lr=0.001 \
--epoch=3 \
--decay_points='5,10' \
--delta=0 \
--logdir=logs/DRS_learnable \
--save_folder=checkpoints/DRS_learnable \
--show_interval=10
pytorch for cuda 11.3:
pip install --pre torch torchvision torchaudio -f https://download.pytorch.org/whl/nightly/cu113/torch_nightly.html
get torch version:
python -c "import torch; print(torch.__version__)"
git commands:
git rm --cached -r .
git commit --amend -CHEAD
git push origin_osama HEAD:master
git filter-branch --index-filter 'git rm --cached --ignore-unmatch PuzzleCAM/resnest101-22405ba7.pth \
PuzzleCAM/resnet101-5d3b4d8f.pth'
git show remote origin url:
git remote -v
get rid of arrowed directory:
1- remove subdirectory/.git directory
2- git rm --cached subdirectory
3- git add .
4- git commit -m "comment"
5- git push -u origin_osama master
save unstaged changes for later:
git stash save 'will come back to continue working later on'
convert_annotation mscoco_segmentation \
--annotation_file /research/axns2/mabdelfa/coco/annotations/instances_val2017.json
--semantic_only True \
--masks_dir /research/axns2/mabdelfa/sem_conv \
--convert_COCO_to_VOC_labels True
# Train a new model starting from pre-trained COCO weights
python3 coco.py train --dataset=/research/axns2/mabdelfa/coco/ --model=coco
# Train a new model starting from ImageNet weights
python3 samples/coco/coco.py train --dataset=/research/axns2/mabdelfa/coco/ --model=imagenet
# Continue training a model that you had trained earlier
python3 samples/coco/coco.py train --dataset=/research/axns2/mabdelfa/coco/ --model=/path/to/weights.h5
# Continue training the last model you trained. This will find
# the last trained weights in the model directory.
python3 samples/coco/coco.py train --dataset=/research/axns2/mabdelfa/coco/ --model=last
python train_SEAM.py --voc12_root /research/axns2/mabdelfa/dataset_conversion \
--weights resnet38_SEAM.pth \
--session_name zerowaste
python infer_SEAM.py --weights zerowaste.pth \
--infer_list voc12/train_aug.txt \
--out_cam ./cam --out_crf ./crf \
--voc12_root /research/axns2/mabdelfa/dataset_conversion
python make_cls_labels.py --voc12_root /research/axns2/mabdelfa/dataset_conversion
python main.py --mode='train' \
--train_path='/research/axns2/mabdelfa/zerowaste_msra_format/image' \
--label_path='/research/axns2/mabdelfa/zerowaste_msra_format/annotations' \
--batch_size=8 --visdom=False --train_file='/research/axns2/mabdelfa/zerowaste_msra_format/train_cvpr2013.txt'