orz2333 commited on
Commit
d239e33
·
verified ·
1 Parent(s): 9930253

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. EgoHOS/raw/script/.gitignore +16 -0
  2. EgoHOS/raw/script/LICENSE +21 -0
  3. EgoHOS/raw/script/README.md +200 -0
  4. EgoHOS/raw/script/build_env.sh +9 -0
  5. EgoHOS/raw/script/ccda/composite.py +106 -0
  6. EgoHOS/raw/script/ccda/extract_feature.py +36 -0
  7. EgoHOS/raw/script/commit.sh +10 -0
  8. EgoHOS/raw/script/data/view?usp=sharing +3 -0
  9. EgoHOS/raw/script/demo/cb.gif +3 -0
  10. EgoHOS/raw/script/demo/teaser.gif +3 -0
  11. EgoHOS/raw/script/demo/twohands_obj1_optimized.gif +3 -0
  12. EgoHOS/raw/script/demo/twohands_obj2_optimized.gif +3 -0
  13. EgoHOS/raw/script/demo/twohands_optimized.gif +3 -0
  14. EgoHOS/raw/script/download_checkpoints.sh +5 -0
  15. EgoHOS/raw/script/download_datasets.sh +6 -0
  16. EgoHOS/raw/script/download_testimages.sh +4 -0
  17. EgoHOS/raw/script/download_testvideos.sh +4 -0
  18. EgoHOS/raw/script/mmsegmentation/.circleci/config.yml +161 -0
  19. EgoHOS/raw/script/mmsegmentation/.dev/batch_test_list.py +133 -0
  20. EgoHOS/raw/script/mmsegmentation/.dev/batch_train_list.txt +19 -0
  21. EgoHOS/raw/script/mmsegmentation/.dev/benchmark_evaluation.sh +41 -0
  22. EgoHOS/raw/script/mmsegmentation/.dev/benchmark_inference.py +149 -0
  23. EgoHOS/raw/script/mmsegmentation/.dev/benchmark_train.sh +40 -0
  24. EgoHOS/raw/script/mmsegmentation/.dev/check_urls.py +101 -0
  25. EgoHOS/raw/script/mmsegmentation/.dev/gather_benchmark_evaluation_results.py +91 -0
  26. EgoHOS/raw/script/mmsegmentation/.dev/gather_benchmark_train_results.py +100 -0
  27. EgoHOS/raw/script/mmsegmentation/.dev/gather_models.py +211 -0
  28. EgoHOS/raw/script/mmsegmentation/.dev/generate_benchmark_evaluation_script.py +114 -0
  29. EgoHOS/raw/script/mmsegmentation/.dev/generate_benchmark_train_script.py +91 -0
  30. EgoHOS/raw/script/mmsegmentation/.dev/log_collector/example_config.py +18 -0
  31. EgoHOS/raw/script/mmsegmentation/.dev/log_collector/log_collector.py +143 -0
  32. EgoHOS/raw/script/mmsegmentation/.dev/log_collector/readme.md +143 -0
  33. EgoHOS/raw/script/mmsegmentation/.dev/log_collector/utils.py +20 -0
  34. EgoHOS/raw/script/mmsegmentation/.dev/md2yml.py +291 -0
  35. EgoHOS/raw/script/mmsegmentation/.dev/upload_modelzoo.py +45 -0
  36. EgoHOS/raw/script/mmsegmentation/.gitignore +120 -0
  37. EgoHOS/raw/script/mmsegmentation/.owners.yml +10 -0
  38. EgoHOS/raw/script/mmsegmentation/.pre-commit-config.yaml +57 -0
  39. EgoHOS/raw/script/mmsegmentation/.readthedocs.yml +9 -0
  40. EgoHOS/raw/script/mmsegmentation/CITATION.cff +8 -0
  41. EgoHOS/raw/script/mmsegmentation/LICENSE +203 -0
  42. EgoHOS/raw/script/mmsegmentation/MANIFEST.in +4 -0
  43. EgoHOS/raw/script/mmsegmentation/README.md +230 -0
  44. EgoHOS/raw/script/mmsegmentation/cleanup_ckpt.py +19 -0
  45. EgoHOS/raw/script/mmsegmentation/configs/_base_/datasets/ade20k.py +54 -0
  46. EgoHOS/raw/script/mmsegmentation/configs/_base_/datasets/ade20k_640x640.py +54 -0
  47. EgoHOS/raw/script/mmsegmentation/configs/_base_/datasets/chase_db1.py +59 -0
  48. EgoHOS/raw/script/mmsegmentation/configs/_base_/datasets/cityscapes.py +54 -0
  49. EgoHOS/raw/script/mmsegmentation/configs/_base_/datasets/cityscapes_1024x1024.py +35 -0
  50. EgoHOS/raw/script/mmsegmentation/configs/_base_/datasets/cityscapes_768x768.py +35 -0
EgoHOS/raw/script/.gitignore ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.jpg
2
+ *.png
3
+
4
+ *.pt
5
+ *.pth
6
+
7
+ *.zip
8
+ *.tar
9
+
10
+ # /mmsegmentation
11
+ /data
12
+ /data_to_release
13
+ /testimages
14
+ /testvideos
15
+
16
+ /mmsegmentation/work_dirs_exp
EgoHOS/raw/script/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2022 owenzlz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
EgoHOS/raw/script/README.md ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # EgoHOS
2
+ [Project Page](https://www.seas.upenn.edu/~shzhou2/projects/eos_dataset/) | [Paper](https://arxiv.org/pdf/2208.03826.pdf) | [Bibtex](https://scholar.googleusercontent.com/scholar.bib?q=info:fjdxr9gmTfgJ:scholar.google.com/&output=citation&scisdr=CgVB6GfVENSznnaBOqE:AAGBfm0AAAAAYvmHIqG6dxrrnCPKbcHuv2lyNg5mgWfH&scisig=AAGBfm0AAAAAYvmHIgRZZnzwOLARESMy3LGZV2cCOHLQ&scisf=4&ct=citation&cd=-1&hl=en)
3
+
4
+ <img src="https://github.com/owenzlz/EgoHOS/blob/main/demo/teaser.gif" style="width:800px;">
5
+
6
+ **Fine-Grained Egocentric Hand-Object Segmentation: Dataset, Model, and Applications**\
7
+ *European Conference on Computer Vision (ECCV), 2022*\
8
+ [Lingzhi Zhang*](https://owenzlz.github.io/), [Shenghao Zhou*](https://scholar.google.com/citations?user=kWdwbUYAAAAJ&hl=en), [Simon Stent](https://scholar.google.com/citations?user=f3aij5UAAAAJ&hl=en), [Jianbo Shi](https://www.cis.upenn.edu/~jshi/) (* indicates equal contribution)
9
+
10
+ Our main goal is to provide a tool for better hand-object segmentation on the in-the-wild egocentric videos.
11
+
12
+ ## Prerequisites
13
+ - Linux
14
+ - Python 3
15
+ - NVIDIA GPU + CUDA CuDNN
16
+
17
+ **Table of Contents:**<br>
18
+ 1. [Setup](#setup) - download pretrained models and resources
19
+ 2. [Datasets](#datasets) - download our egocentric hand-object segmentation datasets
20
+ 3. [Checkpoints](#checkpoints) - download the checkpoints for all our models
21
+ 4. [Inference on Images](#inference_on_images) - quick usage on images
22
+ 5. [Inference on Videos](#inference_on_videos) - quick usage on videos<br>
23
+ 6. [Other Resources](#other_github) - other resources used in our papers<br>
24
+
25
+ ## Setup
26
+ - Clone this repo:
27
+ ```bash
28
+ git clone https://github.com/owenzlz/EgoHOS
29
+ ```
30
+
31
+ - Install dependencies:
32
+ ```bash
33
+ pip install -r requirements.txt
34
+ pip install -U openmim
35
+ mim install mmcv-full==1.6.0
36
+ cd mmsegmentation
37
+ pip install -v -e .
38
+ ```
39
+ For more information, please refer to MMSegmentation: https://mmsegmentation.readthedocs.io/en/latest/
40
+
41
+ <a name="datasets"/>
42
+
43
+ ## Datasets
44
+ - Download our dataset using the following command line.
45
+ ```bash
46
+ bash download_datasets.sh
47
+ ```
48
+
49
+ After downloading, the dataset is structured as follows:
50
+ ```bash
51
+ - [egohos dataset root]
52
+ |- train
53
+ |- image
54
+ |- label
55
+ |- contact
56
+ |- val
57
+ |- image
58
+ |- label
59
+ |- contact
60
+ |- test_indomain
61
+ |- image
62
+ |- label
63
+ |- contact
64
+ |- test_outdomain
65
+ |- image
66
+ |- label
67
+ |- contact
68
+ ```
69
+
70
+ In each label image, the category ids are referred as below. In the contact labels, 'ones' indicate the dense contact region.
71
+ ```bash
72
+ 0 -> background
73
+ 1 -> left hand
74
+ 2 -> right hand
75
+ 3 -> 1st order interacting object by left hand
76
+ 4 -> 1st order interacting object by right hand
77
+ 5 -> 1st order interacting object by both hands
78
+ 6 -> 2nd order interacting object by left hand
79
+ 7 -> 2nd order interacting object by right hand
80
+ 8 -> 2nd order interacting object by both hands
81
+ ```
82
+
83
+ <a name="checkpoints"/>
84
+
85
+ ## Checkpoints
86
+
87
+ - Download checkponts and config files:
88
+ ```bash
89
+ bash download_checkpoints.sh
90
+ ```
91
+
92
+
93
+ <a name="inference_on_images"/>
94
+
95
+ ## Inference on Images
96
+
97
+ - Let's first download a few test images for running the demo:
98
+ ```bash
99
+ bash download_testimages.sh
100
+ ```
101
+
102
+ Depending on the application scenarios, you may want to use one of these commands to generate the segmentation predictions. Please modify the image directory paths in the bash file if needed. The backen segmentation model is Swin-L backbone with UPerNet head.
103
+
104
+ The default of the bash commands run on the images in "./testimages/images", and the results are saved in "./testimages" folder. If you wish to test on your own images, you may either put your images into "./testimages/images" folder or change directories in the bash files.
105
+
106
+ - Predict two hands, contact boundary, and interacting objects (1st order) sequentially.
107
+ ```bash
108
+ cd mmsegmentation # if you are not in this directory
109
+ bash pred_all_obj1.sh
110
+ ```
111
+
112
+ <img src="https://github.com/owenzlz/EgoHOS/blob/main/demo/twohands_obj1_optimized.gif" style="width:850px;">
113
+
114
+ - Predict two hands, contact boundary, and interacting objects (1st and 2nd orders) sequentially.
115
+ ```bash
116
+ cd mmsegmentation # if you are not in this directory
117
+ bash pred_all_obj2.sh
118
+ ```
119
+
120
+ <img src="https://github.com/owenzlz/EgoHOS/blob/main/demo/twohands_obj2_optimized.gif" style="width:850px;">
121
+
122
+ If you only want to predict only hand/contact segmentation, or want to use each module separately, see the commands below.
123
+
124
+ - Predict only the left and right hands.
125
+ ```bash
126
+ cd mmsegmentation # if you are not in this directory
127
+ bash pred_twohands.sh
128
+ ```
129
+
130
+ <img src="https://github.com/owenzlz/EgoHOS/blob/main/demo/twohands_optimized.gif" style="width:850px;">
131
+
132
+ - Predict the dense contact boundary.
133
+ ```bash
134
+ cd mmsegmentation # if you are not in this directory
135
+ bash pred_cb.sh
136
+ ```
137
+
138
+ <img src="https://github.com/owenzlz/EgoHOS/blob/main/demo/cb.gif" style="width:850px;">
139
+
140
+ - Predict the (1st order) interacting objects.
141
+ ```bash
142
+ cd mmsegmentation # if you are not in this directory
143
+ bash pred_obj1.sh
144
+ ```
145
+
146
+ - Predict the (both 1st and 2nd orders) interacting objects.
147
+ ```bash
148
+ cd mmsegmentation
149
+ bash pred_obj2.sh
150
+ ```
151
+
152
+ <a name="inference_on_videos"/>
153
+
154
+ ## Inference on Videos
155
+
156
+ - Let's first download a few test videos for running the demo:
157
+ ```bash
158
+ bash download_testvideos.sh
159
+ ```
160
+
161
+ - Predict hands and (1st order) interacting objects.
162
+ ```bash
163
+ cd mmsegmentation # if you are not in this directory
164
+ bash pred_obj1_video.sh
165
+ ```
166
+
167
+ - Predict hands and (1st and 2nd orders) interacting objects.
168
+ ```bash
169
+ cd mmsegmentation # if you are not in this directory
170
+ bash pred_obj2_video.sh
171
+ ```
172
+
173
+ <a name="other_github"/>
174
+
175
+ ## Other Resouces
176
+
177
+ We used other resources for the application section, i.e. mesh reconstruction. Please refer to below:
178
+ 1. Image Inpainting - LaMa: [https://github.com/saic-mdal/lama](https://github.com/saic-mdal/lama)
179
+ 2. Video Inpainting - Flow-edge Guided Video Completion: [https://github.com/vt-vl-lab/FGVC](https://github.com/vt-vl-lab/FGVC)
180
+ 3. Mesh Reconstruction of Hand-Object Interaction: [https://github.com/hassony2/homan](https://github.com/hassony2/homan)
181
+ 4. Video Recognition - SlowFast Newtork: [https://github.com/epic-kitchens/epic-kitchens-slowfast](https://github.com/epic-kitchens/epic-kitchens-slowfast)
182
+
183
+ If you wish to generate higher quality mask, you may consider using mask refinement model, i.e. Cascade PSP: [https://github.com/hkchengrex/CascadePSP](https://github.com/hkchengrex/CascadePSP)
184
+
185
+ ### Citation
186
+ If you use this code for your research, please cite our paper:
187
+ ```
188
+ @inproceedings{zhang2022fine,
189
+ title={Fine-Grained Egocentric Hand-Object Segmentation: Dataset, Model, and Applications},
190
+ author={Zhang, Lingzhi and Zhou, Shenghao and Stent, Simon and Shi, Jianbo},
191
+ booktitle={European Conference on Computer Vision},
192
+ pages={127--145},
193
+ year={2022},
194
+ organization={Springer}
195
+ }
196
+ ```
197
+
198
+
199
+
200
+
EgoHOS/raw/script/build_env.sh ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ conda create -n open-mmlab python=3.10 -y
2
+ conda activate open-mmlab
3
+ conda install pytorch=1.11.0 torchvision cudatoolkit=11.3 -c pytorch
4
+ pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11/index.html
5
+ pip install -e .
6
+
7
+
8
+
9
+
EgoHOS/raw/script/ccda/composite.py ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from PIL import Image
2
+ import numpy as np
3
+ from skimage.io import imsave
4
+ import glob
5
+ import pdb
6
+ import os
7
+ from tqdm import tqdm
8
+ # from sklearn.metrics.pairwise import cosine_similarity
9
+ from scipy.spatial.distance import cosine
10
+ import random
11
+ from shutil import copyfile
12
+ import argparse
13
+
14
+ parser = argparse.ArgumentParser(description="composite")
15
+ parser.add_argument("--aug_numbers", default=3, type=int)
16
+ parser.add_argument("--top_k", default=10, type=int)
17
+ parser.add_argument("--random_aug", default=True, type=bool)
18
+ parser.add_argument("--composite_hr", default=True, type=bool)
19
+ parser.add_argument("--hr_img_dir", default='/mnt/session_space/home/lingzzha/EgoHOS/data/train/image', type=str)
20
+ parser.add_argument("--hr_lbl_dir", default='/mnt/session_space/home/lingzzha/EgoHOS/data/train/label', type=str)
21
+ parser.add_argument("--img_dir", default='/mnt/session_space/home/lingzzha/EgoHOS/data/train/image_512', type=str)
22
+ parser.add_argument("--lbl_dir", default='/mnt/session_space/home/lingzzha/EgoHOS/data/train/label_512', type=str)
23
+ parser.add_argument("--lama_dir", default='/mnt/session_space/home/lingzzha/EgoHOS/data/train/lama_512', type=str)
24
+ parser.add_argument("--lama_feat_dir", default='/mnt/session_space/home/lingzzha/EgoHOS/data/train/lama_512_feature', type=str)
25
+ parser.add_argument("--aug_img_dir", default='/mnt/session_space/home/lingzzha/EgoHOS/data/train/image_ccda', type=str)
26
+ parser.add_argument("--aug_lbl_dir", default='/mnt/session_space/home/lingzzha/EgoHOS/data/train/label_ccda', type=str)
27
+ args = parser.parse_args()
28
+
29
+ os.system('rm -rf ' + args.aug_img_dir); os.makedirs(args.aug_img_dir, exist_ok = True)
30
+ os.system('rm -rf ' + args.aug_lbl_dir); os.makedirs(args.aug_lbl_dir, exist_ok = True)
31
+
32
+ # Load combine features into a list
33
+ fname_list = []
34
+ feature_list = []
35
+ for file in glob.glob(args.lama_feat_dir + '/*'):
36
+ fname = os.path.basename(file).split('.')[0]
37
+ feature = np.load(file)
38
+ # print(feature.shape)
39
+ feature_list.append(feature)
40
+ fname_list.append(fname)
41
+
42
+
43
+
44
+ # composite images and generate labels
45
+ for file in tqdm(glob.glob(args.lama_feat_dir + '/*')):
46
+
47
+ query_fname = os.path.basename(file).split('.')[0]
48
+ query_feature = np.load(file)
49
+
50
+ score_list = []
51
+ for feature in feature_list:
52
+ score = cosine(query_feature, feature)
53
+ if score != 0.0:
54
+ score_list.append(score)
55
+
56
+ sorted_index_list = np.argsort(np.array(score_list))
57
+
58
+ if args.random_aug:
59
+ top_k_sorted_index_list = sorted_index_list
60
+ else:
61
+ top_k_sorted_index_list = sorted_index_list[:args.top_k]
62
+
63
+ for aug_idx in range(args.aug_numbers):
64
+
65
+ size_match = False
66
+ while not size_match:
67
+ sample_idx = random.randint(0, len(top_k_sorted_index_list)-1)
68
+ index = top_k_sorted_index_list[sample_idx]
69
+ select_fname = fname_list[index]
70
+
71
+ query_img = np.array(Image.open(os.path.join(args.img_dir, query_fname + '.jpg')))
72
+ query_lbl = np.array(Image.open(os.path.join(args.lbl_dir, query_fname + '.png')))
73
+ query_msk = np.zeros((query_lbl.shape)); query_msk[query_lbl>0] = 1
74
+ query_msk = np.repeat(np.expand_dims(query_msk, 2), 3, 2)
75
+ select_img = np.array(Image.open(os.path.join(args.lama_dir, select_fname + '.jpg')))
76
+
77
+ if query_img.shape == select_img.shape:
78
+ size_match = True
79
+
80
+ if args.composite_hr:
81
+ hr_query_img = np.array(Image.open(os.path.join(args.hr_img_dir, query_fname + '.jpg')))
82
+ hr_query_lbl = np.array(Image.open(os.path.join(args.hr_lbl_dir, query_fname + '.png')))
83
+ hr_query_msk = np.zeros((hr_query_lbl.shape)); hr_query_msk[hr_query_lbl>0] = 1
84
+ hr_query_msk = np.repeat(np.expand_dims(hr_query_msk, 2), 3, 2)
85
+ hr_select_img = np.array(Image.open(os.path.join(args.lama_dir, select_fname + '.jpg')).resize((hr_query_img.shape[1], hr_query_img.shape[0])))
86
+ new_img = hr_query_img * hr_query_msk + hr_select_img * (1 - hr_query_msk)
87
+ else:
88
+ new_img = query_img * query_msk + select_img * (1 - query_msk)
89
+
90
+ imsave(os.path.join(args.aug_img_dir, query_fname + '_' + str(aug_idx) + '.jpg'), new_img)
91
+ src_lbl_file = os.path.join(args.lbl_dir, query_fname + '.png')
92
+ dst_lbl_file = os.path.join(args.aug_lbl_dir, query_fname + '_' + str(aug_idx) + '.png')
93
+ copyfile(src_lbl_file, dst_lbl_file)
94
+
95
+ src_ori_img_file = os.path.join(args.img_dir, query_fname + '.jpg')
96
+ dst_ori_img_file = os.path.join(args.aug_img_dir, query_fname + '.jpg')
97
+ copyfile(src_ori_img_file, dst_ori_img_file)
98
+
99
+ src_ori_lbl_file = os.path.join(args.lbl_dir, query_fname + '.png')
100
+ dst_ori_lbl_file = os.path.join(args.aug_lbl_dir, query_fname + '.png')
101
+ copyfile(src_ori_lbl_file, dst_ori_lbl_file)
102
+
103
+
104
+
105
+
106
+ # pdb.set_trace()
EgoHOS/raw/script/ccda/extract_feature.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from PIL import Image
2
+ import numpy as np
3
+ from skimage.io import imsave
4
+ import glob
5
+ import pdb
6
+ import os
7
+ import torchvision
8
+ import torch
9
+ from torchvision.models.feature_extraction import create_feature_extractor
10
+ from torchvision import transforms
11
+ from tqdm import tqdm
12
+ from shutil import copyfile
13
+
14
+ feat_extractor = torchvision.models.vgg16(pretrained=True).features.cuda()
15
+
16
+ # pdb.set_trace()
17
+
18
+ tsfm = transforms.Compose([
19
+ transforms.ToTensor(),
20
+ transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
21
+ ])
22
+
23
+ lama_dir = '/mnt/session_space/home/lingzzha/EgoHOS/data/train/lama_512'
24
+ lama_feat_dir = '/mnt/session_space/home/lingzzha/EgoHOS/data/train/lama_512_feature'
25
+ os.makedirs(lama_feat_dir, exist_ok = True)
26
+
27
+ for file in tqdm(glob.glob(lama_dir + '/*')):
28
+ fname = os.path.basename(file).split('.')[0]
29
+ clean_back = tsfm(Image.open(file).convert('RGB').resize((480, 360))).cuda()
30
+ clean_back_feat = feat_extractor(clean_back.unsqueeze(0)).reshape(-1)
31
+ clean_back_feat_np = clean_back_feat.cpu().data.numpy()
32
+ np.save(os.path.join(lama_feat_dir, fname + '.npy'), clean_back_feat_np)
33
+
34
+
35
+
36
+
EgoHOS/raw/script/commit.sh ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ if [ $# -eq 0 ]
2
+ then
3
+ message="updated";
4
+ else
5
+ message=$1;
6
+ fi
7
+ echo "commit with message: $message";
8
+ git add -A --verbose
9
+ git commit -a -m "$message"
10
+ git push --all
EgoHOS/raw/script/data/view?usp=sharing ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ <!DOCTYPE html><html dir="ltr"><head><script nonce="FDcXxSponAJzMTbkk1O-_A"> window['_DRIVE_VIEWER_ctiming']={}; </script><meta name="google" content="notranslate"><meta http-equiv="X-UA-Compatible" content="IE=edge;"><style nonce="umGBRtTci5RSt06_Da7dTQ">@font-face{font-family:'Roboto';font-style:italic;font-weight:400;font-stretch:normal;src:url(//fonts.gstatic.com/s/roboto/v48/KFOKCnqEu92Fr1Mu53ZEC9_Vu3r1gIhOszmOClHrs6ljXfMMLoHQuAj-lXYi128W0Q.woff)format('woff');}@font-face{font-family:'Roboto';font-style:normal;font-weight:300;font-stretch:normal;src:url(//fonts.gstatic.com/s/roboto/v48/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWuaabVmUiAz0klQm_20.woff)format('woff');}@font-face{font-family:'Roboto';font-style:normal;font-weight:400;font-stretch:normal;src:url(//fonts.gstatic.com/s/roboto/v48/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWubEbVmUiAz0klQm_20.woff)format('woff');}@font-face{font-family:'Roboto';font-style:normal;font-weight:500;font-stretch:normal;src:url(//fonts.gstatic.com/s/roboto/v48/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWub2bVmUiAz0klQm_20.woff)format('woff');}@font-face{font-family:'Roboto';font-style:normal;font-weight:700;font-stretch:normal;src:url(//fonts.gstatic.com/s/roboto/v48/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWuYjalmUiAz0klQm_20.woff)format('woff');}@font-face{font-family:'Google Sans';font-style:normal;font-weight:400;src:url(//fonts.gstatic.com/s/googlesans/v62/4Ua_rENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RFD48TE63OOYKtrwEIJllpy_AFyo4d4k.woff)format('woff');}@font-face{font-family:'Google Sans';font-style:normal;font-weight:500;src:url(//fonts.gstatic.com/s/googlesans/v62/4Ua_rENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RFD48TE63OOYKtrw2IJllpy_AFyo4d4k.woff)format('woff');}@font-face{font-family:'Google Sans';font-style:normal;font-weight:700;src:url(//fonts.gstatic.com/s/googlesans/v62/4Ua_rENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RFD48TE63OOYKtrzjJ5llpy_AFyo4d4k.woff)format('woff');}</style><meta name="referrer" content="origin"><title>data.zip - Google 雲端硬碟</title><script nonce="FDcXxSponAJzMTbkk1O-_A">
2
+ window['_DRIVE_VIEWER_IVIS'] = document.visibilityState;
3
+ </script><meta property="og:title" content="data.zip"><meta property="og:type" content="article"><meta property="og:site_name" content="Google Docs"><meta property="og:url" content="https://drive.google.com/file/d/1sk0TVEhZESNF67OW3fz9D5coqpIWkwuK/view?usp=sharing&amp;usp=embed_facebook"><link rel="shortcut icon" href="https://ssl.gstatic.com/docs/doclist/images/drive_favicon_2026_32dp.png"><script nonce="FDcXxSponAJzMTbkk1O-_A"> window['_DRIVE_VIEWER_ctiming']['cls']=performance.now(); </script><link rel="stylesheet" href="https://www.gstatic.com/_/apps-fileview/_/ss/k=apps-fileview.v.YaUZhAoIHKs.L.W.O/am=AAEQYA/d=0/rs=AO0039vOfqqBFwpgfQYm1neC7YsgcaijHA" data-id="_cl" nonce="umGBRtTci5RSt06_Da7dTQ"><link href="https://fonts.googleapis.com/css2?family=Google+Material+Icons:wght@400;500;700" rel="stylesheet" nonce="umGBRtTci5RSt06_Da7dTQ"><script nonce="FDcXxSponAJzMTbkk1O-_A"> window['_DRIVE_VIEWER_ctiming']['cle']=performance.now(); </script><script data-id="_gd" nonce="FDcXxSponAJzMTbkk1O-_A">window.WIZ_global_data = {"K1cgmc":"%.@.[null,null,null,[3,1,[1788395350,438512000],4],null,15]]","TSDtV":"%.@.[[null,[[45736426,null,null,0.5,null,null,\"AtjTse\"],[45798333,null,false,null,null,null,\"bk3LGf\"],[45833707,null,false,null,null,null,\"Y5BYb\"],[45755088,null,false,null,null,null,\"fzPMYc\"],[45796590,null,false,null,null,null,\"rFDJvb\"],[45776074,null,false,null,null,null,\"H0kCgf\"],[45702908,2,null,null,null,null,\"YUmR1e\"],[45794381,null,false,null,null,null,\"mPb5ue\"],[45808609,null,false,null,null,null,\"SY6Rxb\"],[45736423,null,true,null,null,null,\"KdGYpb\"],[45657263,null,false,null,null,null,\"ByEExb\"],[45769604,null,false,null,null,null,\"h14wf\"],[45822231,null,false,null,null,null,\"CwJ3S\"],[45760386,null,false,null,null,null,\"B22Yae\"],[45678214,null,null,null,\"qYGgY5L4A0suK1NZr2K0QusvQmcX\",null,\"VL579e\"],[45791957,null,true,null,null,null,\"yYo5Mc\"],[45644642,null,null,null,\"X-WS exp!\",null,\"rsrxGc\"],[45748088,null,false,null,null,null,\"KLuwTc\"],[45749331,null,false,null,null,null,\"JQs3De\"],[45696305,null,false,null,null,null,\"Uujhbc\"],[45775833,null,false,null,null,null,\"bRlUw\"],[45677009,null,false,null,null,null,\"JkUdKe\"],[45678187,null,false,null,null,null,\"OrvCpd\"],[45831222,null,false,null,null,null,\"CVzrEc\"],[45643359,null,false,null,null,null,\"GcxuKe\"],[45691859,null,true,null,null,null,\"p9TOQ\"],[45717711,null,false,null,null,null,\"lhxHkd\"],[45775398,null,false,null,null,null,\"ejP0Cd\"],[45673686,null,false,null,null,null,\"TVdkuc\"],[45673687,null,false,null,null,null,\"OQKgkd\"],[45762063,null,false,null,null,null,\"WlmQwb\"],[45743516,null,false,null,null,null,\"C3mEk\"],[45801628,null,false,null,null,null,\"HAOZVe\"],[45724030,null,true,null,null,null,\"V0bNGd\"],[45725105,null,true,null,null,null,\"VQN2ac\"],[45800462,null,false,null,null,null,\"ggsQnc\"],[45672211,null,false,null,null,null,\"Wgtd8c\"],[45797816,null,false,null,null,null,\"HLGpcd\"],[45693258,null,null,null,null,null,\"BrCRse\",[\"[[\\\"en\\\",\\\"en-US\\\",\\\"en-GB\\\",\\\"en-CA\\\",\\\"en-AU\\\",\\\"en-IN\\\",\\\"en-IE\\\",\\\"en-NZ\\\",\\\"en-ZA\\\"]]\"]],[45782633,null,false,null,null,null,\"CfqILe\"],[45789952,null,false,null,null,null,\"GY0Vfe\"],[45757913,null,false,null,null,null,\"qmNm7d\"],[45769936,null,false,null,null,null,\"FXtIgb\"],[45800797,null,false,null,null,null,\"oilzpb\"],[45811663,null,false,null,null,null,\"HDt2pc\"],[45668197,null,true,null,null,null,\"pReYPb\"],[45822166,null,null,null,\"Generate the draft based on these details.\",null,\"K2uSgc\"],[45674975,null,false,null,null,null,\"sBUhfc\"],[45810515,null,false,null,null,null,\"ZQkAB\"],[45830368,null,false,null,null,null,\"L0LqSd\"],[45828446,null,false,null,null,null,\"gwwDYd\"],[45706819,null,false,null,null,null,\"aPAx2b\"],[45664242,null,false,null,null,null,\"o4hKqd\"],[45700150,null,false,null,null,null,\"RLRykc\"],[45678679,null,false,null,null,null,\"HbebVe\"],[45785527,null,false,null,null,null,\"Vgzmac\"],[45772218,null,false,null,null,null,\"KV2rCe\"],[45818826,null,false,null,null,null,\"j5G1xf\"],[45822533,null,false,null,null,null,\"xXn8Hd\"],[45700770,null,false,null,null,null,\"Mk7a4d\"],[45823999,null,false,null,null,null,\"Ql2ieb\"],[45658949,null,true,null,null,null,\"NfShlf\"],[45788232,null,false,null,null,null,\"zMXnKc\"],[45807357,null,false,null,null,null,\"IQZOkd\"],[45765896,null,false,null,null,null,\"Gl5aM\"],[45749214,null,null,null,\"\",null,\"HkDBBd\"],[45729467,null,false,null,null,null,\"kKLGLb\"],[45677526,null,null,null,\"hZeGRZs5p0suK1NZr2K0V3syYPHo\",null,\"KtCfwd\"],[45825198,null,null,null,\"en\",null,\"u0wH3b\"],[45813075,null,false,null,null,null,\"aq7kZe\"],[45762489,null,false,null,null,null,\"cqFBGe\"],[45775102,null,null,null,\"\",null,\"patyy\"],[45672206,null,false,null,null,null,\"qxTK9b\"],[45709238,null,false,null,null,null,\"jQTN0e\"],[45729422,null,false,null,null,null,\"OOSdib\"],[45769440,null,true,null,null,null,\"usHrq\"],[45672527,null,false,null,null,null,\"LIKBre\"],[45798443,null,false,null,null,null,\"C687tf\"],[45654291,null,false,null,null,null,\"rhP5uf\"],[45725182,null,null,null,\"N7WcPjZPR0suK1NZr2K0TGZuB5Ce\",null,\"McLXzc\"],[45744297,null,false,null,null,null,\"HAj7Mb\"],[45754280,null,true,null,null,null,\"j636ic\"],[45796009,null,true,null,null,null,\"CUiBhe\"],[45813099,null,false,null,null,null,\"j4o8qe\"],[45744918,null,true,null,null,null,\"f9HMbb\"],[45788753,null,true,null,null,null,\"AH4mzf\"],[45672213,null,false,null,null,null,\"BfWTle\"],[45829940,null,false,null,null,null,\"XNW1dd\"],[45801776,null,false,null,null,null,\"p9rqpc\"],[45802693,null,false,null,null,null,\"QwN3Ve\"],[45730792,null,true,null,null,null,\"m0Fg3c\"],[45830404,null,false,null,null,null,\"Cb1wM\"],[45690176,null,false,null,null,null,\"qF6xVc\"],[45686663,null,false,null,null,null,\"KGh4Cc\"],[45697234,null,false,null,null,null,\"cUoIXb\"],[45748868,null,false,null,null,null,\"HraNse\"],[45751187,null,false,null,null,null,\"OuEQae\"],[45718842,null,false,null,null,null,\"Ywwwdb\"],[45811075,null,false,null,null,null,\"hdbTPe\"],[45806833,null,false,null,null,null,\"zKilSe\"],[45813683,null,false,null,null,null,\"OJ6fQc\"],[45833738,null,false,null,null,null,\"pqXscb\"],[45752852,null,false,null,null,null,\"Pdqiud\"],[45823523,null,false,null,null,null,\"L8Gquf\"],[45752686,null,false,null,null,null,\"mi0YMb\"],[45729830,null,false,null,null,null,\"DCV6If\"],[45712870,null,false,null,null,null,\"J04FPb\"],[45762802,null,false,null,null,null,\"zcN1ic\"],[45769980,null,true,null,null,null,\"GcH8If\"],[45658679,null,true,null,null,null,\"qdTkee\"],[45720792,null,false,null,null,null,\"NFUw0c\"],[45771617,null,false,null,null,null,\"Blimsc\"],[45825422,null,false,null,null,null,\"Jy7koe\"],[45783804,null,false,null,null,null,\"BBtrjb\"],[45724459,null,null,null,\"rHrAD6ykh0suK1NZr2K0TB6fPtWB\",null,\"CE91jd\"],[45779204,null,false,null,null,null,\"yC3ALe\"],[45812171,null,false,null,null,null,\"eKX1Fe\"],[45776409,null,false,null,null,null,\"G5gJw\"],[45660690,null,false,null,null,null,\"ovKHsb\"],[45816614,null,null,null,null,null,\"y9Fone\",[\"[[\\\"en\\\"]]\"]],[45792493,null,false,null,null,null,\"fYmo4c\"],[45808544,null,false,null,null,null,\"EteYEb\"],[45769474,null,false,null,null,null,\"u2dq9e\"],[45821527,null,false,null,null,null,\"Rqnnh\"],[45691858,null,true,null,null,null,\"rWzu0d\"],[45751415,null,false,null,null,null,\"fJBcbd\"],[45699017,null,null,null,\"rffTE8sLk0suK1NZr2K0RtLUVxzE\",null,\"tWGWgc\"],[45728785,null,false,null,null,null,\"UPAJB\"],[45826514,null,false,null,null,null,\"l7Tcz\"],[45826219,null,false,null,null,null,\"fW98r\"],[45788422,null,false,null,null,null,\"biLVcb\"],[45686664,null,false,null,null,null,\"P0fSX\"],[45692064,null,false,null,null,null,\"wZ64Sb\"],[45773613,null,false,null,null,null,\"tDmOYe\"],[45826856,null,false,null,null,null,\"uW29Ab\"],[45711477,null,false,null,null,null,\"Rnlerd\"],[45831192,null,false,null,null,null,\"oqUgTb\"],[45676996,null,false,null,null,null,\"KFVYtf\"],[45799901,null,false,null,null,null,\"hxZa7b\"],[45802547,null,false,null,null,null,\"MSDC3c\"],[45699204,null,true,null,null,null,\"XWRwod\"],[45776401,null,false,null,null,null,\"VdeTBe\"],[45729696,null,null,1,null,null,\"UeMd4b\"],[45736179,null,false,null,null,null,\"LIe8ub\"],[45803550,null,false,null,null,null,\"G2853c\"],[45677729,null,false,null,null,null,\"wzZQPd\"],[45804726,null,false,null,null,null,\"jtTPA\"],[45826864,null,false,null,null,null,\"R8ENRd\"],[45742079,null,false,null,null,null,\"awHj9\"],[45676754,null,false,null,null,null,\"YwbU8\"],[45678215,null,null,null,\"6PSdkFYUx0suK1NZr2K0SmPPgaGe\",null,\"JR8rtc\"],[45767159,0,null,null,null,null,\"yDErgc\"],[45700504,null,false,null,null,null,\"u6ksOd\"],[45783852,1,null,null,null,null,\"Ygmeod\"],[45672085,null,false,null,null,null,\"FJbUAf\"],[45703717,null,false,null,null,null,\"ZfxSFe\"],[45762425,null,false,null,null,null,\"l5Ziqe\"],[45737769,null,false,null,null,null,\"C4gACf\"],[45679713,null,true,null,null,null,\"EEZ1dd\"],[45774501,null,false,null,null,null,\"flYjKf\"],[45766771,null,false,null,null,null,\"aCW0Qd\"],[45729695,null,true,null,null,null,\"tYEdHb\"],[45736482,null,false,null,null,null,\"DAnsv\"],[45812345,null,true,null,null,null,\"pArP2c\"],[45795492,null,false,null,null,null,\"WLRPhf\"],[45798772,null,true,null,null,null,\"Wa5bQc\"],[45747879,null,false,null,null,null,\"kZsK5\"],[45840174,null,false,null,null,null,\"lvSxBd\"],[45772691,null,false,null,null,null,\"A6J3Xb\"],[45746685,null,true,null,null,null,\"Q3KBSd\"],[45794745,null,false,null,null,null,\"tVjQye\"],[45737207,null,false,null,null,null,\"Kw5UUd\"],[45757707,null,false,null,null,null,\"yZYBLb\"],[45752219,null,false,null,null,null,\"QIG0Je\"],[45780893,null,false,null,null,null,\"sRGemf\"],[45736425,null,null,null,\"Z7vabQzZ0Bn3gbW4AcZC0TfvmSab\",null,\"fFl01\"],[45772141,null,false,null,null,null,\"jXHT1d\"],[45772275,null,false,null,null,null,\"oqsMtf\"],[45683718,null,true,null,null,null,\"zQUS6d\"],[45787122,null,false,null,null,null,\"gVnA9d\"],[45788942,null,false,null,null,null,\"Nm6g8e\"],[45751476,null,true,null,null,null,\"gwKlXb\"],[45657471,null,null,null,null,null,\"kMR5pc\",[\"[[\\\"es\\\",\\\"pt\\\",\\\"ja\\\",\\\"ko\\\",\\\"fr\\\",\\\"it\\\",\\\"de\\\",\\\"zh-CN\\\",\\\"nl\\\",\\\"tr\\\",\\\"cs\\\",\\\"sv\\\",\\\"da\\\",\\\"no\\\",\\\"pl\\\",\\\"vi\\\",\\\"th\\\",\\\"fi\\\",\\\"uk\\\",\\\"ru\\\",\\\"hu\\\",\\\"ro\\\",\\\"ms\\\",\\\"el\\\",\\\"ca\\\",\\\"ar\\\",\\\"iw\\\",\\\"he\\\",\\\"id\\\",\\\"in\\\",\\\"zh-TW\\\"]]\"]],[45772706,null,true,null,null,null,\"LZgWZ\"],[45777878,null,false,null,null,null,\"Se84Kc\"],[45658716,null,true,null,null,null,\"Fa3cob\"],[45685754,null,false,null,null,null,\"OyPt5\"],[45666088,null,false,null,null,null,\"MgfT5\"],[45771289,null,false,null,null,null,\"s7fdUc\"],[45826972,null,false,null,null,null,\"kS4SR\"],[45677456,null,false,null,null,null,\"pyUPD\"],[45658644,null,true,null,null,null,\"ZdwoD\"],[45812933,null,false,null,null,null,\"UK5Jkd\"],[45653615,null,null,null,null,null,\"lwF00d\",[\"[]\"]],[45689771,null,true,null,null,null,\"dkdoVc\"],[45811127,null,false,null,null,null,\"J6h2ze\"],[45716368,null,true,null,null,null,\"Rd9FMb\"],[45834803,null,false,null,null,null,\"ubvAHf\"],[45820644,null,false,null,null,null,\"J2lTmb\"],[45743085,null,true,null,null,null,\"Ph5VH\"],[45795480,null,true,null,null,null,\"UDqFgb\"],[45647060,null,true,null,null,null,\"uYjPWb\"],[45736698,null,false,null,null,null,\"nhgo9c\"],[45810643,null,false,null,null,null,\"qH1kDb\"],[45686666,null,false,null,null,null,\"dZ9mjb\"],[45810966,null,false,null,null,null,\"afLpfb\"],[45696552,null,true,null,null,null,\"f1ZShc\"],[45777794,null,false,null,null,null,\"E1AmL\"],[45773680,null,false,null,null,null,\"rgqUee\"],[45820148,null,false,null,null,null,\"RySIqb\"],[45765567,null,false,null,null,null,\"Gu5Dg\"],[45805719,null,false,null,null,null,\"ZZrh9e\"],[45681910,null,true,null,null,null,\"OKXfNb\"],[45662509,null,false,null,null,null,\"fLCtnf\"],[45744490,null,false,null,null,null,\"luHWB\"],[45699018,null,null,null,\"hoiy8M2zL0suK1NZr2K0T7URFV3w\",null,\"evsAs\"],[45677726,null,false,null,null,null,\"C5oZKe\"],[45727616,null,true,null,null,null,\"qNQRAf\"],[45727273,null,false,null,null,null,\"dMkROb\"],[45744236,null,false,null,null,null,\"Rnque\"],[45747674,null,false,null,null,null,\"uwvdNc\"],[45778211,null,false,null,null,null,\"W7jxNc\"],[45676183,null,false,null,null,null,\"EpABPb\"],[45833132,null,false,null,null,null,\"zROeLc\"],[45807852,null,false,null,null,null,\"O7AOQd\"],[45831194,null,false,null,null,null,\"Y12ffb\"],[45699426,null,false,null,null,null,\"qWUOSd\"],[45679175,null,false,null,null,null,\"OETeme\"],[45747909,null,false,null,null,null,\"uTkAWb\"],[45822250,null,false,null,null,null,\"mtSDUb\"],[45672203,null,false,null,null,null,\"jDBBvd\"],[45672066,null,false,null,null,null,\"E1A5lb\"],[45751947,null,false,null,null,null,\"sT6Vl\"],[45725181,null,null,null,\"Ge5kDSw2j0suK1NZr2K0WTQKW9Am\",null,\"QOhO3d\"],[45828448,null,false,null,null,null,\"eXA28b\"],[45670693,null,false,null,null,null,\"V7Wemb\"],[45730498,null,false,null,null,null,\"ZycXJf\"],[45674760,null,null,null,\"Q2udpf42g0suK1NZr2K0SS4sTYE7\",null,\"E55iCf\"],[45775584,0,null,null,null,null,\"bjSjmf\"],[45712967,null,false,null,null,null,\"rZW8ld\"],[45828444,null,false,null,null,null,\"H2Gcgc\"],[45678265,null,false,null,null,null,\"P7qpdc\"],[45801475,null,false,null,null,null,\"f7P4A\"],[45729447,null,false,null,null,null,\"hjIR6e\"],[45768846,null,false,null,null,null,\"rwPWxf\"],[45754885,null,true,null,null,null,\"rKnVYd\"],[45752217,null,false,null,null,null,\"N9LDI\"],[45808613,null,false,null,null,null,\"Ln6bt\"],[45686665,null,false,null,null,null,\"xGJelc\"],[45723911,null,false,null,null,null,\"e77Z7d\"],[45824069,null,false,null,null,null,\"Ufe4Y\"],[45770955,null,true,null,null,null,\"GYvfVc\"],[45815724,null,true,null,null,null,\"Uj8fhe\"],[45816821,null,false,null,null,null,\"mvTBld\"],[45827919,null,false,null,null,null,\"hE5Ssf\"],[45805063,null,false,null,null,null,\"Oc8xre\"],[45715074,null,true,null,null,null,\"xxxPgb\"],[45834630,null,false,null,null,null,\"stSgvb\"],[45776812,null,true,null,null,null,\"SX5Atc\"],[45677445,null,false,null,null,null,\"rPYk8\"],[45805064,null,false,null,null,null,\"c02c9e\"],[45722047,null,null,null,null,null,\"D6k5oe\",[\"[[\\\"af\\\",\\\"am\\\",\\\"ar\\\",\\\"ar-EG\\\",\\\"ar-001\\\",\\\"az\\\",\\\"be\\\",\\\"bg\\\",\\\"bn\\\",\\\"ca\\\",\\\"ceb\\\",\\\"cs\\\",\\\"da\\\",\\\"de\\\",\\\"el\\\",\\\"en\\\",\\\"es\\\",\\\"es-419\\\",\\\"es-ES\\\",\\\"es-MX\\\",\\\"es-US\\\",\\\"et\\\",\\\"eu\\\",\\\"fa\\\",\\\"fi\\\",\\\"fil\\\",\\\"fr\\\",\\\"fr-FR\\\",\\\"fr-CA\\\",\\\"gl\\\",\\\"gu\\\",\\\"hi\\\",\\\"hr\\\",\\\"ht\\\",\\\"hu\\\",\\\"hy\\\",\\\"id\\\",\\\"is\\\",\\\"it\\\",\\\"iw\\\",\\\"ja\\\",\\\"jv\\\",\\\"ka\\\",\\\"kn\\\",\\\"ko\\\",\\\"kok\\\",\\\"la\\\",\\\"lt\\\",\\\"lv\\\",\\\"mai\\\",\\\"mk\\\",\\\"ml\\\",\\\"mr\\\",\\\"ms\\\",\\\"my\\\",\\\"ne\\\",\\\"nl\\\",\\\"no\\\",\\\"nb-NO\\\",\\\"nn-NO\\\",\\\"or\\\",\\\"pa\\\",\\\"pl\\\",\\\"ps\\\",\\\"pt\\\",\\\"pt-BR\\\",\\\"pt-PT\\\",\\\"ro\\\",\\\"ru\\\",\\\"sd\\\",\\\"si\\\",\\\"sk\\\",\\\"sl\\\",\\\"sq\\\",\\\"sr\\\",\\\"sv\\\",\\\"sw\\\",\\\"ta\\\",\\\"te\\\",\\\"th\\\",\\\"tr\\\",\\\"uk\\\",\\\"ur\\\",\\\"vi\\\",\\\"zh\\\",\\\"zh-Hans-CN\\\",\\\"zh-Hant-TW\\\",\\\"zh-CN\\\",\\\"zh-TW\\\",\\\"zh-Hans\\\",\\\"zh-Hant\\\",\\\"nl-NL\\\"]]\"]],[45748403,null,false,null,null,null,\"XYCTRc\"],[45816397,null,false,null,null,null,\"ZrB7zb\"],[45699702,null,false,null,null,null,\"Xo3sI\"],[45710394,null,true,null,null,null,\"ZsDmSd\"],[45789804,null,true,null,null,null,\"ymRI8\"],[45836775,null,false,null,null,null,\"T6iBid\"],[45812735,null,false,null,null,null,\"Yk2s0e\"],[45823385,null,false,null,null,null,\"Bj7Brf\"],[45760024,null,false,null,null,null,\"iKoeab\"],[45774956,null,false,null,null,null,\"rhB3ee\"],[45721408,null,false,null,null,null,\"smbAqe\"],[45778396,null,true,null,null,null,\"iIQBF\"],[45739155,null,true,null,null,null,\"Ljfylf\"],[45812940,null,false,null,null,null,\"O22Sge\"],[45728555,null,null,null,\"3Z3irCaPh0suK1NZr2K0WwffWsWq\",null,\"ptUmFe\"],[45653421,null,true,null,null,null,\"K2C7od\"],[45644639,null,true,null,null,null,\"GoJCRc\"],[45820374,null,true,null,null,null,\"Gnzcd\"],[45744234,null,true,null,null,null,\"LtNgOd\"],[45672202,null,false,null,null,null,\"CyvTSb\"],[45726382,null,false,null,null,null,\"QUY3\"],[45724458,null,true,null,null,null,\"MRpQbd\"],[45621619,null,false,null,null,null,\"PfkIr\"],[45773994,null,false,null,null,null,\"dADOHe\"],[45826806,null,false,null,null,null,\"VOiqz\"],[45735186,null,false,null,null,null,\"SIvvz\"],[45791678,null,false,null,null,null,\"AX1Zl\"],[45822286,null,null,null,\"The draft looks good and covers everything. Finalize it.\",null,\"pwGLae\"],[45771189,null,false,null,null,null,\"N8Zn3e\"],[45802962,null,true,null,null,null,\"jVyASe\"],[45810797,null,false,null,null,null,\"mwxF4b\"],[45758631,null,false,null,null,null,\"kGhHOe\"],[45818531,null,false,null,null,null,\"UmzKbc\"],[45724460,null,null,0.5,null,null,\"U6t0Ob\"],[45730506,null,false,null,null,null,\"qhuWUc\"],[45752216,null,false,null,null,null,\"EJg6N\"],[45725770,null,true,null,null,null,\"yRc2q\"],[45708298,null,false,null,null,null,\"T4IN0c\"],[45812992,null,false,null,null,null,\"OYyUS\"],[45806359,null,false,null,null,null,\"Hc7m4c\"],[45770251,null,false,null,null,null,\"ugtdaf\"],[45821188,null,false,null,null,null,\"kIO20c\"],[45788792,null,false,null,null,null,\"NYGVYd\"],[45804556,null,false,null,null,null,\"uGfKYc\"],[45812932,null,false,null,null,null,\"cEao8\"],[45814566,null,false,null,null,null,\"UtIL3e\"],[45785103,null,false,null,null,null,\"mywtHd\"],[45703610,null,false,null,null,null,\"UtcGCc\"],[45753332,null,false,null,null,null,\"s7RHUb\"],[45767102,null,true,null,null,null,\"SFyMwf\"],[45770188,null,false,null,null,null,\"JMBoZe\"],[45725154,null,false,null,null,null,\"WbzTGf\"],[45801648,null,false,null,null,null,\"mxFwrf\"],[45800085,null,false,null,null,null,\"Wi7jZ\"],[45825060,null,false,null,null,null,\"sO2mXc\"],[45837894,null,false,null,null,null,\"RyJQZ\"],[45641838,null,false,null,null,null,\"fLPxhf\"],[45773554,null,false,null,null,null,\"twqoIf\"],[45826905,null,false,null,null,null,\"O4cAwc\"],[45723283,null,true,null,null,null,\"SoWiLc\"],[45747769,null,true,null,null,null,\"pkwVub\"],[45725720,null,true,null,null,null,\"ZBeYxd\"],[45820980,null,false,null,null,null,\"SCHNtf\"],[45755277,null,false,null,null,null,\"kHLD6e\"],[45798803,null,false,null,null,null,\"cLNSBb\"],[45686662,null,false,null,null,null,\"go03Eb\"],[45746367,null,true,null,null,null,\"GFsSZ\"],[45773549,null,false,null,null,null,\"Xo7q9d\"],[45770837,null,false,null,null,null,\"FJ461c\"],[45677461,null,null,null,null,null,\"qb66hd\",[\"[[\\\"fr\\\",\\\"es\\\",\\\"pt\\\",\\\"it\\\",\\\"de\\\",\\\"ja\\\",\\\"ko\\\"]]\"]],[45819588,0,null,null,null,null,\"wbzdub\"],[45746380,null,false,null,null,null,\"fkqxGb\"],[45793906,null,false,null,null,null,\"yLhhJb\"],[45725110,null,true,null,null,null,\"ElheSd\"],[45679439,null,false,null,null,null,\"DNzQwe\"],[45765410,null,true,null,null,null,\"CaEMO\"],[45780927,null,false,null,null,null,\"rThdVb\"],[45660287,null,false,null,null,null,\"nIuPDe\"],[45676780,null,true,null,null,null,\"GSMsUe\"],[45797188,null,false,null,null,null,\"bHmAwd\"],[45674758,null,true,null,null,null,\"ZHtfUc\"],[45672205,null,false,null,null,null,\"E7dKkc\"],[45806947,300,null,null,null,null,\"b0rpgd\"],[45752655,null,false,null,null,null,\"NsOFEe\"],[45730222,null,null,30000,null,null,\"qnlClb\"],[45796246,null,false,null,null,null,\"N0Rqe\"],[45818026,null,true,null,null,null,\"TvCGU\"],[45644640,42,null,null,null,null,\"xbuGR\"],[45829997,null,false,null,null,null,\"qcSLCe\"],[45752218,null,false,null,null,null,\"Gktqke\"],[45801316,null,false,null,null,null,\"EOyv4b\"],[45715626,null,true,null,null,null,\"ERq70c\"],[45831046,null,false,null,null,null,\"RaITsd\"],[45796251,null,false,null,null,null,\"Fdalgf\"],[45770249,null,false,null,null,null,\"cUUSDf\"],[45726852,null,false,null,null,null,\"qgjRgd\"],[45678217,null,null,0.01,null,null,\"RL6SLc\"],[45742759,null,false,null,null,null,\"hc5Fic\"],[45838812,null,false,null,null,null,\"Cwbjuf\"],[45750887,null,true,null,null,null,\"WTvwUd\"],[45684108,null,true,null,null,null,\"IHwhDb\"],[45674285,null,false,null,null,null,\"zRoGXc\"],[45746176,null,false,null,null,null,\"atfOHe\"],[45750646,null,false,null,null,null,\"ZsLlE\"],[45779046,null,false,null,null,null,\"wYy78\"],[45674761,null,null,0.5,null,null,\"GpQcOb\"],[45804808,null,false,null,null,null,\"hV66bc\"],[45677444,null,false,null,null,null,\"WYEV9b\"],[45661802,null,false,null,null,null,\"I09lfd\"],[45709342,null,false,null,null,null,\"Ab7Nmd\"],[45814269,null,false,null,null,null,\"USiRue\"],[45778160,null,false,null,null,null,\"oWcm2d\"],[45639541,null,false,null,null,null,\"LHinid\"],[45736727,null,false,null,null,null,\"JJHfwf\"],[45768825,null,false,null,null,null,\"pf4r3c\"],[45748983,null,true,null,null,null,\"s0d1Kd\"],[45719766,null,false,null,null,null,\"A3eSQd\"],[45696085,null,false,null,null,null,\"g3Gc7d\"],[45707719,null,true,null,null,null,\"GtbvFd\"],[45793966,null,false,null,null,null,\"ev0hBf\"],[45682655,null,false,null,null,null,\"riQMFe\"],[45785853,null,false,null,null,null,\"pRgIoc\"],[45798771,null,true,null,null,null,\"qgvf6d\"],[45811102,null,false,null,null,null,\"HedPKb\"],[45820748,null,false,null,null,null,\"ZyMUec\"],[45686667,null,false,null,null,null,\"ek81nf\"],[45658731,null,true,null,null,null,\"zMe6ub\"],[45756433,null,false,null,null,null,\"Zb8rLd\"],[45661086,null,false,null,null,null,\"wfVdS\"],[45774508,null,false,null,null,null,\"h5ZSZb\"],[45768710,null,false,null,null,null,\"a6GDme\"],[45658291,null,true,null,null,null,\"OSuRGd\"],[45779090,null,false,null,null,null,\"hCbIKb\"],[45681790,null,true,null,null,null,\"uPCxtc\"],[45644641,null,null,3.14159,null,null,\"FX1FL\"],[45694562,null,false,null,null,null,\"D50qNc\"],[45674759,null,null,null,\"nHWnsqMqi0suK1NZr2K0QMJZfKqX\",null,\"xH7haf\"],[45825209,null,null,null,\"1.0\",null,\"gTDjxd\"]],\"CAMSiAIdggXPs6g3A7qlDwPw/A0DhgUDqKUBA6CSIgO7/wQDkcQBA6mDAgOC3QED67EVnMMOA3cDoMdJAxADhAUD6wYDzs8GvNgFA/jsAQOT4QUDwZYAA7v2CgOGhgQDyJ/xAwO44QMD9KkGA+67BQPPBgPEpAUDzQkD+X4DAQMBA//bAwO7swQDwtcAA6q2FgOIpwSJzQL0oAgD1IAFA/+MAwOv/gMDz7ADhlEDmYkAA5vyBgP/9Q0DxagDz6knA4uTAAOglA8D070GA4XTDwOwhxe3/QbBjwCCdQPu/ADNtQgD7N4FA87GAwOIiwADg9kPA34D++0OA6EWkybS6hYDjd4LA+4RA8bkBAM\\u003d\"]]]","gnD3ee":"%.@.null,null,null,\"https://drive-qa.corp.google.com/viewer/main\"]","nQyAE":{}};</script><script nonce="FDcXxSponAJzMTbkk1O-_A"> window['_DRIVE_VIEWER_ctiming']['difs']=performance.now();</script><script nonce="FDcXxSponAJzMTbkk1O-_A">_docs_flag_initialData={"docs-ails":"docs_cold","docs-fwds":"docs_nf","docs-crs":"docs_crs_nl","docs-fl":2,"docs-hpr":0,"docs-orl":1,"docs-rls":4,"docs-shdn":0,"docs-eivt":false,"info_params":{},"docs-esaf":false,"docs-ecdh":true,"docs-pcdpoc":true,"docs-pcdpos":true,"docs-eabpcmewm":false,"docs-eabtzmewm":false,"docs-eabtsmewm":false,"docs-eaicewm":false,"docs-easdewm":true,"docs-eassewm":true,"docs-eaebewm":false,"docs-eafcmcewm":false,"docs-eavssewm":false,"docs-ebodewm":false,"docs-ebrfdewm":true,"docs-ebasdewm":false,"docs-ebpsewm":false,"docs-ecnbewm":false,"docs-ecedcdewm":true,"docs-ecsewm":true,"docs-ectdcdewm":true,"docs-ectscdewm":true,"docs-eclrbewm":false,"docs-eclsecewm":false,"docs-ecssewm":false,"docs-ectwm":true,"docs-ecgdewm":false,"docs-edsewm":true,"docs-edsnmewm":false,"docs-ewcfer":true,"docs-edwb":false,"docs-edibewm":false,"docs-edeibewm":false,"docs-eegdewm":false,"docs-ewubum":true,"docs-ewmcsm":true,"docs-ewmsm":false,"docs-eewsm":true,"docs-efcmewm":false,"docs-efrdwm":true,"docs-efasewm":false,"docs-eftsewm":false,"docs-eftbewm":false,"docs-efosewm":false,"docs-egasewm":false,"docs-eipdewm":true,"docs-elicewm":false,"docs-elmwbewm":false,"docs-elfcbewm":false,"docs-empwm":true,"docs-emdewm":true,"docs-emadwm":true,"docs-ensdewm":true,"docs-eodcewm":false,"docs-epsdewm":true,"docs-epftewm":false,"docs-eppbewm":false,"docs-epticewm":false,"docs-epacewm":false,"docs-epbtewm":false,"docs-eppvdewm":true,"docs-eppmewm":false,"docs-epecewm":false,"docs-eptsewm":false,"docs-eqsewm":false,"docs-erssewm":true,"docs-ertdewm":true,"docs-erhswm":true,"docs-esacewm":false,"docs-essr":true,"docs-essewm":false,"docs-esswm":false,"docs-esspm":false,"docs-esndewm":true,"docs-esdwm":false,"docs-esosewm":true,"docs-esssewm":false,"docs-esctwm":false,"docs-ettpdewm":true,"docs-ettrsewm":false,"docs-etsewm":false,"docs-etibewm":false,"docs-etesewm":false,"docs-etcsewm":false,"docs-ethsewm":false,"docs-eupubw":true,"docs-evgcewm":false,"docs-evosewm":false,"docs-evpsewm":false,"docs-evssewm":false,"docs-ewbm":true,"docs-mm":10,"docos-edpc":false,"docos-dphl":10000,"docos-drpdhl":10000,"docos-rppl":500,"docos-dpsl":9900,"docos-drpdsl":9900,"docs-cpr":true,"docs-ededsi":false,"docos-ehs":false,"docos-svt":true,"docos-edim":false,"uls":"","docs-idu":false,"customer_type":"ND","docs-obsImUrl":"https://ssl.gstatic.com/docs/common/netcheck.gif","docs-ecuach":false,"docs-ecci":false,"docs-esi":false,"docs-cei":{"i":[119621970,120157457,104804614,118086126,71710108,116263262,94353316,95112801,117037036,102343508,119012218,120794203,119621918,119919349,105198363,94618570,102638676,117322450,94785217,115665259,120156651,117623329,120426060,118201649,103289239,115665053,119617725,120142997,105373852,120118527,5703839,116076931,118127417,118029479,102402747,117605995,117387085,94327699,115595126,104646631,102903568,5712639,117586574,102172252,102161535,5705891,120426116,117367094,116221382,119804152,49842923,101823171,117879418,120796065,120130008,120730872,118256787,120466005,116780655,120286671,119372610,101440077,118515465,118518004,120426046,95104247,119681563,119702637,71387260,115748340,71897995,118048900,49979626,119546479,118803380,105292864,120006930,119605218,119261708,94386925,101887662,102986905,120777470,120827769,105360406,115909909,120844737,119497031,115601097,117072273,116658806,116731455,120163564,120743529,101755540,116731497,116780669,102280656,119614703,71530191,119311115,101917313,120175735,71466055,104699552,101755277,115779929,105149076,119062018,115602101,116988272,120167725,101489584,104983137,118199438,102762243,99457755,120690294,120426081,120887330,117852704,102902836,119680688,120191506,116068806,103285834,119643433,119190847,49643963,95250137,117740485,105255626,48966262,105283795,119202386,103020683,5707899,115523440,119374116,118255420,116982420,119809656,71528565,119464292,102926571,118960936,116214017,119194870,104907899,104761819,116924363,105083816,101889091,119293887,102244537,104573987,120984491,116731469,120179208,117504291,118292268,120596845,120239570,105125305,71679568,120931079,118952797,118281092,120579837,115797534,104575428,50596302,71546253,94434465,120008191,119566016,119419030,117040879,101858249,118367905,118227608,118596023,119770533,119771879,49769385,119538776,115720084,120844545,119001825,118910289,120712199,102548689,102178330,117547609,120272513,102467190,118145060,120250430,118103519,102070744,120731459,101562434,5704693,102059569,116980395,94904117,104794551,94813451,71690008,104575964,50266070,118098217,118786509,120125484,50273576,119502687,116176757,116759629,95087074,101933579,101687005,115720072,94507615,120576484,120483779,119454356,50297104,119914541,118575744,102784956,119525133,105371951,118237083,116847578,117969970,99440921,118627677,118938369,102925887,104575457,102469728,120226258,116731511,117474414,101776165,104627935,105087676,118656885,116508647,119546493,95112053,117855979,118896675,116480001,115853408,120666077,103163072,116538464,119685921,119109622,5713195,118155217,118599449,116372585,116780711,120143457,116697559,115624494,120161435,117895888,119170349,99368700,104921554,119237709,104615703,118240044,119455890,116882883,117752081,120426144,117124356,117310258,105393799,71855058,120827678,49472091,116276369,120674277,120845149,118043885,119350208,119474802,99402399,118567262,116982842,118556075,120715208,119235569,116609599,102030570,120129980,102932635,71330062,115702580,117503045,70971144,120098787,119077183,119593068,120082249,119932767,119566753,71659921,119219126,119854012,120142711,49498961,118824422,119400592,119842254,120439872,102867943,119666015,5712270,102459956,115669406,120190047,118795508,118693884,119608200,118419988,118269249,71658008,120074344,120735843,116731483,116780683,119761007,118735220,118292282,50439148,105082085,105439319,120140964,103286492,115780346,116840699,115849193,120554207,119595095,119431313,119930509,115704452,118367507,116502867,105085057,119703112,94333061,115720096,116250773,118544277,117286879,102721160,120408014,116062638,71544762,101489874,117728341,116699457,101575568,120923250,71121016,118210163,104575722,104976605,120048979,102070958,117148952,103343798,102236194,118683653,120652090,118728537,102531768,118417412,118213591,50587050,120969800,94661850,119528430,95288996,119058022,120257690,103011547,119335779,94517171,103175878,115821365,49623489,119206377,115626507,117290278,116316526,118181395,115978411,99251931,116918027,117723597,103289121,102198390,102883861,118670996,117297874,5712647,105180942,118368884,120732422,120073907,49943087,119612423,117983437,118566888,116780725,5792878,105346112,119454229,120711531,119880877,94919060,117143747,118110602,120025503,116692559,119189032,119419133,118753232,102787603,50513182,102807818,118781281,119076662,115626226,118311127,117269005,118656218,118965154,101448280,120603287,116415982,116771276,120436318,71407161,119287101,71722094,102146515,120187379,119576803,120169628,117145820,119826325,49833490,118824725,101631299,103326475,5704745,95194617,105140173,118576741,115986513,95314650,102864151,118155115,118171101,118119545,49924734,118531449,119071848,119727972,118623879,120426130,115854856,118144504,101492879,71825351,120426095,118521977,105345089,117643128,101519308,50562726,118427977,121008559,117309322,71960368,118579784,104758764,118497535,120176233,101922868,115822433,119239792,118566900,116780697,102399829,118871022,117643696,120661046,120275439,120951758,119038566,118482456,103062254,120966894,94629725,49822889,117224167,101672658,119120935,119615510,104963390,117250831,5714051,119022300,120426074,119036806,5704621,120122557,120129994,71387957,71079826,5711538,117357721,119840989,116514189,117457826,120614412,50561411,94692486,119446117,118057581,120256340,102830995,102956633,116731525,119178779,120182620,119290946,120797339,115916255,117930847,103288394,119588326,120226273,119207523,118563498,120157452,104804609,118086120,71710100,116263257,94353308,95112793,117037028,102343500,119012212,120794198,119599143,119919341,105198358,94618554,102638671,104601638,94785209,115665254,120156646,117623323,120426054,118201633,103289234,115665048,118679281,120142990,105373844,120118521,116076925,118127412,118029473,102402739,117605990,117387079,94327691,115595110,104646626,102903560,117586569,102172244,102161527,120426110,117367088,116221374,119804144,49842915,101823163,117879413,120794711,120130002,120730864,118256780,120465997,116780649,120286666,119372604,101440072,118515459,118517998,120426040,95104239,119681555,119702629,71387252,115748334,71897987,118048893,49979618,119546473,118803374,105292856,120006922,119605210,119261700,94386917,101887654,102986897,120777465,120827764,105360398,115909901,120844732,119497026,115601089,117072268,116658801,116731449,120163559,120743521,101755535,116731491,116780663,102280648,119614697,71530183,119311110,101917305,120175727,71466047,104699544,101755272,115779921,105149071,119062010,115602096,116988264,120167720,101489579,104983129,118199432,102762235,99457747,120690287,120426076,120887325,117852699,102902828,119680681,120191501,116068798,103285826,119643427,119190842,49643955,95250121,117740479,105255618,48966254,105283787,119202378,103020675,115523435,119374110,118255415,116982412,119809651,71528557,119464287,102926563,118960928,116214009,119194865,104907891,104761811,116924358,105083808,101889083,119293882,102244529,104573979,120984486,116731463,120179202,117504283,118292262,120596839,120239562,105125297,71679560,120931070,118952789,118281084,120579829,115797529,104575423,50596294,71546245,94434457,120008183,119566008,119419025,117040874,101858244,118367897,118227602,118596018,119770525,119771871,49769377,119538769,115720079,120844539,119001820,118910283,120712193,102548681,102178322,117547601,120222179,102467185,118145052,120250425,118103514,102070736,120731452,101562426,102059561,116980387,94904109,104794543,94813443,71690000,104575959,50266062,118098209,118786501,120125479,50273568,119502682,116176749,116759624,95087066,101933571,101686997,115720067,94507599,120573340,120483772,119454351,50297096,119914536,118575738,102784948,119525128,105371943,118237075,116847573,117969965,99440913,118627669,118938363,102925879,104575452,102469720,120226251,116731505,117474409,101776149,104627929,105087668,118656880,116508642,119546487,95112045,117855973,118896670,116479751,115853403,120666070,103163064,116538456,119685915,119109614,118155211,118599441,116372577,116780705,120143451,116697553,115624489,120161430,117895880,119170344,99368692,104921549,119237704,104615695,118240038,119455882,116882876,117752075,120426138,117124349,117310250,105393791,71855050,120827668,49472083,116276361,120674270,120845143,118043880,119350203,119474794,99402391,118567254,116982834,118556067,120715203,119235564,116609591,102030562,120129974,102932627,71330054,115702575,117503037,70971136,120098782,119077175,119593060,120082244,119932762,119566747,71659913,119219121,119854007,120142704,49498953,116407933,119400586,119842248,120439867,102867935,119666007,102459948,115669398,120190042,118795502,118693879,119608194,118419982,118269244,71658000,120074338,120735838,116731477,116780677,119761002,118735214,118292276,50439140,105082077,105439311,120140959,103286484,115780338,116840694,115849188,120554201,119595087,119412195,119930504,115704447,118367501,116091118,105085049,119703104,94333053,115720091,116250765,118544270,117286871,102721155,120408009,116062630,71544754,101489869,117728333,116699449,101575563,120923244,71121008,118210158,104575717,104976597,120048971,102070950,117148946,103343790,102236186,118683648,120652083,118728532,102531763,118417404,118213586,50587042,120969795,94661842,119528422,95288980,119058017,120257682,103011539,119335774,94517155,103175870,115821357,49623481,119206371,115626499,117290270,103132928,118181389,115978406,99251923,116524154,117723591,103289116,102198382,102883853,118670990,117297869,105180934,118368876,120732417,120073901,49943079,119612419,117983432,118541633,116780719,5792862,105346104,119454224,120711524,119880872,94919052,117143742,118110594,120025498,116692554,119189027,119419128,118753224,102673495,50513174,102807810,118781276,119076657,115626218,118311122,117268997,118656213,118965149,101448275,120603282,116415974,116771270,120436312,71407145,119287095,71722078,102146507,120187374,119576796,120169620,117145812,119826320,49833482,118824720,101631291,103326467,95194601,105140165,117091085,115986507,95314642,102864143,118155108,94940234,118119539,49924726,116913348,119071842,119727967,118623871,120426124,115854848,118144499,101492871,71825343,120426090,118521972,105345084,117643120,101519300,50562718,118427971,120336729,117309314,71960360,118579779,104758759,118497529,120176225,101922860,115822425,118600863,118541625,116780691,102399821,118870266,117643688,120661041,120275434,119999033,119038558,118482448,103062246,120966889,94629717,49822881,117224159,101672653,119120930,119615505,104963382,117250826,119022292,120426068,119036798,120122552,120129988,71387949,71079818,117357715,119820261,116514183,117457818,120614405,50561403,94692478,119446111,118057575,120256334,102830990,102956625,116731519,119168749,120182615,119290941,120797333,115916250,117930842,103288386,119588321,120226267,119207517],"cf":{}},"docs-est":"CAMSFBUX9NL9N67auQayvgTkiQWnBh0H","docs-exfv":false,"docs-eagat":false,"docs-api-keys":{},"docs-effeoima":true,"docs-etut":true,"docs-emec":true,"docs-ertis":false,"docs-etsonc":false,"docs-euvtistl":false,"docs-effnp":false,"docs-effnpf":false,"docs-dcheg":false,"docs-pdhp":true,"buildLabel":"apps-fileview.texmex_20260826.10_p0","docs-show_debug_info":false,"docs-edmlf":false,"docs-eemc":false,"docs-emleow":true,"docs-emlewpc":true,"docs-rmls":"DEFAULT_NO_RETRY","ondlburl":"https://docs.google.com","drive_url":"https://drive.google.com","app_url":"https://drive.google.com/file/","drive_base_url":"https://drive.google.com","docs-umbitfdi":false,"docs-gsmd":"https://workspace.google.com","docs-icdmt":[],"docs-mip":25000000,"docs-mif":1000,"docs-msid":32767,"docs-ecshi":false,"docs-ecswi":false,"docs-emid":false,"docs-ewchd":true,"docs-mib":52428800,"docs-mid":2048,"docs-rid":1024,"docs-dgit":false,"docs-evit":false,"docs-ejsp":false,"docs-jspmpdm":30000.0,"docs-jspsim":8.0,"docs-jsptp":0.01,"docs-elbllqpm":true,"docs-phe":"https://contacts.google.com","docs-eafgl":false,"docos-dges":false,"docs-eethc":false,"docs-enees":false,"docs-eph":true,"docs-ispdr":true,"docs-istdr":false,"docs-escmv":false,"docs-sup":"/file","docs-seu":"https://drive.google.com/file/d/1sk0TVEhZESNF67OW3fz9D5coqpIWkwuK/edit","docs-ucd":"","docs-sccfo":"PROD","docs-uptc":["ofip","rr","lsrp","noreplica","ouid","ca","sh","dl","hi","hi_ext","usp","urp","utm_source","utm_medium","utm_campaign","utm_term","utm_content","aaac","sle"],"docs-doddn":"","docs-uddn":"","docs-ugn":"","docs-epg":false,"docs-epq":true,"docs-upap":"/prefs","docs-eupub":true,"docs-erdiiv":false,"docs-eemt":["image"],"docs-eqspdc":false,"docs-acap":["docs.security.access_capabilities",1,1,1,1,1,0,0,1,1,0,1,1,1,1,1,0,0,1,0,0,0,0,1,0,1,0,1,0],"docs-ci":"1sk0TVEhZESNF67OW3fz9D5coqpIWkwuK","docs-eccfs":false,"docs-eep":false,"docs-ndt":"Untitled Texmex","docs-prn":"","docs-sprn":"","docs-een":false,"docs-as":"","docs-mdck":"","docs-eccbs":false,"docs-mmpt":9000,"docs-erd":false,"docs-uootuns":false,"docs-amawso":false,"docs-ofmpp":false,"docs-anlpfdo":false,"docs-ems":"SHARE_SUBMENU","docs-glu":"","docs-wsu":"","docs-wsup":"","docs-fecgd":false,"docs-pid":"","docs-ricocpb":false,"docs-dec":false,"docs-ecgd":false,"docs-dsps":true,"docs-ezdi":false,"docs-ezduole":false,"server_time_ms":1788926276161,"gaia_session_id":"","docs-isb":false,"docs-agdc":false,"docs-anddc":true,"docs-adndldc":false,"docs-clibs":1,"docs-cide":true,"docs-cn":"","docs-dprfo":false,"docs-duesf":false,"docs-dom":false,"docs-eacr":false,"docs-eacw":false,"docs-ecer":false,"docs-ecir":true,"docs-ecssl":false,"docs-ecssi":false,"docs-ecped":true,"docs-copy-ecci":false,"docs-edpq":false,"docs-edamc":false,"docs-edomic":false,"docs-edbsms":false,"docs-eddm":false,"docos-edii":false,"docs-edspi":false,"docs-edvpim":false,"docs-edvpim2":false,"docs-fwd":false,"docs-eibs":true,"docs-elds":false,"docs-emp":false,"docs-emcf":true,"docs-emmu":false,"docs-enpks":true,"docs-eoems":false,"docs-epmi":false,"docs-epat":true,"docs-ermcf":false,"docs-erpep":true,"docs-ersd":false,"docs-esml":true,"docs-ete":false,"docs-ewlip":true,"docs-echiut":"default","docs-lfuls":false,"docs-oesf":false,"docs-oursf":false,"docs-plimif":20.0,"docs-srmdue":0.0,"docs-srmoe":0.0,"docs-srmour":0.05,"docs-srmxue":0.0,"docs-ssi":false,"docs-uoci":"","docs-wesf":true,"docs-xduesf":false,"docs-ddm":false,"docs-emmda":false,"docs-edncm":false,"docs-edailm":false,"docs-eafst":false,"docs-ectrt":false,"docs-edmt":false,"docs-elpta":false,"docs-eltafi":false,"docs-eltafip2":false,"docs-epdcl":false,"docs-eptfafi":false,"docs-eptfi":false,"docs-eptbc":false,"docs-eptfcl":false,"docs-ersrn":true,"docs-rolibilc":false,"docs-esrl":true,"docs-esqppo":true,"docs-etpi":true,"docs-ipmmp":true,"docs-emmaffr":false,"docs-emmafi":false,"docs-enpi2":true,"docs-gth":"","docs-ndsom":[],"docs-dm":"application/zip","docs-sdslm":[],"docs-sdsom":[],"opmbs":52428800,"opmpd":5000,"docs-pe":1,"ophi":"texmex","opst":"","opuci":"","docs-ehipo":false,"docs-eufop":true,"docs-drk":[],"docs-erkpp":false,"docs-erkfsu":true,"docs-eaotx":false,"docs-ecrerfmo":false,"jobset":"prod","docs-eqam":false,"docs-euaool":false,"docs-efib":false,"docs-se":false,"docs-eaaw":false,"docs-eecs":false,"docs-efsm":false,"docs-ehlbap":true,"docs-emtr":false,"docs-eocc":true,"docs-uwzh":false,"docs-egf":false,"docs-odpl":false,"docs-epbrc":false,"docs-odpdu":[null,null,null,"//drive.google.com/odp/dialog"],"docs-odpu":[null,null,null,"//drive.google.com/odp/embed"],"docs-dafjera":false,"docs-daflia":false,"docs-dafgfma":false,"docs-spdy":false,"xdbcfAllowHostNamePrefix":true,"xdbcfAllowXpc":true,"docs-dbctc":false,"docs-ebctcio":true,"docs-iror":true,"promo_url":"","promo_title":"","promo_content_html":"","promo_more_element_text":"","promo_element_id":"","promo_anchor_orientation":0,"promo_orientation":1,"promo_arrow_alignment":0,"promo_hide_arrow":false,"promo_show_on_load":false,"promo_mark_dismissed_on_show":false,"promo_use_material_styling":false,"promo_close_button_text":"","promo_icon_url":"","promo_action_id":"","promo_impression_id":0,"promo_is_contextual":false,"promo_css_class_name":"","docs-epfv":false,"docs-ccwt":80,"docs-ut":2,"docs-era":true,"docs-eegsb":false,"docs-eobew":false,"docs-dli":false,"docs-liap":"/naLogImpressions","ilcm":{"eui":"ADFN-cs-8ENosJbU2e85a6_KTXTleM0x7SmDXhlSXLoXNpqI03soC5r0CJX3pQuKpl9qBmh0aYJy","je":1,"sstu":1788926276151617,"si":"CMLS4NnN4JYDFVQeoAAdsUQzZA","gsc":null,"ei":[5703839,5704621,5704693,5704745,5705891,5707899,5711538,5712270,5712639,5712647,5713195,5714051,5792862,5792878,48966254,48966262,49472083,49472091,49498953,49498961,49623481,49623489,49643955,49643963,49769377,49769385,49822881,49822889,49833482,49833490,49842915,49842923,49924726,49924734,49943079,49943087,49979618,49979626,50266062,50266070,50273568,50273576,50297096,50297104,50439140,50439148,50513174,50513182,50561403,50561411,50562718,50562726,50587042,50587050,50596294,50596302,70971136,70971144,71079818,71079826,71121008,71121016,71330054,71330062,71387252,71387260,71387949,71387957,71407145,71407161,71466047,71466055,71528557,71528565,71530183,71530191,71544754,71544762,71546245,71546253,71658000,71658008,71659913,71659921,71679560,71679568,71690000,71690008,71710100,71710108,71722078,71722094,71825343,71825351,71855050,71855058,71897987,71897995,71960360,71960368,94327691,94327699,94333053,94333061,94353308,94353316,94386917,94386925,94434457,94434465,94507599,94507615,94517155,94517171,94618554,94618570,94629717,94629725,94661842,94661850,94692478,94692486,94785209,94785217,94813443,94813451,94904109,94904117,94919052,94919060,94940234,95087066,95087074,95104239,95104247,95112045,95112053,95112793,95112801,95194601,95194617,95250121,95250137,95288980,95288996,95314642,95314650,99251923,99251931,99368692,99368700,99402391,99402399,99440913,99440921,99457747,99457755,101440072,101440077,101448275,101448280,101489579,101489584,101489869,101489874,101492871,101492879,101519300,101519308,101562426,101562434,101575563,101575568,101631291,101631299,101672653,101672658,101686997,101687005,101755272,101755277,101755535,101755540,101776149,101776165,101823163,101823171,101858244,101858249,101887654,101887662,101889083,101889091,101917305,101917313,101922860,101922868,101933571,101933579,102030562,102030570,102059561,102059569,102070736,102070744,102070950,102070958,102146507,102146515,102161527,102161535,102172244,102172252,102178322,102178330,102198382,102198390,102236186,102236194,102244529,102244537,102280648,102280656,102343500,102343508,102399821,102399829,102402739,102402747,102459948,102459956,102467185,102467190,102469720,102469728,102531763,102531768,102548681,102548689,102638671,102638676,102673495,102721155,102721160,102762235,102762243,102784948,102784956,102787603,102807810,102807818,102830990,102830995,102864143,102864151,102867935,102867943,102883853,102883861,102902828,102902836,102903560,102903568,102925879,102925887,102926563,102926571,102932627,102932635,102956625,102956633,102986897,102986905,103011539,103011547,103020675,103020683,103062246,103062254,103132928,103163064,103163072,103175870,103175878,103285826,103285834,103286484,103286492,103288386,103288394,103289116,103289121,103289234,103289239,103326467,103326475,103343790,103343798,104573979,104573987,104575423,104575428,104575452,104575457,104575717,104575722,104575959,104575964,104601638,104615695,104615703,104627929,104627935,104646626,104646631,104699544,104699552,104758759,104758764,104761811,104761819,104794543,104794551,104804609,104804614,104907891,104907899,104921549,104921554,104963382,104963390,104976597,104976605,104983129,104983137,105082077,105082085,105083808,105083816,105085049,105085057,105087668,105087676,105125297,105125305,105140165,105140173,105149071,105149076,105180934,105180942,105198358,105198363,105255618,105255626,105283787,105283795,105292856,105292864,105345084,105345089,105346104,105346112,105360398,105360406,105371943,105371951,105373844,105373852,105393791,105393799,105439311,105439319,115523435,115523440,115595110,115595126,115601089,115601097,115602096,115602101,115624489,115624494,115626218,115626226,115626499,115626507,115665048,115665053,115665254,115665259,115669398,115669406,115702575,115702580,115704447,115704452,115720067,115720072,115720079,115720084,115720091,115720096,115748334,115748340,115779921,115779929,115780338,115780346,115797529,115797534,115821357,115821365,115822425,115822433,115849188,115849193,115853403,115853408,115854848,115854856,115909901,115909909,115916250,115916255,115978406,115978411,115986507,115986513,116062630,116062638,116068798,116068806,116076925,116076931,116091118,116176749,116176757,116214009,116214017,116221374,116221382,116250765,116250773,116263257,116263262,116276361,116276369,116316526,116372577,116372585,116407933,116415974,116415982,116479751,116480001,116502867,116508642,116508647,116514183,116514189,116524154,116538456,116538464,116609591,116609599,116658801,116658806,116692554,116692559,116697553,116697559,116699449,116699457,116731449,116731455,116731463,116731469,116731477,116731483,116731491,116731497,116731505,116731511,116731519,116731525,116759624,116759629,116771270,116771276,116780649,116780655,116780663,116780669,116780677,116780683,116780691,116780697,116780705,116780711,116780719,116780725,116840694,116840699,116847573,116847578,116882876,116882883,116913348,116918027,116924358,116924363,116980387,116980395,116982412,116982420,116982834,116982842,116988264,116988272,117037028,117037036,117040874,117040879,117072268,117072273,117091085,117124349,117124356,117143742,117143747,117145812,117145820,117148946,117148952,117224159,117224167,117250826,117250831,117268997,117269005,117286871,117286879,117290270,117290278,117297869,117297874,117309314,117309322,117310250,117310258,117322450,117357715,117357721,117367088,117367094,117387079,117387085,117457818,117457826,117474409,117474414,117503037,117503045,117504283,117504291,117547601,117547609,117586569,117586574,117605990,117605995,117623323,117623329,117643120,117643128,117643688,117643696,117723591,117723597,117728333,117728341,117740479,117740485,117752075,117752081,117852699,117852704,117855973,117855979,117879413,117879418,117895880,117895888,117930842,117930847,117969965,117969970,117983432,117983437,118029473,118029479,118043880,118043885,118048893,118048900,118057575,118057581,118086120,118086126,118098209,118098217,118103514,118103519,118110594,118110602,118119539,118119545,118127412,118127417,118144499,118144504,118145052,118145060,118155108,118155115,118155211,118155217,118171101,118181389,118181395,118199432,118199438,118201633,118201649,118210158,118210163,118213586,118213591,118227602,118227608,118237075,118237083,118240038,118240044,118255415,118255420,118256780,118256787,118269244,118269249,118281084,118281092,118292262,118292268,118292276,118292282,118311122,118311127,118367501,118367507,118367897,118367905,118368876,118368884,118417404,118417412,118419982,118419988,118427971,118427977,118482448,118482456,118497529,118497535,118515459,118515465,118517998,118518004,118521972,118521977,118531449,118541625,118541633,118544270,118544277,118556067,118556075,118563498,118566888,118566900,118567254,118567262,118575738,118575744,118576741,118579779,118579784,118596018,118596023,118599441,118599449,118600863,118623871,118623879,118627669,118627677,118656213,118656218,118656880,118656885,118670990,118670996,118679281,118683648,118683653,118693879,118693884,118728532,118728537,118735214,118735220,118753224,118753232,118781276,118781281,118786501,118786509,118795502,118795508,118803374,118803380,118824422,118824720,118824725,118870266,118871022,118896670,118896675,118910283,118910289,118938363,118938369,118952789,118952797,118960928,118960936,118965149,118965154,119001820,119001825,119012212,119012218,119022292,119022300,119036798,119036806,119038558,119038566,119058017,119058022,119062010,119062018,119071842,119071848,119076657,119076662,119077175,119077183,119109614,119109622,119120930,119120935,119168749,119170344,119170349,119178779,119189027,119189032,119190842,119190847,119194865,119194870,119202378,119202386,119206371,119206377,119207517,119207523,119219121,119219126,119235564,119235569,119237704,119237709,119239792,119261700,119261708,119287095,119287101,119290941,119290946,119293882,119293887,119311110,119311115,119335774,119335779,119350203,119350208,119372604,119372610,119374110,119374116,119400586,119400592,119412195,119419025,119419030,119419128,119419133,119431313,119446111,119446117,119454224,119454229,119454351,119454356,119455882,119455890,119464287,119464292,119474794,119474802,119497026,119497031,119502682,119502687,119525128,119525133,119528422,119528430,119538769,119538776,119546473,119546479,119546487,119546493,119566008,119566016,119566747,119566753,119576796,119576803,119588321,119588326,119593060,119593068,119595087,119595095,119599143,119605210,119605218,119608194,119608200,119612419,119612423,119614697,119614703,119615505,119615510,119617725,119621918,119621970,119643427,119643433,119666007,119666015,119680681,119680688,119681555,119681563,119685915,119685921,119702629,119702637,119703104,119703112,119727967,119727972,119761002,119761007,119770525,119770533,119771871,119771879,119804144,119804152,119809651,119809656,119820261,119826320,119826325,119840989,119842248,119842254,119854007,119854012,119880872,119880877,119914536,119914541,119919341,119919349,119930504,119930509,119932762,119932767,119999033,120006922,120006930,120008183,120008191,120025498,120025503,120048971,120048979,120073901,120073907,120074338,120074344,120082244,120082249,120098782,120098787,120118521,120118527,120122552,120122557,120125479,120125484,120129974,120129980,120129988,120129994,120130002,120130008,120140959,120140964,120142704,120142711,120142990,120142997,120143451,120143457,120156646,120156651,120157452,120157457,120161430,120161435,120163559,120163564,120167720,120167725,120169620,120169628,120175727,120175735,120176225,120176233,120179202,120179208,120182615,120182620,120187374,120187379,120190042,120190047,120191501,120191506,120222179,120226251,120226258,120226267,120226273,120239562,120239570,120250425,120250430,120256334,120256340,120257682,120257690,120272513,120275434,120275439,120286666,120286671,120336729,120408009,120408014,120426040,120426046,120426054,120426060,120426068,120426074,120426076,120426081,120426090,120426095,120426110,120426116,120426124,120426130,120426138,120426144,120436312,120436318,120439867,120439872,120465997,120466005,120483772,120483779,120554201,120554207,120573340,120576484,120579829,120579837,120596839,120596845,120603282,120603287,120614405,120614412,120652083,120652090,120661041,120661046,120666070,120666077,120674270,120674277,120690287,120690294,120711524,120711531,120712193,120712199,120715203,120715208,120730864,120730872,120731452,120731459,120732417,120732422,120735838,120735843,120743521,120743529,120777465,120777470,120794198,120794203,120794711,120796065,120797333,120797339,120827668,120827678,120827764,120827769,120844539,120844545,120844732,120844737,120845143,120845149,120887325,120887330,120923244,120923250,120931070,120931079,120951758,120966889,120966894,120969795,120969800,120984486,120984491,121008559],"crc":0,"cvi":[]},"docs-ccdil":false,"docs-eil":true,"docs-igoe":true,"docs-nrfd":false,"docs-nrfdfr":false,"docs-sdb":false,"docs-lucpf":true,"docs-hbiwud":true,"docs-iwu":{},"docs-cp-tp":6,"docs-cr-tp":5,"docs-fe-re":2,"docs-l1lc":5,"docs-l1lm":"TPE","docs-l2lc":2,"docs-l2lm":"CBF","docs-l2t":0,"docs-lsd":3,"docs-tfh":"","docs-crp":"/file/d/1sk0TVEhZESNF67OW3fz9D5coqpIWkwuK/view","docs-crq":"usp\u003dsharing","docs-ifr":false,"docs-dhnap":"drive.google.com","docs-ds":"https","docs-ipuv":true,"docs-po":"https://drive.google.com","docs-to":"https://drive.google.com","opdu":false,"opru":"https://drive.google.com/relay.html","opsmu":"https://docs.google.com/picker","opbu":"https://docs.google.com/picker","docs-eodpb":true,"docs-dcho":["https://meet.google.com"],"docs-gsoil":"docs_gsabs"}; _docs_flag_cek= null ; if (window['DOCS_timing']) {DOCS_timing['ifdld']=new Date().getTime();}</script><script nonce="FDcXxSponAJzMTbkk1O-_A"> window['_DRIVE_VIEWER_ctiming']['difl']=performance.now();</script><script nonce="FDcXxSponAJzMTbkk1O-_A">window.viewerData = {config: {'id': '1sk0TVEhZESNF67OW3fz9D5coqpIWkwuK', 'title': 'data.zip', 'isItemTrashed': false , 'documentResourceKey': '','enableEmbedDialog': true,}, configJson: ["",null,null,null,null,1,null,null,null,null,1,[1,"https://clients6.google.com",null,"AIzaSyDVQw45DwoYh632gvsP5vPDqEKvb-Ywnb8",1,null,null,null,null,"AIzaSyC1eQ1xj69IdTMeii5r7brs3R90eck-m7k",null,"/drive/v2beta",0,0,null,null,null,null,null,1],null,null,null,"https://drive.google.com",null,null,"https://drive.google.com",null,null,null,null,null,null,null,null,null,null,1,null,null,[["20260826.10_p0"],6,1,1,null,null,null,1,["ADFN-cs-8ENosJbU2e85a6_KTXTleM0x7SmDXhlSXLoXNpqI03soC5r0CJX3pQuKpl9qBmh0aYJy",1,"CMLS4NnN4JYDFVQeoAAdsUQzZA",1788926276151617,[5703839,5704621,5704693,5704745,5705891,5707899,5711538,5712270,5712639,5712647,5713195,5714051,5792862,5792878,48966254,48966262,49472083,49472091,49498953,49498961,49623481,49623489,49643955,49643963,49769377,49769385,49822881,49822889,49833482,49833490,49842915,49842923,49924726,49924734,49943079,49943087,49979618,49979626,50266062,50266070,50273568,50273576,50297096,50297104,50439140,50439148,50513174,50513182,50561403,50561411,50562718,50562726,50587042,50587050,50596294,50596302,70971136,70971144,71079818,71079826,71121008,71121016,71330054,71330062,71387252,71387260,71387949,71387957,71407145,71407161,71466047,71466055,71528557,71528565,71530183,71530191,71544754,71544762,71546245,71546253,71658000,71658008,71659913,71659921,71679560,71679568,71690000,71690008,71710100,71710108,71722078,71722094,71825343,71825351,71855050,71855058,71897987,71897995,71960360,71960368,94327691,94327699,94333053,94333061,94353308,94353316,94386917,94386925,94434457,94434465,94507599,94507615,94517155,94517171,94618554,94618570,94629717,94629725,94661842,94661850,94692478,94692486,94785209,94785217,94813443,94813451,94904109,94904117,94919052,94919060,94940234,95087066,95087074,95104239,95104247,95112045,95112053,95112793,95112801,95194601,95194617,95250121,95250137,95288980,95288996,95314642,95314650,99251923,99251931,99368692,99368700,99402391,99402399,99440913,99440921,99457747,99457755,101440072,101440077,101448275,101448280,101489579,101489584,101489869,101489874,101492871,101492879,101519300,101519308,101562426,101562434,101575563,101575568,101631291,101631299,101672653,101672658,101686997,101687005,101755272,101755277,101755535,101755540,101776149,101776165,101823163,101823171,101858244,101858249,101887654,101887662,101889083,101889091,101917305,101917313,101922860,101922868,101933571,101933579,102030562,102030570,102059561,102059569,102070736,102070744,102070950,102070958,102146507,102146515,102161527,102161535,102172244,102172252,102178322,102178330,102198382,102198390,102236186,102236194,102244529,102244537,102280648,102280656,102343500,102343508,102399821,102399829,102402739,102402747,102459948,102459956,102467185,102467190,102469720,102469728,102531763,102531768,102548681,102548689,102638671,102638676,102673495,102721155,102721160,102762235,102762243,102784948,102784956,102787603,102807810,102807818,102830990,102830995,102864143,102864151,102867935,102867943,102883853,102883861,102902828,102902836,102903560,102903568,102925879,102925887,102926563,102926571,102932627,102932635,102956625,102956633,102986897,102986905,103011539,103011547,103020675,103020683,103062246,103062254,103132928,103163064,103163072,103175870,103175878,103285826,103285834,103286484,103286492,103288386,103288394,103289116,103289121,103289234,103289239,103326467,103326475,103343790,103343798,104573979,104573987,104575423,104575428,104575452,104575457,104575717,104575722,104575959,104575964,104601638,104615695,104615703,104627929,104627935,104646626,104646631,104699544,104699552,104758759,104758764,104761811,104761819,104794543,104794551,104804609,104804614,104907891,104907899,104921549,104921554,104963382,104963390,104976597,104976605,104983129,104983137,105082077,105082085,105083808,105083816,105085049,105085057,105087668,105087676,105125297,105125305,105140165,105140173,105149071,105149076,105180934,105180942,105198358,105198363,105255618,105255626,105283787,105283795,105292856,105292864,105345084,105345089,105346104,105346112,105360398,105360406,105371943,105371951,105373844,105373852,105393791,105393799,105439311,105439319,115523435,115523440,115595110,115595126,115601089,115601097,115602096,115602101,115624489,115624494,115626218,115626226,115626499,115626507,115665048,115665053,115665254,115665259,115669398,115669406,115702575,115702580,115704447,115704452,115720067,115720072,115720079,115720084,115720091,115720096,115748334,115748340,115779921,115779929,115780338,115780346,115797529,115797534,115821357,115821365,115822425,115822433,115849188,115849193,115853403,115853408,115854848,115854856,115909901,115909909,115916250,115916255,115978406,115978411,115986507,115986513,116062630,116062638,116068798,116068806,116076925,116076931,116091118,116176749,116176757,116214009,116214017,116221374,116221382,116250765,116250773,116263257,116263262,116276361,116276369,116316526,116372577,116372585,116407933,116415974,116415982,116479751,116480001,116502867,116508642,116508647,116514183,116514189,116524154,116538456,116538464,116609591,116609599,116658801,116658806,116692554,116692559,116697553,116697559,116699449,116699457,116731449,116731455,116731463,116731469,116731477,116731483,116731491,116731497,116731505,116731511,116731519,116731525,116759624,116759629,116771270,116771276,116780649,116780655,116780663,116780669,116780677,116780683,116780691,116780697,116780705,116780711,116780719,116780725,116840694,116840699,116847573,116847578,116882876,116882883,116913348,116918027,116924358,116924363,116980387,116980395,116982412,116982420,116982834,116982842,116988264,116988272,117037028,117037036,117040874,117040879,117072268,117072273,117091085,117124349,117124356,117143742,117143747,117145812,117145820,117148946,117148952,117224159,117224167,117250826,117250831,117268997,117269005,117286871,117286879,117290270,117290278,117297869,117297874,117309314,117309322,117310250,117310258,117322450,117357715,117357721,117367088,117367094,117387079,117387085,117457818,117457826,117474409,117474414,117503037,117503045,117504283,117504291,117547601,117547609,117586569,117586574,117605990,117605995,117623323,117623329,117643120,117643128,117643688,117643696,117723591,117723597,117728333,117728341,117740479,117740485,117752075,117752081,117852699,117852704,117855973,117855979,117879413,117879418,117895880,117895888,117930842,117930847,117969965,117969970,117983432,117983437,118029473,118029479,118043880,118043885,118048893,118048900,118057575,118057581,118086120,118086126,118098209,118098217,118103514,118103519,118110594,118110602,118119539,118119545,118127412,118127417,118144499,118144504,118145052,118145060,118155108,118155115,118155211,118155217,118171101,118181389,118181395,118199432,118199438,118201633,118201649,118210158,118210163,118213586,118213591,118227602,118227608,118237075,118237083,118240038,118240044,118255415,118255420,118256780,118256787,118269244,118269249,118281084,118281092,118292262,118292268,118292276,118292282,118311122,118311127,118367501,118367507,118367897,118367905,118368876,118368884,118417404,118417412,118419982,118419988,118427971,118427977,118482448,118482456,118497529,118497535,118515459,118515465,118517998,118518004,118521972,118521977,118531449,118541625,118541633,118544270,118544277,118556067,118556075,118563498,118566888,118566900,118567254,118567262,118575738,118575744,118576741,118579779,118579784,118596018,118596023,118599441,118599449,118600863,118623871,118623879,118627669,118627677,118656213,118656218,118656880,118656885,118670990,118670996,118679281,118683648,118683653,118693879,118693884,118728532,118728537,118735214,118735220,118753224,118753232,118781276,118781281,118786501,118786509,118795502,118795508,118803374,118803380,118824422,118824720,118824725,118870266,118871022,118896670,118896675,118910283,118910289,118938363,118938369,118952789,118952797,118960928,118960936,118965149,118965154,119001820,119001825,119012212,119012218,119022292,119022300,119036798,119036806,119038558,119038566,119058017,119058022,119062010,119062018,119071842,119071848,119076657,119076662,119077175,119077183,119109614,119109622,119120930,119120935,119168749,119170344,119170349,119178779,119189027,119189032,119190842,119190847,119194865,119194870,119202378,119202386,119206371,119206377,119207517,119207523,119219121,119219126,119235564,119235569,119237704,119237709,119239792,119261700,119261708,119287095,119287101,119290941,119290946,119293882,119293887,119311110,119311115,119335774,119335779,119350203,119350208,119372604,119372610,119374110,119374116,119400586,119400592,119412195,119419025,119419030,119419128,119419133,119431313,119446111,119446117,119454224,119454229,119454351,119454356,119455882,119455890,119464287,119464292,119474794,119474802,119497026,119497031,119502682,119502687,119525128,119525133,119528422,119528430,119538769,119538776,119546473,119546479,119546487,119546493,119566008,119566016,119566747,119566753,119576796,119576803,119588321,119588326,119593060,119593068,119595087,119595095,119599143,119605210,119605218,119608194,119608200,119612419,119612423,119614697,119614703,119615505,119615510,119617725,119621918,119621970,119643427,119643433,119666007,119666015,119680681,119680688,119681555,119681563,119685915,119685921,119702629,119702637,119703104,119703112,119727967,119727972,119761002,119761007,119770525,119770533,119771871,119771879,119804144,119804152,119809651,119809656,119820261,119826320,119826325,119840989,119842248,119842254,119854007,119854012,119880872,119880877,119914536,119914541,119919341,119919349,119930504,119930509,119932762,119932767,119999033,120006922,120006930,120008183,120008191,120025498,120025503,120048971,120048979,120073901,120073907,120074338,120074344,120082244,120082249,120098782,120098787,120118521,120118527,120122552,120122557,120125479,120125484,120129974,120129980,120129988,120129994,120130002,120130008,120140959,120140964,120142704,120142711,120142990,120142997,120143451,120143457,120156646,120156651,120157452,120157457,120161430,120161435,120163559,120163564,120167720,120167725,120169620,120169628,120175727,120175735,120176225,120176233,120179202,120179208,120182615,120182620,120187374,120187379,120190042,120190047,120191501,120191506,120222179,120226251,120226258,120226267,120226273,120239562,120239570,120250425,120250430,120256334,120256340,120257682,120257690,120272513,120275434,120275439,120286666,120286671,120336729,120408009,120408014,120426040,120426046,120426054,120426060,120426068,120426074,120426076,120426081,120426090,120426095,120426110,120426116,120426124,120426130,120426138,120426144,120436312,120436318,120439867,120439872,120465997,120466005,120483772,120483779,120554201,120554207,120573340,120576484,120579829,120579837,120596839,120596845,120603282,120603287,120614405,120614412,120652083,120652090,120661041,120661046,120666070,120666077,120674270,120674277,120690287,120690294,120711524,120711531,120712193,120712199,120715203,120715208,120730864,120730872,120731452,120731459,120732417,120732422,120735838,120735843,120743521,120743529,120777465,120777470,120794198,120794203,120794711,120796065,120797333,120797339,120827668,120827678,120827764,120827769,120844539,120844545,120844732,120844737,120845143,120845149,120887325,120887330,120923244,120923250,120931070,120931079,120951758,120966889,120966894,120969795,120969800,120984486,120984491,121008559]]],null,1,null,null,[null,null,null,null,"https://accounts.google.com/ServiceLogin?service\u003dwise\u0026passive\u003d1209600\u0026continue\u003dhttps://drive.google.com/file/d/1sk0TVEhZESNF67OW3fz9D5coqpIWkwuK/view?usp%3Dsharing\u0026hl\u003dzh_TW\u0026followup\u003dhttps://drive.google.com/file/d/1sk0TVEhZESNF67OW3fz9D5coqpIWkwuK/view?usp%3Dsharing",null,null,null,1,0],null,null,1,null,null,"https://docs.google.com",null,1,[null,0],[null,null,null,null,null,"AIzaSyDVQw45DwoYh632gvsP5vPDqEKvb-Ywnb8","https://workspacevideo-pa.googleapis.com",null,null,null,null,null,null,[null,null,null,"https://youtube.googleapis.com"]],null,null,null,null,null,null,null,1,null,null,null,null,[1,1,1,1],[null,null,1,0,null,null,null,null,null,[["nHWnsqMqi0suK1NZr2K0QMJZfKqX",1,1,0.5]]],null,null,null,null,null,null,null,1,["AIzaSyCMp6sr4oTC18AWkE2Ii4UBZHTHEpGZWZM","https://blobcomments-pa.clients6.google.com",null,1,1,1,null,null,null,null,"ANONYMOUS_17612595759507348808"],null,1,null,null,1,null,null,1,null,null,null,[1,1,1],null,null,1,1,[null,null,"https://clients6.google.com","AIzaSyD_InbmSFufIEps5UAt2NmB_3LvBH3Sz_8","https://people-pa.googleapis.com",null,null,null,1,1,1],null,null,null,null,null,null,null,null,null,null,null,0,null,0,1,null,null,null,null,null,null,[0,"","","",""],1,[null,null,null,null,null,null,1],null,1,[[null,null,null,"//drive.google.com/odp/embed"],null,"/drive/v2internal","AIzaSyCIGHYEdm91p31HKyJSoU4at7IqhCViXuA",1,null,[null,null,null,"//drive.google.com/odp/dialog"]],[1],null,null,null,null,null,"https://workspace.google.com",null,null,0,null,1,null,null,null,1,["AIzaSyCMp6sr4oTC18AWkE2Ii4UBZHTHEpGZWZM","https://drivemetadata.clients6.google.com",null,"https://drivelabels.clients6.google.com",0],1,1,null,null,null,null,null,1,null,null,1,1,1,1,[null,"https://drive.google.com/picker",null,1,1,null,null,null,70,null,null,"texmex-projector"],[1],1,1,null,[["en","ar","de","en-GB","es","es-419","fr","it","ja","ko","nl","pl","pt","ru","th","tr","zh-CN","zh-TW"],"en"],1,1,null,[],1,[0,"AIzaSyDVQw45DwoYh632gvsP5vPDqEKvb-Ywnb8","appsgenaiserver-pa.clients6.google.com",0,0,"AIzaSyDVQw45DwoYh632gvsP5vPDqEKvb-Ywnb8",null,0,0,0,0,null,0,0,null,null,null,0,0,0,null,0,0,0,0,"CAMSFBUX9NL9N67auQayvgTkiQWnBh0H"],1,null,"",null,null,1,null,null,null,null,0,null,null,null,null,null,1,null,null,null,0,null,1,null,null,null,null,null,null,"https://workspaceui-pa.clients6.google.com",null,null,1,null,1,null,0,1,null,null,null,null,null,1,null,["AIzaSyAIzQ7RxEjYsw2_asv5a6KCG-N73ADyAmQ","appsgrowthpromo-pa.clients6.google.com"],null,null,null,[{"54":1,"55":1,"56":1}],null,null,null,null,null,null,null,null,["99950","apps-fileview.texmex_20260826.10_p0",0],null,1,null,null,null,null,[null,[null,null,2,"https://client-side-encryption.google.com/oidc/drive/callback",null,[1,[null,null,null,"https://client-side-encryption.google.com/drive/init"],1],1],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[{"37":"AIzaSyDVQw45DwoYh632gvsP5vPDqEKvb-Ywnb8","57":"https://clients6.google.com"}],[],null,[null,null,null,null,1],null,null,15,null,null,null,null,null,null,0,null,null,null,null,null,null,null,null,null,null,null,[1],1,null,null,null,null,null,"https://lh3.googleusercontent.com"]], itemJson: [null,"data.zip",null,null,null,null,null,null,null,"https://drive.google.com/viewer/upload?ds\u003dAPznzabiL2M0NPzocwHs9gqQespUQKkgtDQpJXS02jvFRJE0cWzbv--ZllJydZi78HcvDcFEVW2Roq-kQMdTUpFGv61oG5owWgv-FMQV0mwqr0NSIC8fleGzNHxX_LbKj68Qq6BspP4azcyAdKT5zdoGlVbmBJVI51ztzHEGGwYTDYM89IJtceuc6AJmPEzzY1ja-fNyaO5K4P2pqrDBn64969aXL9Wi_14L1_1NAnm3Xc5MY97_pVrrLmC8zIeCpZYts0hSnJy073_rF5s8wyXmXAe2H3DQ7jxmjIQygoyszrudqXUNNHqfBgqtvnbB-QgbvV15IVwbV05UTKM3hCSn1pgjFqCVk2ZsxuzbGkjNIWP1JQmAbYl6ieW-_jhy7iPXpyWyVF-uENeakSzGmBjUfNy3_45T33dKZdi7AlU6q-C5dSv9VXlrzwCVirUzlPCmQ7awQudqV-yG-4aS4gGdbq898uSgCQfzKV-K_Ti6EFgM5GTkJz_OciTZpc98-ru_p-W2G3PiAp1F7PjlTo63f4fpeFqAb8RhCLIZtpy41pGF545Xsmfk8h8rAGjlno4o7yYOhOfuajg2-V_ic_7oBXj_k9W0If9Y_k00hY2COlvQBMAncanYO0g1zqdnO8d1c1DWNLBPMOVPESlsmaAu54cUkjtb45f9Gz0nWOaa8pENkvyRLZ6X887CUcmSAcqpGgfLxXcITd6JNCyuiN7H8UB-F5QUaISVC4TCiK8HYp73wWL9dq44QKW75L_pH4UuoK2XUNDfV11h2nqI9jGhxJUum8Y_XaET10PAtuGHAS-OHYqKPFsBCLf0bDvUWAhmBXj1UMzFMWlM_AY2ys4rL2NAX7K_NxXhLHGmnsVsBCLH4myYuAFSknjtoATU5zZoldTW69z2xFDD2Rae7xlyAxdFddJ-Quule6gK6z-bDO9yPgvie9Yrf_C7ybwdRqaPkEYiWEmjiZawT3NH6Jrsx5JcUndBX3esHAFtmIufsVkM8_XqSwRhxW0HZZAo8EBdhJLDVupZAke5Wrdtce0Tf7WGKrhlkTCHxDerXdBj2CPmXQeYr4RD_LDa9hR6ffuJpIRRf3MjAlF_9qfde10oJoy1vf4neiF6a5d-TnmYkgx5zvFb4Cdyrtr71AmDbOL8wbyLcRux6PNUR_AIxsWWZKYkfPvypLPoTzIfu7dzLTCypPT7-2j22HibTsn37xKl8JmPPrBxfTSEZByYQZa-Mj_uTRRDkZoxQb49_Dz0cAklQYtE5THVsEfFtm7RzcmF11lXJefyVu6eCmA7igDrL4Sx5TwBH1fDXNi35tUbEa9KOow6xdSxmQY0N-ICW-IYfU7v3MP2p8_KYNd8y8im4Uu5KYdjzQ_ATwZCI0eANAbTZBH6r4TwdKOGCwipSkjhoQQTzdfI1fS3vR58RxcOhLI5YA62TRkPqrrTtMxqiN8XS13HE6gK481PBvXuuVLBun80Zb75iPWCTyVRwHSIHTx_g8j1vDaEXX6q-DCP0YmIVbYXmjbc0utFxryywfL7ssUclJms2mG_wFTZLrXpZQLxIUdrLScUWkG1PbmaYMPPslBSsWL4r16_QAyoonCJjW2qJoNK4SZ8SJiY0arUZu2gdTYgMP67jHFzlvvDfBd_Z1tCWRjymAgNceHZcxfbn5YpUXXnTbeiUSw1J88nzoc1q9ICM8mWx7lfSgiSiGjMkuyZ0ogx6B2RBSHJm4REIVOKkG_mc3ZNIYcCbdWf5mDn3TcFyPY9kCxzrs0GaqiB6ZJZVpESqu60lPVUJ06LjAm7dJla7l07RBZLSnfPTHP5q8FZLPIMKX7y9MU-e-QGhiLpkiJfVIvUwVONg3hvo6LtakXkh-uhniKu4DRzDczvlD_r-E1g2rWwmKy2er3_uFL5h0oKUWkVooEuwk-yHA2NSxqWLZc_H4MapTi5KxgqkGNoNw%3D%3D\u0026ck\u003ddrive\u0026dsmi\u003dtexmex\u0026p\u003dproj",null,"application/zip",null,null,6,null,"https://drive.google.com/file/d/1sk0TVEhZESNF67OW3fz9D5coqpIWkwuK/view",null,"https://drive.google.com/uc?id\u003d1sk0TVEhZESNF67OW3fz9D5coqpIWkwuK\u0026export\u003ddownload",null,5,0,null,null,null,[null,null,"4495628086"],null,null,null,null,null,0,"zip",null,[["0BwqerYHctCPpK3BVTjcrS3NrRWhkTG1DNFVKRmVNbll6Tlg0PQ"],null,["1sk0TVEhZESNF67OW3fz9D5coqpIWkwuK"]],null,null,null,null,null,null,1,null,0,null,"lingzhi1994@gmail.com",null,null,0,0,null,null,0,null,null,null,null,null,null,null,8,null,null,null,null,null,1]};</script><script nonce="FDcXxSponAJzMTbkk1O-_A"> window['_DRIVE_VIEWER_ctiming']['ogb_hs']=performance.now(); </script><script nonce="FDcXxSponAJzMTbkk1O-_A"> null </script><style nonce="umGBRtTci5RSt06_Da7dTQ">.gb_y{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;width:100%}.gb_z{box-sizing:border-box;height:48px;padding:4px}.gb_A,.gb_B,.gb_C{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;box-sizing:border-box;float:right;outline:none}.gb_D{box-sizing:border-box;display:inline-block;height:48px;outline:none;padding:4px;position:relative}.gb_E{display:none}.gb_F{display:block}.gb_H,.gb_I,.gb_J{fill:currentColor;color:#444746;color:var(--og-svg-color,var(--gm3-sys-color-on-surface-variant,#444746))}.gb_K .gb_H,.gb_K .gb_I,.gb_K .gb_J{color:#c4c7c5;color:var(--og-svg-color,var(--gm3-sys-color-on-surface-variant,#c4c7c5))}.gb_L .gb_C,.gb_M .gb_C,.gb_N .gb_C{cursor:pointer;padding:8px}.gb_O,.gb_P{display:none}.gb_y a.gb_A{border-radius:100px;background:#0b57d0;background:var(--gm3-sys-color-primary,#0b57d0);box-sizing:border-box;color:#fff;color:var(--gm3-sys-color-on-primary,#fff);display:inline-block;font-size:14px;font-weight:500;min-height:40px;outline:none;padding:10px 24px;text-align:center;text-decoration:none;white-space:normal;line-height:18px;position:relative;font-family:Google Sans Text,Roboto,Helvetica,Arial,sans-serif;min-width:85px;padding:10px 12px}.gb_y.gb_K a.gb_A{background:#c2e7ff;background:var(--gm3-sys-color-secondary-fixed,#c2e7ff);color:#001d35;color:var(--gm3-sys-color-on-secondary-fixed,#001d35)}.gb_2{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:40px;max-width:100%;overflow:hidden;overflow-wrap:break-word;word-break:break-word}.gb_T{fill:#1a73e8;margin:4px}.gb_K .gb_T{fill:#8ab4f8}@media (max-width:640px){.gb_y a.gb_A{min-width:75px}}sentinel{}</style><script nonce="FDcXxSponAJzMTbkk1O-_A"> window['_DRIVE_VIEWER_ctiming']['ogb_hl']=performance.now(); </script><script nonce="FDcXxSponAJzMTbkk1O-_A"> window['_DRIVE_VIEWER_ctiming']['hl']=performance.now(); </script></head><body role="application" class="yYWAMb vhoiae LgGVmb bvmRsc" itemscope itemtype="http://schema.org/CreativeWork/FileObject"><script nonce="FDcXxSponAJzMTbkk1O-_A"> window['_DRIVE_VIEWER_ctiming']['shs']=performance.now(); </script><script nonce="FDcXxSponAJzMTbkk1O-_A"> window['_DRIVE_VIEWER_ctiming']['shl']=performance.now(); </script><div style="display:none"><script nonce="FDcXxSponAJzMTbkk1O-_A"> window['_DRIVE_VIEWER_ctiming']['ogb_bs']=performance.now(); </script><div id="one-google-bar" class="ndfHFb-c4YZDc-Woal0c-jcJzye-ZMv3u ndfHFb-c4YZDc-n1UuX-Bz112c"><header class="gb_y gb_K" id="gb" role="none"><div class="gb_z" data-ogsr-up=""><a class="gb_A" aria-label="登入" href="https://accounts.google.com/ServiceLogin?service=wise&amp;passive=1209600&amp;osid=1&amp;continue=https://drive.google.com/file/d/1sk0TVEhZESNF67OW3fz9D5coqpIWkwuK/view?usp%3Dsharing&amp;followup=https://drive.google.com/file/d/1sk0TVEhZESNF67OW3fz9D5coqpIWkwuK/view?usp%3Dsharing&amp;ec=GAZAGQ" target="_top"><span class="gb_2">登入</span></a></div></header><script nonce="FDcXxSponAJzMTbkk1O-_A">;this.gbar_={CONFIG:[[[0,"www.gstatic.com","og.asy.en_US.eDWHD3cbK1o.es5.O","com.tw","zh-TW","25",null,null,null,null,null,null,"og.asy.rgE7U-O-MoE.L.W.O","AA2YrTtHcNEwFrre6CZw2OdtTMqZAOW-pA","AA2YrTs8gbyCCJLiqdTVQgamLKyE7-tmqA","",null,null,null,null,null,null,"25","25",null,null,null,72175901,null,0,null,1,0],[[null,null,null,"https://www.gstatic.com/og/_/js/k=og.asy.en_US.eDWHD3cbK1o.es5.O/rt=j/m=_ac,_awd,ada,lldp,qads/exm=/d=1/ed=1/rs=AA2YrTtHcNEwFrre6CZw2OdtTMqZAOW-pA"],[null,null,null,"https://www.gstatic.com/og/_/ss/k=og.asy.rgE7U-O-MoE.L.W.O/m=adcgm3/excm=/d=1/ed=1/ct=zgms/rs=AA2YrTs8gbyCCJLiqdTVQgamLKyE7-tmqA"]],[1,null,null,40400,25,"TWN","zh-TW","977211239.0",18,null,0,0,null,null,null,null,"3700949,119852746,119852748,120281895,120281898",null,null,null,"RNmgaoTADO24ruEPgeKhyAc",0,0,0,null,2,5,"ie",95,0,0,null,null,1,72175901,0,0],[0,0,0,null,"","","","",0,0,null,"",1,"","https://lh3.googleusercontent.com/ogw/default-user=s83"],[[[null,null,[null,null,null,"https://ogs.google.com/widget/callout?dc=1"],null,280,420,55,67,0,null,0,null,null,8000,null,71,4,null,null,null,null,null,null,null,null,76,null,null,null,107,108,109,"",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,0,null,null,null,null,null,null,null,null,null,null,null,null,null,0,0]],null,null,"25","25",0,0,null,"zh-TW",1,null,null,0,0,[null,"https://drive.google.com/file/d/1sk0TVEhZESNF67OW3fz9D5coqpIWkwuK/view?usp=sharing",null,null,null,0,null,0,0,"","","","https://ogads-pa.clients6.google.com",null,0,0,"","",null,0,null,86400,null,null,null,null,0,null,0,0,"1184720131",3,0,0,0,1],1,null,null,null,null,0,"",0,1,0,0,"Google 會員方案",0,"CAMSEhUX9NL9N67auQayvgTkiQWnBg==","1",0,"關閉","載入中"],null,null,[0.009999999776482582,"com.tw","25",[null,"","0",null,1,5184000,null,null,"",null,null,null,null,null,0,null,0,null,1,0,0,0,null,null,0,0,null,0,0,0,0,0],null,null,null,0]]]};</script></div><script nonce="FDcXxSponAJzMTbkk1O-_A"> window['_DRIVE_VIEWER_ctiming']['ogb_bl']=performance.now(); </script></div><meta itemprop="name" content="data.zip"><meta itemprop="faviconUrl" content="https://ssl.gstatic.com/docs/doclist/images/drive_favicon_2026_32dp.png"><meta itemprop="url" content="https://drive.google.com/file/d/1sk0TVEhZESNF67OW3fz9D5coqpIWkwuK/view?usp=sharing&amp;usp=embed_googleplus"><script async="" nonce="FDcXxSponAJzMTbkk1O-_A">(function(){var url='https://www.gstatic.com/og/_/js/k\x3dog.asy.en_US.eDWHD3cbK1o.es5.O/rt\x3dj/m\x3d_ac,_awd,ada,lldp,qads/exm\x3d/d\x3d1/ed\x3d1/rs\x3dAA2YrTtHcNEwFrre6CZw2OdtTMqZAOW-pA';var defer=false;var delay=50;'use strict';(function(){var b={createScriptURL:function(){return url}},c=window.trustedTypes,e=c?c.createPolicy("ogb#defer",b):b,d=document.currentScript;window.setTimeout(function(){var a=document.createElement("script");a.src=e.createScriptURL("");d&&(a.nonce=d.nonce);a.async=!defer;a.defer=defer;document.head.appendChild(a)},delay?delay:200)})();})();</script><link href="https://www.gstatic.com/og/_/ss/k=og.asy.rgE7U-O-MoE.L.W.O/m=adcgm3/excm=/d=1/ed=1/ct=zgms/rs=AA2YrTs8gbyCCJLiqdTVQgamLKyE7-tmqA" nonce="FDcXxSponAJzMTbkk1O-_A" id="ogb_ss" media="print" rel="stylesheet"><script nonce="FDcXxSponAJzMTbkk1O-_A">const linkEl = document.getElementById('ogb_ss');linkEl.onload = ()=> {linkEl.media = 'all'};linkEl.removeAttribute('id');</script><script nonce="FDcXxSponAJzMTbkk1O-_A"> window['_DRIVE_VIEWER_ctiming']['jls']=performance.now(); </script><script id="base-js" async type="text/javascript" src="https://www.gstatic.com/_/apps-fileview/_/js/k=apps-fileview.v.zh_TW.CrkUij6Yvgs.O/am=AAEQYA/d=1/rs=AO0039uTrxNZA26RWcvkBxlNjZpiZdFQJQ/m=v,wb?wli=v.Og19RSaogrw.inkLoadThreadedWasmModule.O%3A%3Bv.3jr15GTd0GY.inkLoadWasmModule.O%3A%3B" nonce="FDcXxSponAJzMTbkk1O-_A"></script><script nonce="FDcXxSponAJzMTbkk1O-_A">window['_DRIVE_VIEWER_stiming'] = [93,93,93,145,null,145,1788926276062];</script></body></html>
EgoHOS/raw/script/demo/cb.gif ADDED

Git LFS Details

  • SHA256: b34e96f284412adf2afaa8f5526c0766c6317f32c549236616dc78399aa5ba08
  • Pointer size: 132 Bytes
  • Size of remote file: 8.05 MB
EgoHOS/raw/script/demo/teaser.gif ADDED

Git LFS Details

  • SHA256: 29d43c94ab62cd8b29c90d6c8e400988d753edb780e6fba281b80f2c657c9119
  • Pointer size: 132 Bytes
  • Size of remote file: 8.77 MB
EgoHOS/raw/script/demo/twohands_obj1_optimized.gif ADDED

Git LFS Details

  • SHA256: ef9568be0f28f3995bd455353cb12043bcc32b426710c26eba395349ecf46bad
  • Pointer size: 133 Bytes
  • Size of remote file: 11.1 MB
EgoHOS/raw/script/demo/twohands_obj2_optimized.gif ADDED

Git LFS Details

  • SHA256: 10767902b20775977ce1fad05d7026ab1a70ca6105597e613e28228c1758196f
  • Pointer size: 133 Bytes
  • Size of remote file: 12.6 MB
EgoHOS/raw/script/demo/twohands_optimized.gif ADDED

Git LFS Details

  • SHA256: fd83a0dd2304f311debfda3e34567f1e502852abaee89b409fa81d8d2ebdba65
  • Pointer size: 133 Bytes
  • Size of remote file: 13.7 MB
EgoHOS/raw/script/download_checkpoints.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ pip install gdown
2
+ cd mmsegmentation
3
+ gdown https://drive.google.com/file/d/1DEJBeQ3cR1q7cjjzwDUIQVSoptT-y9U7/view?usp=drive_link
4
+ unzip work_dirs.zip
5
+ rm work_dirs.zip
EgoHOS/raw/script/download_datasets.sh ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ pip install gdown
2
+ mkdir data
3
+ cd data
4
+ gdown https://drive.google.com/file/d/1sk0TVEhZESNF67OW3fz9D5coqpIWkwuK/view?usp=sharing
5
+ unzip egohos_dataset.zip
6
+ rm egohos_dataset.zip
EgoHOS/raw/script/download_testimages.sh ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ pip install gdown
2
+ gdown https://drive.google.com/file/d/1G27in6x25VHdLVbftWv8ddt4kv_lyOmM/view?usp=sharing
3
+ unzip testimages.zip
4
+ rm testimages.zip
EgoHOS/raw/script/download_testvideos.sh ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ pip install gdown
2
+ gdown https://drive.google.com/file/d/1pxm-sT9idU3oa1HC6SY4vrGVvJw_ElVO/view?usp=sharing
3
+ unzip testvideos.zip
4
+ rm testvideos.zip
EgoHOS/raw/script/mmsegmentation/.circleci/config.yml ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: 2.1
2
+
3
+ jobs:
4
+ lint:
5
+ docker:
6
+ - image: cimg/python:3.7.4
7
+ steps:
8
+ - checkout
9
+ - run:
10
+ name: Install dependencies
11
+ command: |
12
+ sudo apt-add-repository ppa:brightbox/ruby-ng -y
13
+ sudo apt-get update
14
+ sudo apt-get install -y ruby2.7
15
+ - run:
16
+ name: Install pre-commit hook
17
+ command: |
18
+ pip install pre-commit
19
+ pre-commit install
20
+ - run:
21
+ name: Linting
22
+ command: pre-commit run --all-files
23
+ - run:
24
+ name: Check docstring coverage
25
+ command: |
26
+ pip install interrogate
27
+ interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-regex "__repr__" --fail-under 50 mmseg
28
+
29
+ build_cpu:
30
+ parameters:
31
+ # The python version must match available image tags in
32
+ # https://circleci.com/developer/images/image/cimg/python
33
+ python:
34
+ type: string
35
+ default: "3.7.4"
36
+ torch:
37
+ type: string
38
+ torchvision:
39
+ type: string
40
+ docker:
41
+ - image: cimg/python:<< parameters.python >>
42
+ resource_class: large
43
+ steps:
44
+ - checkout
45
+ - run:
46
+ name: Install Libraries
47
+ command: |
48
+ sudo apt-get update
49
+ sudo apt-get install -y ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 libgl1-mesa-glx libjpeg-dev zlib1g-dev libtinfo-dev libncurses5
50
+ - run:
51
+ name: Configure Python & pip
52
+ command: |
53
+ python -m pip install --upgrade pip
54
+ python -m pip install wheel
55
+ - run:
56
+ name: Install PyTorch
57
+ command: |
58
+ python -V
59
+ python -m pip install torch==<< parameters.torch >>+cpu torchvision==<< parameters.torchvision >>+cpu -f https://download.pytorch.org/whl/torch_stable.html
60
+ - run:
61
+ name: Install mmseg dependencies
62
+ command: |
63
+ python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch<< parameters.torch >>/index.html
64
+ python -m pip install mmdet
65
+ python -m pip install -r requirements.txt
66
+ - run:
67
+ name: Build and install
68
+ command: |
69
+ python -m pip install -e .
70
+ - run:
71
+ name: Run unittests
72
+ command: |
73
+ python -m pip install timm
74
+ python -m coverage run --branch --source mmseg -m pytest tests/
75
+ python -m coverage xml
76
+ python -m coverage report -m
77
+
78
+ build_cu101:
79
+ machine:
80
+ image: ubuntu-1604-cuda-10.1:201909-23
81
+ resource_class: gpu.nvidia.small
82
+ steps:
83
+ - checkout
84
+ - run:
85
+ name: Install Libraries
86
+ command: |
87
+ sudo apt-get update
88
+ sudo apt-get install -y git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 libgl1-mesa-glx
89
+ - run:
90
+ name: Configure Python & pip
91
+ command: |
92
+ pyenv global 3.7.0
93
+ python -m pip install --upgrade pip
94
+ python -m pip install wheel
95
+ - run:
96
+ name: Install PyTorch
97
+ command: |
98
+ python -V
99
+ python -m pip install torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html
100
+ - run:
101
+ name: Install mmseg dependencies
102
+ # python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch${{matrix.torch_version}}/index.html
103
+ command: |
104
+ python -m pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.6.0/index.html
105
+ python -m pip install mmdet
106
+ python -m pip install -r requirements.txt
107
+ - run:
108
+ name: Build and install
109
+ command: |
110
+ python setup.py check -m -s
111
+ TORCH_CUDA_ARCH_LIST=7.0 python -m pip install -e .
112
+ - run:
113
+ name: Run unittests
114
+ command: |
115
+ python -m pip install timm
116
+ python -m pytest tests/
117
+
118
+ workflows:
119
+ unit_tests:
120
+ jobs:
121
+ - lint
122
+ - build_cpu:
123
+ name: build_cpu_th1.6
124
+ torch: 1.6.0
125
+ torchvision: 0.7.0
126
+ requires:
127
+ - lint
128
+ - build_cpu:
129
+ name: build_cpu_th1.7
130
+ torch: 1.7.0
131
+ torchvision: 0.8.1
132
+ requires:
133
+ - lint
134
+ - build_cpu:
135
+ name: build_cpu_th1.8_py3.9
136
+ torch: 1.8.0
137
+ torchvision: 0.9.0
138
+ python: "3.9.0"
139
+ requires:
140
+ - lint
141
+ - build_cpu:
142
+ name: build_cpu_th1.9_py3.8
143
+ torch: 1.9.0
144
+ torchvision: 0.10.0
145
+ python: "3.8.0"
146
+ requires:
147
+ - lint
148
+ - build_cpu:
149
+ name: build_cpu_th1.9_py3.9
150
+ torch: 1.9.0
151
+ torchvision: 0.10.0
152
+ python: "3.9.0"
153
+ requires:
154
+ - lint
155
+ - build_cu101:
156
+ requires:
157
+ - build_cpu_th1.6
158
+ - build_cpu_th1.7
159
+ - build_cpu_th1.8_py3.9
160
+ - build_cpu_th1.9_py3.8
161
+ - build_cpu_th1.9_py3.9
EgoHOS/raw/script/mmsegmentation/.dev/batch_test_list.py ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # yapf: disable
2
+ # Inference Speed is tested on NVIDIA V100
3
+ hrnet = [
4
+ dict(
5
+ config='configs/hrnet/fcn_hr18s_512x512_160k_ade20k.py',
6
+ checkpoint='fcn_hr18s_512x512_160k_ade20k_20200614_214413-870f65ac.pth', # noqa
7
+ eval='mIoU',
8
+ metric=dict(mIoU=33.0),
9
+ ),
10
+ dict(
11
+ config='configs/hrnet/fcn_hr18s_512x1024_160k_cityscapes.py',
12
+ checkpoint='fcn_hr18s_512x1024_160k_cityscapes_20200602_190901-4a0797ea.pth', # noqa
13
+ eval='mIoU',
14
+ metric=dict(mIoU=76.31),
15
+ ),
16
+ dict(
17
+ config='configs/hrnet/fcn_hr48_512x512_160k_ade20k.py',
18
+ checkpoint='fcn_hr48_512x512_160k_ade20k_20200614_214407-a52fc02c.pth',
19
+ eval='mIoU',
20
+ metric=dict(mIoU=42.02),
21
+ ),
22
+ dict(
23
+ config='configs/hrnet/fcn_hr48_512x1024_160k_cityscapes.py',
24
+ checkpoint='fcn_hr48_512x1024_160k_cityscapes_20200602_190946-59b7973e.pth', # noqa
25
+ eval='mIoU',
26
+ metric=dict(mIoU=80.65),
27
+ ),
28
+ ]
29
+ pspnet = [
30
+ dict(
31
+ config='configs/pspnet/pspnet_r50-d8_512x1024_80k_cityscapes.py',
32
+ checkpoint='pspnet_r50-d8_512x1024_80k_cityscapes_20200606_112131-2376f12b.pth', # noqa
33
+ eval='mIoU',
34
+ metric=dict(mIoU=78.55),
35
+ ),
36
+ dict(
37
+ config='configs/pspnet/pspnet_r101-d8_512x1024_80k_cityscapes.py',
38
+ checkpoint='pspnet_r101-d8_512x1024_80k_cityscapes_20200606_112211-e1e1100f.pth', # noqa
39
+ eval='mIoU',
40
+ metric=dict(mIoU=79.76),
41
+ ),
42
+ dict(
43
+ config='configs/pspnet/pspnet_r101-d8_512x512_160k_ade20k.py',
44
+ checkpoint='pspnet_r101-d8_512x512_160k_ade20k_20200615_100650-967c316f.pth', # noqa
45
+ eval='mIoU',
46
+ metric=dict(mIoU=44.39),
47
+ ),
48
+ dict(
49
+ config='configs/pspnet/pspnet_r50-d8_512x512_160k_ade20k.py',
50
+ checkpoint='pspnet_r50-d8_512x512_160k_ade20k_20200615_184358-1890b0bd.pth', # noqa
51
+ eval='mIoU',
52
+ metric=dict(mIoU=42.48),
53
+ ),
54
+ ]
55
+ resnest = [
56
+ dict(
57
+ config='configs/resnest/pspnet_s101-d8_512x512_160k_ade20k.py',
58
+ checkpoint='pspnet_s101-d8_512x512_160k_ade20k_20200807_145416-a6daa92a.pth', # noqa
59
+ eval='mIoU',
60
+ metric=dict(mIoU=45.44),
61
+ ),
62
+ dict(
63
+ config='configs/resnest/pspnet_s101-d8_512x1024_80k_cityscapes.py',
64
+ checkpoint='pspnet_s101-d8_512x1024_80k_cityscapes_20200807_140631-c75f3b99.pth', # noqa
65
+ eval='mIoU',
66
+ metric=dict(mIoU=78.57),
67
+ ),
68
+ ]
69
+ fastscnn = [
70
+ dict(
71
+ config='configs/fastscnn/fast_scnn_lr0.12_8x4_160k_cityscapes.py',
72
+ checkpoint='fast_scnn_8x4_160k_lr0.12_cityscapes-0cec9937.pth',
73
+ eval='mIoU',
74
+ metric=dict(mIoU=70.96),
75
+ )
76
+ ]
77
+ deeplabv3plus = [
78
+ dict(
79
+ config='configs/deeplabv3plus/deeplabv3plus_r101-d8_769x769_80k_cityscapes.py', # noqa
80
+ checkpoint='deeplabv3plus_r101-d8_769x769_80k_cityscapes_20200607_000405-a7573d20.pth', # noqa
81
+ eval='mIoU',
82
+ metric=dict(mIoU=80.98),
83
+ ),
84
+ dict(
85
+ config='configs/deeplabv3plus/deeplabv3plus_r101-d8_512x1024_80k_cityscapes.py', # noqa
86
+ checkpoint='deeplabv3plus_r101-d8_512x1024_80k_cityscapes_20200606_114143-068fcfe9.pth', # noqa
87
+ eval='mIoU',
88
+ metric=dict(mIoU=80.97),
89
+ ),
90
+ dict(
91
+ config='configs/deeplabv3plus/deeplabv3plus_r50-d8_512x1024_80k_cityscapes.py', # noqa
92
+ checkpoint='deeplabv3plus_r50-d8_512x1024_80k_cityscapes_20200606_114049-f9fb496d.pth', # noqa
93
+ eval='mIoU',
94
+ metric=dict(mIoU=80.09),
95
+ ),
96
+ dict(
97
+ config='configs/deeplabv3plus/deeplabv3plus_r50-d8_769x769_80k_cityscapes.py', # noqa
98
+ checkpoint='deeplabv3plus_r50-d8_769x769_80k_cityscapes_20200606_210233-0e9dfdc4.pth', # noqa
99
+ eval='mIoU',
100
+ metric=dict(mIoU=79.83),
101
+ ),
102
+ ]
103
+ vit = [
104
+ dict(
105
+ config='configs/vit/upernet_vit-b16_ln_mln_512x512_160k_ade20k.py',
106
+ checkpoint='upernet_vit-b16_ln_mln_512x512_160k_ade20k-f444c077.pth',
107
+ eval='mIoU',
108
+ metric=dict(mIoU=47.73),
109
+ ),
110
+ dict(
111
+ config='configs/vit/upernet_deit-s16_ln_mln_512x512_160k_ade20k.py',
112
+ checkpoint='upernet_deit-s16_ln_mln_512x512_160k_ade20k-c0cd652f.pth',
113
+ eval='mIoU',
114
+ metric=dict(mIoU=43.52),
115
+ ),
116
+ ]
117
+ fp16 = [
118
+ dict(
119
+ config='configs/deeplabv3plus/deeplabv3plus_r101-d8_fp16_512x1024_80k_cityscapes.py', # noqa
120
+ checkpoint='deeplabv3plus_r101-d8_fp16_512x1024_80k_cityscapes_20200717_230920-f1104f4b.pth', # noqa
121
+ eval='mIoU',
122
+ metric=dict(mIoU=80.46),
123
+ )
124
+ ]
125
+ swin = [
126
+ dict(
127
+ config='configs/swin/upernet_swin_tiny_patch4_window7_512x512_160k_ade20k_pretrain_224x224_1K.py', # noqa
128
+ checkpoint='upernet_swin_tiny_patch4_window7_512x512_160k_ade20k_pretrain_224x224_1K_20210531_112542-e380ad3e.pth', # noqa
129
+ eval='mIoU',
130
+ metric=dict(mIoU=44.41),
131
+ )
132
+ ]
133
+ # yapf: enable
EgoHOS/raw/script/mmsegmentation/.dev/batch_train_list.txt ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ configs/hrnet/fcn_hr18s_512x512_160k_ade20k.py
2
+ configs/hrnet/fcn_hr18s_512x1024_160k_cityscapes.py
3
+ configs/hrnet/fcn_hr48_512x512_160k_ade20k.py
4
+ configs/hrnet/fcn_hr48_512x1024_160k_cityscapes.py
5
+ configs/pspnet/pspnet_r50-d8_512x1024_80k_cityscapes.py
6
+ configs/pspnet/pspnet_r101-d8_512x1024_80k_cityscapes.py
7
+ configs/pspnet/pspnet_r101-d8_512x512_160k_ade20k.py
8
+ configs/pspnet/pspnet_r50-d8_512x512_160k_ade20k.py
9
+ configs/resnest/pspnet_s101-d8_512x512_160k_ade20k.py
10
+ configs/resnest/pspnet_s101-d8_512x1024_80k_cityscapes.py
11
+ configs/fastscnn/fast_scnn_lr0.12_8x4_160k_cityscapes.py
12
+ configs/deeplabv3plus/deeplabv3plus_r101-d8_769x769_80k_cityscapes.py
13
+ configs/deeplabv3plus/deeplabv3plus_r101-d8_512x1024_80k_cityscapes.py
14
+ configs/deeplabv3plus/deeplabv3plus_r50-d8_512x1024_80k_cityscapes.py
15
+ configs/deeplabv3plus/deeplabv3plus_r50-d8_769x769_80k_cityscapes.py
16
+ configs/vit/upernet_vit-b16_ln_mln_512x512_160k_ade20k.py
17
+ configs/vit/upernet_deit-s16_ln_mln_512x512_160k_ade20k.py
18
+ configs/deeplabv3plus/deeplabv3plus_r101-d8_fp16_512x1024_80k_cityscapes.py
19
+ configs/swin/upernet_swin_tiny_patch4_window7_512x512_160k_ade20k_pretrain_224x224_1K.py
EgoHOS/raw/script/mmsegmentation/.dev/benchmark_evaluation.sh ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PARTITION=$1
2
+ CHECKPOINT_DIR=$2
3
+
4
+ echo 'configs/hrnet/fcn_hr18s_512x512_160k_ade20k.py' &
5
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION fcn_hr18s_512x512_160k_ade20k configs/hrnet/fcn_hr18s_512x512_160k_ade20k.py $CHECKPOINT_DIR/fcn_hr18s_512x512_160k_ade20k_20200614_214413-870f65ac.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/fcn_hr18s_512x512_160k_ade20k --cfg-options dist_params.port=28171 &
6
+ echo 'configs/hrnet/fcn_hr18s_512x1024_160k_cityscapes.py' &
7
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION fcn_hr18s_512x1024_160k_cityscapes configs/hrnet/fcn_hr18s_512x1024_160k_cityscapes.py $CHECKPOINT_DIR/fcn_hr18s_512x1024_160k_cityscapes_20200602_190901-4a0797ea.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/fcn_hr18s_512x1024_160k_cityscapes --cfg-options dist_params.port=28172 &
8
+ echo 'configs/hrnet/fcn_hr48_512x512_160k_ade20k.py' &
9
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION fcn_hr48_512x512_160k_ade20k configs/hrnet/fcn_hr48_512x512_160k_ade20k.py $CHECKPOINT_DIR/fcn_hr48_512x512_160k_ade20k_20200614_214407-a52fc02c.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/fcn_hr48_512x512_160k_ade20k --cfg-options dist_params.port=28173 &
10
+ echo 'configs/hrnet/fcn_hr48_512x1024_160k_cityscapes.py' &
11
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION fcn_hr48_512x1024_160k_cityscapes configs/hrnet/fcn_hr48_512x1024_160k_cityscapes.py $CHECKPOINT_DIR/fcn_hr48_512x1024_160k_cityscapes_20200602_190946-59b7973e.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/fcn_hr48_512x1024_160k_cityscapes --cfg-options dist_params.port=28174 &
12
+ echo 'configs/pspnet/pspnet_r50-d8_512x1024_80k_cityscapes.py' &
13
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION pspnet_r50-d8_512x1024_80k_cityscapes configs/pspnet/pspnet_r50-d8_512x1024_80k_cityscapes.py $CHECKPOINT_DIR/pspnet_r50-d8_512x1024_80k_cityscapes_20200606_112131-2376f12b.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/pspnet_r50-d8_512x1024_80k_cityscapes --cfg-options dist_params.port=28175 &
14
+ echo 'configs/pspnet/pspnet_r101-d8_512x1024_80k_cityscapes.py' &
15
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION pspnet_r101-d8_512x1024_80k_cityscapes configs/pspnet/pspnet_r101-d8_512x1024_80k_cityscapes.py $CHECKPOINT_DIR/pspnet_r101-d8_512x1024_80k_cityscapes_20200606_112211-e1e1100f.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/pspnet_r101-d8_512x1024_80k_cityscapes --cfg-options dist_params.port=28176 &
16
+ echo 'configs/pspnet/pspnet_r101-d8_512x512_160k_ade20k.py' &
17
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION pspnet_r101-d8_512x512_160k_ade20k configs/pspnet/pspnet_r101-d8_512x512_160k_ade20k.py $CHECKPOINT_DIR/pspnet_r101-d8_512x512_160k_ade20k_20200615_100650-967c316f.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/pspnet_r101-d8_512x512_160k_ade20k --cfg-options dist_params.port=28177 &
18
+ echo 'configs/pspnet/pspnet_r50-d8_512x512_160k_ade20k.py' &
19
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION pspnet_r50-d8_512x512_160k_ade20k configs/pspnet/pspnet_r50-d8_512x512_160k_ade20k.py $CHECKPOINT_DIR/pspnet_r50-d8_512x512_160k_ade20k_20200615_184358-1890b0bd.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/pspnet_r50-d8_512x512_160k_ade20k --cfg-options dist_params.port=28178 &
20
+ echo 'configs/resnest/pspnet_s101-d8_512x512_160k_ade20k.py' &
21
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION pspnet_s101-d8_512x512_160k_ade20k configs/resnest/pspnet_s101-d8_512x512_160k_ade20k.py $CHECKPOINT_DIR/pspnet_s101-d8_512x512_160k_ade20k_20200807_145416-a6daa92a.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/pspnet_s101-d8_512x512_160k_ade20k --cfg-options dist_params.port=28179 &
22
+ echo 'configs/resnest/pspnet_s101-d8_512x1024_80k_cityscapes.py' &
23
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION pspnet_s101-d8_512x1024_80k_cityscapes configs/resnest/pspnet_s101-d8_512x1024_80k_cityscapes.py $CHECKPOINT_DIR/pspnet_s101-d8_512x1024_80k_cityscapes_20200807_140631-c75f3b99.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/pspnet_s101-d8_512x1024_80k_cityscapes --cfg-options dist_params.port=28180 &
24
+ echo 'configs/fastscnn/fast_scnn_lr0.12_8x4_160k_cityscapes.py' &
25
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION fast_scnn_lr0.12_8x4_160k_cityscapes configs/fastscnn/fast_scnn_lr0.12_8x4_160k_cityscapes.py $CHECKPOINT_DIR/fast_scnn_8x4_160k_lr0.12_cityscapes-0cec9937.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/fast_scnn_lr0.12_8x4_160k_cityscapes --cfg-options dist_params.port=28181 &
26
+ echo 'configs/deeplabv3plus/deeplabv3plus_r101-d8_769x769_80k_cityscapes.py' &
27
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION deeplabv3plus_r101-d8_769x769_80k_cityscapes configs/deeplabv3plus/deeplabv3plus_r101-d8_769x769_80k_cityscapes.py $CHECKPOINT_DIR/deeplabv3plus_r101-d8_769x769_80k_cityscapes_20200607_000405-a7573d20.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/deeplabv3plus_r101-d8_769x769_80k_cityscapes --cfg-options dist_params.port=28182 &
28
+ echo 'configs/deeplabv3plus/deeplabv3plus_r101-d8_512x1024_80k_cityscapes.py' &
29
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION deeplabv3plus_r101-d8_512x1024_80k_cityscapes configs/deeplabv3plus/deeplabv3plus_r101-d8_512x1024_80k_cityscapes.py $CHECKPOINT_DIR/deeplabv3plus_r101-d8_512x1024_80k_cityscapes_20200606_114143-068fcfe9.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/deeplabv3plus_r101-d8_512x1024_80k_cityscapes --cfg-options dist_params.port=28183 &
30
+ echo 'configs/deeplabv3plus/deeplabv3plus_r50-d8_512x1024_80k_cityscapes.py' &
31
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION deeplabv3plus_r50-d8_512x1024_80k_cityscapes configs/deeplabv3plus/deeplabv3plus_r50-d8_512x1024_80k_cityscapes.py $CHECKPOINT_DIR/deeplabv3plus_r50-d8_512x1024_80k_cityscapes_20200606_114049-f9fb496d.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/deeplabv3plus_r50-d8_512x1024_80k_cityscapes --cfg-options dist_params.port=28184 &
32
+ echo 'configs/deeplabv3plus/deeplabv3plus_r50-d8_769x769_80k_cityscapes.py' &
33
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION deeplabv3plus_r50-d8_769x769_80k_cityscapes configs/deeplabv3plus/deeplabv3plus_r50-d8_769x769_80k_cityscapes.py $CHECKPOINT_DIR/deeplabv3plus_r50-d8_769x769_80k_cityscapes_20200606_210233-0e9dfdc4.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/deeplabv3plus_r50-d8_769x769_80k_cityscapes --cfg-options dist_params.port=28185 &
34
+ echo 'configs/vit/upernet_vit-b16_ln_mln_512x512_160k_ade20k.py' &
35
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION upernet_vit-b16_ln_mln_512x512_160k_ade20k configs/vit/upernet_vit-b16_ln_mln_512x512_160k_ade20k.py $CHECKPOINT_DIR/upernet_vit-b16_ln_mln_512x512_160k_ade20k-f444c077.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/upernet_vit-b16_ln_mln_512x512_160k_ade20k --cfg-options dist_params.port=28186 &
36
+ echo 'configs/vit/upernet_deit-s16_ln_mln_512x512_160k_ade20k.py' &
37
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION upernet_deit-s16_ln_mln_512x512_160k_ade20k configs/vit/upernet_deit-s16_ln_mln_512x512_160k_ade20k.py $CHECKPOINT_DIR/upernet_deit-s16_ln_mln_512x512_160k_ade20k-c0cd652f.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/upernet_deit-s16_ln_mln_512x512_160k_ade20k --cfg-options dist_params.port=28187 &
38
+ echo 'configs/deeplabv3plus/deeplabv3plus_r101-d8_fp16_512x1024_80k_cityscapes.py' &
39
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION deeplabv3plus_r101-d8_fp16_512x1024_80k_cityscapes configs/deeplabv3plus/deeplabv3plus_r101-d8_fp16_512x1024_80k_cityscapes.py $CHECKPOINT_DIR/deeplabv3plus_r101-d8_512x1024_80k_fp16_cityscapes-cc58bc8d.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/deeplabv3plus_r101-d8_512x1024_80k_fp16_cityscapes --cfg-options dist_params.port=28188 &
40
+ echo 'configs/swin/upernet_swin_tiny_patch4_window7_512x512_160k_ade20k_pretrain_224x224_1K.py' &
41
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 tools/slurm_test.sh $PARTITION upernet_swin_tiny_patch4_window7_512x512_160k_ade20k_pretrain_224x224_1K configs/swin/upernet_swin_tiny_patch4_window7_512x512_160k_ade20k_pretrain_224x224_1K.py $CHECKPOINT_DIR/upernet_swin_tiny_patch4_window7_512x512_160k_ade20k_pretrain_224x224_1K_20210531_112542-e380ad3e.pth --eval mIoU --work-dir work_dirs/benchmark_evaluation/upernet_swin_tiny_patch4_window7_512x512_160k_ade20k_pretrain_224x224_1K --cfg-options dist_params.port=28189 &
EgoHOS/raw/script/mmsegmentation/.dev/benchmark_inference.py ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) OpenMMLab. All rights reserved.
2
+ import hashlib
3
+ import logging
4
+ import os
5
+ import os.path as osp
6
+ import warnings
7
+ from argparse import ArgumentParser
8
+
9
+ import requests
10
+ from mmcv import Config
11
+
12
+ from mmseg.apis import inference_segmentor, init_segmentor, show_result_pyplot
13
+ from mmseg.utils import get_root_logger
14
+
15
+ # ignore warnings when segmentors inference
16
+ warnings.filterwarnings('ignore')
17
+
18
+
19
+ def download_checkpoint(checkpoint_name, model_name, config_name, collect_dir):
20
+ """Download checkpoint and check if hash code is true."""
21
+ url = f'https://download.openmmlab.com/mmsegmentation/v0.5/{model_name}/{config_name}/{checkpoint_name}' # noqa
22
+
23
+ r = requests.get(url)
24
+ assert r.status_code != 403, f'{url} Access denied.'
25
+
26
+ with open(osp.join(collect_dir, checkpoint_name), 'wb') as code:
27
+ code.write(r.content)
28
+
29
+ true_hash_code = osp.splitext(checkpoint_name)[0].split('-')[1]
30
+
31
+ # check hash code
32
+ with open(osp.join(collect_dir, checkpoint_name), 'rb') as fp:
33
+ sha256_cal = hashlib.sha256()
34
+ sha256_cal.update(fp.read())
35
+ cur_hash_code = sha256_cal.hexdigest()[:8]
36
+
37
+ assert true_hash_code == cur_hash_code, f'{url} download failed, '
38
+ 'incomplete downloaded file or url invalid.'
39
+
40
+ if cur_hash_code != true_hash_code:
41
+ os.remove(osp.join(collect_dir, checkpoint_name))
42
+
43
+
44
+ def parse_args():
45
+ parser = ArgumentParser()
46
+ parser.add_argument('config', help='test config file path')
47
+ parser.add_argument('checkpoint_root', help='Checkpoint file root path')
48
+ parser.add_argument(
49
+ '-i', '--img', default='demo/demo.png', help='Image file')
50
+ parser.add_argument('-a', '--aug', action='store_true', help='aug test')
51
+ parser.add_argument('-m', '--model-name', help='model name to inference')
52
+ parser.add_argument(
53
+ '-s', '--show', action='store_true', help='show results')
54
+ parser.add_argument(
55
+ '-d', '--device', default='cuda:0', help='Device used for inference')
56
+ args = parser.parse_args()
57
+ return args
58
+
59
+
60
+ def inference_model(config_name, checkpoint, args, logger=None):
61
+ cfg = Config.fromfile(config_name)
62
+ if args.aug:
63
+ if 'flip' in cfg.data.test.pipeline[
64
+ 1] and 'img_scale' in cfg.data.test.pipeline[1]:
65
+ cfg.data.test.pipeline[1].img_ratios = [
66
+ 0.5, 0.75, 1.0, 1.25, 1.5, 1.75
67
+ ]
68
+ cfg.data.test.pipeline[1].flip = True
69
+ else:
70
+ if logger is not None:
71
+ logger.error(f'{config_name}: unable to start aug test')
72
+ else:
73
+ print(f'{config_name}: unable to start aug test', flush=True)
74
+
75
+ model = init_segmentor(cfg, checkpoint, device=args.device)
76
+ # test a single image
77
+ result = inference_segmentor(model, args.img)
78
+
79
+ # show the results
80
+ if args.show:
81
+ show_result_pyplot(model, args.img, result)
82
+ return result
83
+
84
+
85
+ # Sample test whether the inference code is correct
86
+ def main(args):
87
+ config = Config.fromfile(args.config)
88
+
89
+ if not os.path.exists(args.checkpoint_root):
90
+ os.makedirs(args.checkpoint_root, 0o775)
91
+
92
+ # test single model
93
+ if args.model_name:
94
+ if args.model_name in config:
95
+ model_infos = config[args.model_name]
96
+ if not isinstance(model_infos, list):
97
+ model_infos = [model_infos]
98
+ for model_info in model_infos:
99
+ config_name = model_info['config'].strip()
100
+ print(f'processing: {config_name}', flush=True)
101
+ checkpoint = osp.join(args.checkpoint_root,
102
+ model_info['checkpoint'].strip())
103
+ try:
104
+ # build the model from a config file and a checkpoint file
105
+ inference_model(config_name, checkpoint, args)
106
+ except Exception:
107
+ print(f'{config_name} test failed!')
108
+ continue
109
+ return
110
+ else:
111
+ raise RuntimeError('model name input error.')
112
+
113
+ # test all model
114
+ logger = get_root_logger(
115
+ log_file='benchmark_inference_image.log', log_level=logging.ERROR)
116
+
117
+ for model_name in config:
118
+ model_infos = config[model_name]
119
+
120
+ if not isinstance(model_infos, list):
121
+ model_infos = [model_infos]
122
+ for model_info in model_infos:
123
+ print('processing: ', model_info['config'], flush=True)
124
+ config_path = model_info['config'].strip()
125
+ config_name = osp.splitext(osp.basename(config_path))[0]
126
+ checkpoint_name = model_info['checkpoint'].strip()
127
+ checkpoint = osp.join(args.checkpoint_root, checkpoint_name)
128
+
129
+ # ensure checkpoint exists
130
+ try:
131
+ if not osp.exists(checkpoint):
132
+ download_checkpoint(checkpoint_name, model_name,
133
+ config_name.rstrip('.py'),
134
+ args.checkpoint_root)
135
+ except Exception:
136
+ logger.error(f'{checkpoint_name} download error')
137
+ continue
138
+
139
+ # test model inference with checkpoint
140
+ try:
141
+ # build the model from a config file and a checkpoint file
142
+ inference_model(config_path, checkpoint, args, logger)
143
+ except Exception as e:
144
+ logger.error(f'{config_path} " : {repr(e)}')
145
+
146
+
147
+ if __name__ == '__main__':
148
+ args = parse_args()
149
+ main(args)
EgoHOS/raw/script/mmsegmentation/.dev/benchmark_train.sh ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ PARTITION=$1
2
+
3
+ echo 'configs/hrnet/fcn_hr18s_512x512_160k_ade20k.py' &
4
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION fcn_hr18s_512x512_160k_ade20k configs/hrnet/fcn_hr18s_512x512_160k_ade20k.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24727 --work-dir work_dirs/hrnet/fcn_hr18s_512x512_160k_ade20k >/dev/null &
5
+ echo 'configs/hrnet/fcn_hr18s_512x1024_160k_cityscapes.py' &
6
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION fcn_hr18s_512x1024_160k_cityscapes configs/hrnet/fcn_hr18s_512x1024_160k_cityscapes.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24728 --work-dir work_dirs/hrnet/fcn_hr18s_512x1024_160k_cityscapes >/dev/null &
7
+ echo 'configs/hrnet/fcn_hr48_512x512_160k_ade20k.py' &
8
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION fcn_hr48_512x512_160k_ade20k configs/hrnet/fcn_hr48_512x512_160k_ade20k.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24729 --work-dir work_dirs/hrnet/fcn_hr48_512x512_160k_ade20k >/dev/null &
9
+ echo 'configs/hrnet/fcn_hr48_512x1024_160k_cityscapes.py' &
10
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION fcn_hr48_512x1024_160k_cityscapes configs/hrnet/fcn_hr48_512x1024_160k_cityscapes.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24730 --work-dir work_dirs/hrnet/fcn_hr48_512x1024_160k_cityscapes >/dev/null &
11
+ echo 'configs/pspnet/pspnet_r50-d8_512x1024_80k_cityscapes.py' &
12
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION pspnet_r50-d8_512x1024_80k_cityscapes configs/pspnet/pspnet_r50-d8_512x1024_80k_cityscapes.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24731 --work-dir work_dirs/pspnet/pspnet_r50-d8_512x1024_80k_cityscapes >/dev/null &
13
+ echo 'configs/pspnet/pspnet_r101-d8_512x1024_80k_cityscapes.py' &
14
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION pspnet_r101-d8_512x1024_80k_cityscapes configs/pspnet/pspnet_r101-d8_512x1024_80k_cityscapes.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24732 --work-dir work_dirs/pspnet/pspnet_r101-d8_512x1024_80k_cityscapes >/dev/null &
15
+ echo 'configs/pspnet/pspnet_r101-d8_512x512_160k_ade20k.py' &
16
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION pspnet_r101-d8_512x512_160k_ade20k configs/pspnet/pspnet_r101-d8_512x512_160k_ade20k.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24733 --work-dir work_dirs/pspnet/pspnet_r101-d8_512x512_160k_ade20k >/dev/null &
17
+ echo 'configs/pspnet/pspnet_r50-d8_512x512_160k_ade20k.py' &
18
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION pspnet_r50-d8_512x512_160k_ade20k configs/pspnet/pspnet_r50-d8_512x512_160k_ade20k.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24734 --work-dir work_dirs/pspnet/pspnet_r50-d8_512x512_160k_ade20k >/dev/null &
19
+ echo 'configs/resnest/pspnet_s101-d8_512x512_160k_ade20k.py' &
20
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION pspnet_s101-d8_512x512_160k_ade20k configs/resnest/pspnet_s101-d8_512x512_160k_ade20k.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24735 --work-dir work_dirs/resnest/pspnet_s101-d8_512x512_160k_ade20k >/dev/null &
21
+ echo 'configs/resnest/pspnet_s101-d8_512x1024_80k_cityscapes.py' &
22
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION pspnet_s101-d8_512x1024_80k_cityscapes configs/resnest/pspnet_s101-d8_512x1024_80k_cityscapes.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24736 --work-dir work_dirs/resnest/pspnet_s101-d8_512x1024_80k_cityscapes >/dev/null &
23
+ echo 'configs/fastscnn/fast_scnn_lr0.12_8x4_160k_cityscapes.py' &
24
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION fast_scnn_lr0.12_8x4_160k_cityscapes configs/fastscnn/fast_scnn_lr0.12_8x4_160k_cityscapes.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24737 --work-dir work_dirs/fastscnn/fast_scnn_lr0.12_8x4_160k_cityscapes >/dev/null &
25
+ echo 'configs/deeplabv3plus/deeplabv3plus_r101-d8_769x769_80k_cityscapes.py' &
26
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION deeplabv3plus_r101-d8_769x769_80k_cityscapes configs/deeplabv3plus/deeplabv3plus_r101-d8_769x769_80k_cityscapes.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24738 --work-dir work_dirs/deeplabv3plus/deeplabv3plus_r101-d8_769x769_80k_cityscapes >/dev/null &
27
+ echo 'configs/deeplabv3plus/deeplabv3plus_r101-d8_512x1024_80k_cityscapes.py' &
28
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION deeplabv3plus_r101-d8_512x1024_80k_cityscapes configs/deeplabv3plus/deeplabv3plus_r101-d8_512x1024_80k_cityscapes.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24739 --work-dir work_dirs/deeplabv3plus/deeplabv3plus_r101-d8_512x1024_80k_cityscapes >/dev/null &
29
+ echo 'configs/deeplabv3plus/deeplabv3plus_r50-d8_512x1024_80k_cityscapes.py' &
30
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION deeplabv3plus_r50-d8_512x1024_80k_cityscapes configs/deeplabv3plus/deeplabv3plus_r50-d8_512x1024_80k_cityscapes.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24740 --work-dir work_dirs/deeplabv3plus/deeplabv3plus_r50-d8_512x1024_80k_cityscapes >/dev/null &
31
+ echo 'configs/deeplabv3plus/deeplabv3plus_r50-d8_769x769_80k_cityscapes.py' &
32
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION deeplabv3plus_r50-d8_769x769_80k_cityscapes configs/deeplabv3plus/deeplabv3plus_r50-d8_769x769_80k_cityscapes.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24741 --work-dir work_dirs/deeplabv3plus/deeplabv3plus_r50-d8_769x769_80k_cityscapes >/dev/null &
33
+ echo 'configs/vit/upernet_vit-b16_ln_mln_512x512_160k_ade20k.py' &
34
+ GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION upernet_vit-b16_ln_mln_512x512_160k_ade20k configs/vit/upernet_vit-b16_ln_mln_512x512_160k_ade20k.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24742 --work-dir work_dirs/vit/upernet_vit-b16_ln_mln_512x512_160k_ade20k >/dev/null &
35
+ echo 'configs/vit/upernet_deit-s16_ln_mln_512x512_160k_ade20k.py' &
36
+ GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION upernet_deit-s16_ln_mln_512x512_160k_ade20k configs/vit/upernet_deit-s16_ln_mln_512x512_160k_ade20k.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24743 --work-dir work_dirs/vit/upernet_deit-s16_ln_mln_512x512_160k_ade20k >/dev/null &
37
+ echo 'configs/deeplabv3plus/deeplabv3plus_r101-d8_fp16_512x1024_80k_cityscapes.py' &
38
+ GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION deeplabv3plus_r101-d8_512x1024_80k_fp16_cityscapes configs/deeplabv3plus/deeplabv3plus_r101-d8_fp16_512x1024_80k_cityscapes.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24744 --work-dir work_dirs/deeplabv3plus/deeplabv3plus_r101-d8_512x1024_80k_fp16_cityscapes >/dev/null &
39
+ echo 'configs/swin/upernet_swin_tiny_patch4_window7_512x512_160k_ade20k_pretrain_224x224_1K.py' &
40
+ GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=2 ./tools/slurm_train.sh $PARTITION upernet_swin_tiny_patch4_window7_512x512_160k_ade20k_pretrain_224x224_1K configs/swin/upernet_swin_tiny_patch4_window7_512x512_160k_ade20k_pretrain_224x224_1K.py --cfg-options checkpoint_config.max_keep_ckpts=1 dist_params.port=24745 --work-dir work_dirs/swin/upernet_swin_tiny_patch4_window7_512x512_160k_ade20k_pretrain_224x224_1K >/dev/null &
EgoHOS/raw/script/mmsegmentation/.dev/check_urls.py ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) OpenMMLab. All rights reserved.
2
+ import logging
3
+ import os
4
+ from argparse import ArgumentParser
5
+
6
+ import requests
7
+ import yaml as yml
8
+
9
+ from mmseg.utils import get_root_logger
10
+
11
+
12
+ def check_url(url):
13
+ """Check url response status.
14
+
15
+ Args:
16
+ url (str): url needed to check.
17
+
18
+ Returns:
19
+ int, bool: status code and check flag.
20
+ """
21
+ flag = True
22
+ r = requests.head(url)
23
+ status_code = r.status_code
24
+ if status_code == 403 or status_code == 404:
25
+ flag = False
26
+
27
+ return status_code, flag
28
+
29
+
30
+ def parse_args():
31
+ parser = ArgumentParser('url valid check.')
32
+ parser.add_argument(
33
+ '-m',
34
+ '--model-name',
35
+ type=str,
36
+ help='Select the model needed to check')
37
+
38
+ args = parser.parse_args()
39
+ return args
40
+
41
+
42
+ def main():
43
+ args = parse_args()
44
+ model_name = args.model_name
45
+
46
+ # yml path generate.
47
+ # If model_name is not set, script will check all of the models.
48
+ if model_name is not None:
49
+ yml_list = [(model_name, f'configs/{model_name}/{model_name}.yml')]
50
+ else:
51
+ # check all
52
+ yml_list = [(x, f'configs/{x}/{x}.yml') for x in os.listdir('configs/')
53
+ if x != '_base_']
54
+
55
+ logger = get_root_logger(log_file='url_check.log', log_level=logging.ERROR)
56
+
57
+ for model_name, yml_path in yml_list:
58
+ # Default yaml loader unsafe.
59
+ model_infos = yml.load(
60
+ open(yml_path, 'r'), Loader=yml.CLoader)['Models']
61
+ for model_info in model_infos:
62
+ config_name = model_info['Name']
63
+ checkpoint_url = model_info['Weights']
64
+ # checkpoint url check
65
+ status_code, flag = check_url(checkpoint_url)
66
+ if flag:
67
+ logger.info(f'checkpoint | {config_name} | {checkpoint_url} | '
68
+ f'{status_code} valid')
69
+ else:
70
+ logger.error(
71
+ f'checkpoint | {config_name} | {checkpoint_url} | '
72
+ f'{status_code} | error')
73
+ # log_json check
74
+ checkpoint_name = checkpoint_url.split('/')[-1]
75
+ model_time = '-'.join(checkpoint_name.split('-')[:-1]).replace(
76
+ f'{config_name}_', '')
77
+ # two style of log_json name
78
+ # use '_' to link model_time (will be deprecated)
79
+ log_json_url_1 = f'https://download.openmmlab.com/mmsegmentation/v0.5/{model_name}/{config_name}/{config_name}_{model_time}.log.json' # noqa
80
+ status_code_1, flag_1 = check_url(log_json_url_1)
81
+ # use '-' to link model_time
82
+ log_json_url_2 = f'https://download.openmmlab.com/mmsegmentation/v0.5/{model_name}/{config_name}/{config_name}-{model_time}.log.json' # noqa
83
+ status_code_2, flag_2 = check_url(log_json_url_2)
84
+ if flag_1 or flag_2:
85
+ if flag_1:
86
+ logger.info(
87
+ f'log.json | {config_name} | {log_json_url_1} | '
88
+ f'{status_code_1} | valid')
89
+ else:
90
+ logger.info(
91
+ f'log.json | {config_name} | {log_json_url_2} | '
92
+ f'{status_code_2} | valid')
93
+ else:
94
+ logger.error(
95
+ f'log.json | {config_name} | {log_json_url_1} & '
96
+ f'{log_json_url_2} | {status_code_1} & {status_code_2} | '
97
+ 'error')
98
+
99
+
100
+ if __name__ == '__main__':
101
+ main()
EgoHOS/raw/script/mmsegmentation/.dev/gather_benchmark_evaluation_results.py ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) OpenMMLab. All rights reserved.
2
+ import argparse
3
+ import glob
4
+ import os.path as osp
5
+
6
+ import mmcv
7
+ from mmcv import Config
8
+
9
+
10
+ def parse_args():
11
+ parser = argparse.ArgumentParser(
12
+ description='Gather benchmarked model evaluation results')
13
+ parser.add_argument('config', help='test config file path')
14
+ parser.add_argument(
15
+ 'root',
16
+ type=str,
17
+ help='root path of benchmarked models to be gathered')
18
+ parser.add_argument(
19
+ '--out',
20
+ type=str,
21
+ default='benchmark_evaluation_info.json',
22
+ help='output path of gathered metrics and compared '
23
+ 'results to be stored')
24
+
25
+ args = parser.parse_args()
26
+ return args
27
+
28
+
29
+ if __name__ == '__main__':
30
+ args = parse_args()
31
+
32
+ root_path = args.root
33
+ metrics_out = args.out
34
+ result_dict = {}
35
+
36
+ cfg = Config.fromfile(args.config)
37
+
38
+ for model_key in cfg:
39
+ model_infos = cfg[model_key]
40
+ if not isinstance(model_infos, list):
41
+ model_infos = [model_infos]
42
+ for model_info in model_infos:
43
+ previous_metrics = model_info['metric']
44
+ config = model_info['config'].strip()
45
+ fname, _ = osp.splitext(osp.basename(config))
46
+
47
+ # Load benchmark evaluation json
48
+ metric_json_dir = osp.join(root_path, fname)
49
+ if not osp.exists(metric_json_dir):
50
+ print(f'{metric_json_dir} not existed.')
51
+ continue
52
+
53
+ json_list = glob.glob(osp.join(metric_json_dir, '*.json'))
54
+ if len(json_list) == 0:
55
+ print(f'There is no eval json in {metric_json_dir}.')
56
+ continue
57
+
58
+ log_json_path = list(sorted(json_list))[-1]
59
+ metric = mmcv.load(log_json_path)
60
+ if config not in metric.get('config', {}):
61
+ print(f'{config} not included in {log_json_path}')
62
+ continue
63
+
64
+ # Compare between new benchmark results and previous metrics
65
+ differential_results = dict()
66
+ new_metrics = dict()
67
+ for record_metric_key in previous_metrics:
68
+ if record_metric_key not in metric['metric']:
69
+ raise KeyError('record_metric_key not exist, please '
70
+ 'check your config')
71
+ old_metric = previous_metrics[record_metric_key]
72
+ new_metric = round(metric['metric'][record_metric_key] * 100,
73
+ 2)
74
+
75
+ differential = new_metric - old_metric
76
+ flag = '+' if differential > 0 else '-'
77
+ differential_results[
78
+ record_metric_key] = f'{flag}{abs(differential):.2f}'
79
+ new_metrics[record_metric_key] = new_metric
80
+
81
+ result_dict[config] = dict(
82
+ differential=differential_results,
83
+ previous=previous_metrics,
84
+ new=new_metrics)
85
+
86
+ if metrics_out:
87
+ mmcv.dump(result_dict, metrics_out, indent=4)
88
+ print('===================================')
89
+ for config_name, metrics in result_dict.items():
90
+ print(config_name, metrics)
91
+ print('===================================')
EgoHOS/raw/script/mmsegmentation/.dev/gather_benchmark_train_results.py ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import glob
3
+ import os.path as osp
4
+
5
+ import mmcv
6
+ from gather_models import get_final_results
7
+ from mmcv import Config
8
+
9
+
10
+ def parse_args():
11
+ parser = argparse.ArgumentParser(
12
+ description='Gather benchmarked models train results')
13
+ parser.add_argument('config', help='test config file path')
14
+ parser.add_argument(
15
+ 'root',
16
+ type=str,
17
+ help='root path of benchmarked models to be gathered')
18
+ parser.add_argument(
19
+ '--out',
20
+ type=str,
21
+ default='benchmark_train_info.json',
22
+ help='output path of gathered metrics to be stored')
23
+
24
+ args = parser.parse_args()
25
+ return args
26
+
27
+
28
+ if __name__ == '__main__':
29
+ args = parse_args()
30
+
31
+ root_path = args.root
32
+ metrics_out = args.out
33
+
34
+ evaluation_cfg = Config.fromfile(args.config)
35
+
36
+ result_dict = {}
37
+ for model_key in evaluation_cfg:
38
+ model_infos = evaluation_cfg[model_key]
39
+ if not isinstance(model_infos, list):
40
+ model_infos = [model_infos]
41
+ for model_info in model_infos:
42
+ config = model_info['config']
43
+
44
+ # benchmark train dir
45
+ model_name = osp.split(osp.dirname(config))[1]
46
+ config_name = osp.splitext(osp.basename(config))[0]
47
+ exp_dir = osp.join(root_path, model_name, config_name)
48
+ if not osp.exists(exp_dir):
49
+ print(f'{config} hasn\'t {exp_dir}')
50
+ continue
51
+
52
+ # parse config
53
+ cfg = mmcv.Config.fromfile(config)
54
+ total_iters = cfg.runner.max_iters
55
+ exp_metric = cfg.evaluation.metric
56
+ if not isinstance(exp_metric, list):
57
+ exp_metrics = [exp_metric]
58
+
59
+ # determine whether total_iters ckpt exists
60
+ ckpt_path = f'iter_{total_iters}.pth'
61
+ if not osp.exists(osp.join(exp_dir, ckpt_path)):
62
+ print(f'{config} hasn\'t {ckpt_path}')
63
+ continue
64
+
65
+ # only the last log json counts
66
+ log_json_path = list(
67
+ sorted(glob.glob(osp.join(exp_dir, '*.log.json'))))[-1]
68
+
69
+ # extract metric value
70
+ model_performance = get_final_results(log_json_path, total_iters)
71
+ if model_performance is None:
72
+ print(f'log file error: {log_json_path}')
73
+ continue
74
+
75
+ differential_results = dict()
76
+ old_results = dict()
77
+ new_results = dict()
78
+ for metric_key in model_performance:
79
+ if metric_key in ['mIoU']:
80
+ metric = round(model_performance[metric_key] * 100, 2)
81
+ old_metric = model_info['metric'][metric_key]
82
+ old_results[metric_key] = old_metric
83
+ new_results[metric_key] = metric
84
+ differential = metric - old_metric
85
+ flag = '+' if differential > 0 else '-'
86
+ differential_results[
87
+ metric_key] = f'{flag}{abs(differential):.2f}'
88
+ result_dict[config] = dict(
89
+ differential_results=differential_results,
90
+ old_results=old_results,
91
+ new_results=new_results,
92
+ )
93
+
94
+ # 4 save or print results
95
+ if metrics_out:
96
+ mmcv.dump(result_dict, metrics_out, indent=4)
97
+ print('===================================')
98
+ for config_name, metrics in result_dict.items():
99
+ print(config_name, metrics)
100
+ print('===================================')
EgoHOS/raw/script/mmsegmentation/.dev/gather_models.py ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) OpenMMLab. All rights reserved.
2
+ import argparse
3
+ import glob
4
+ import hashlib
5
+ import json
6
+ import os
7
+ import os.path as osp
8
+ import shutil
9
+
10
+ import mmcv
11
+ import torch
12
+
13
+ # build schedule look-up table to automatically find the final model
14
+ RESULTS_LUT = ['mIoU', 'mAcc', 'aAcc']
15
+
16
+
17
+ def calculate_file_sha256(file_path):
18
+ """calculate file sha256 hash code."""
19
+ with open(file_path, 'rb') as fp:
20
+ sha256_cal = hashlib.sha256()
21
+ sha256_cal.update(fp.read())
22
+ return sha256_cal.hexdigest()
23
+
24
+
25
+ def process_checkpoint(in_file, out_file):
26
+ checkpoint = torch.load(in_file, map_location='cpu')
27
+ # remove optimizer for smaller file size
28
+ if 'optimizer' in checkpoint:
29
+ del checkpoint['optimizer']
30
+ # if it is necessary to remove some sensitive data in checkpoint['meta'],
31
+ # add the code here.
32
+ torch.save(checkpoint, out_file)
33
+ # The hash code calculation and rename command differ on different system
34
+ # platform.
35
+ sha = calculate_file_sha256(out_file)
36
+ final_file = out_file.rstrip('.pth') + '-{}.pth'.format(sha[:8])
37
+ os.rename(out_file, final_file)
38
+
39
+ # Remove prefix and suffix
40
+ final_file_name = osp.split(final_file)[1]
41
+ final_file_name = osp.splitext(final_file_name)[0]
42
+
43
+ return final_file_name
44
+
45
+
46
+ def get_final_iter(config):
47
+ iter_num = config.split('_')[-2]
48
+ assert iter_num.endswith('k')
49
+ return int(iter_num[:-1]) * 1000
50
+
51
+
52
+ def get_final_results(log_json_path, iter_num):
53
+ result_dict = dict()
54
+ last_iter = 0
55
+ with open(log_json_path, 'r') as f:
56
+ for line in f.readlines():
57
+ log_line = json.loads(line)
58
+ if 'mode' not in log_line.keys():
59
+ continue
60
+
61
+ # When evaluation, the 'iter' of new log json is the evaluation
62
+ # steps on single gpu.
63
+ flag1 = ('aAcc' in log_line) or (log_line['mode'] == 'val')
64
+ flag2 = (last_iter == iter_num - 50) or (last_iter == iter_num)
65
+ if flag1 and flag2:
66
+ result_dict.update({
67
+ key: log_line[key]
68
+ for key in RESULTS_LUT if key in log_line
69
+ })
70
+ return result_dict
71
+
72
+ last_iter = log_line['iter']
73
+
74
+
75
+ def parse_args():
76
+ parser = argparse.ArgumentParser(description='Gather benchmarked models')
77
+ parser.add_argument(
78
+ '-f', '--config-name', type=str, help='Process the selected config.')
79
+ parser.add_argument(
80
+ '-w',
81
+ '--work-dir',
82
+ default='work_dirs/',
83
+ type=str,
84
+ help='Ckpt storage root folder of benchmarked models to be gathered.')
85
+ parser.add_argument(
86
+ '-c',
87
+ '--collect-dir',
88
+ default='work_dirs/gather',
89
+ type=str,
90
+ help='Ckpt collect root folder of gathered models.')
91
+ parser.add_argument(
92
+ '--all', action='store_true', help='whether include .py and .log')
93
+
94
+ args = parser.parse_args()
95
+ return args
96
+
97
+
98
+ def main():
99
+ args = parse_args()
100
+ work_dir = args.work_dir
101
+ collect_dir = args.collect_dir
102
+ selected_config_name = args.config_name
103
+ mmcv.mkdir_or_exist(collect_dir)
104
+
105
+ # find all models in the root directory to be gathered
106
+ raw_configs = list(mmcv.scandir('./configs', '.py', recursive=True))
107
+
108
+ # filter configs that is not trained in the experiments dir
109
+ used_configs = []
110
+ for raw_config in raw_configs:
111
+ config_name = osp.splitext(osp.basename(raw_config))[0]
112
+ if osp.exists(osp.join(work_dir, config_name)):
113
+ if (selected_config_name is None
114
+ or selected_config_name == config_name):
115
+ used_configs.append(raw_config)
116
+ print(f'Find {len(used_configs)} models to be gathered')
117
+
118
+ # find final_ckpt and log file for trained each config
119
+ # and parse the best performance
120
+ model_infos = []
121
+ for used_config in used_configs:
122
+ config_name = osp.splitext(osp.basename(used_config))[0]
123
+ exp_dir = osp.join(work_dir, config_name)
124
+ # check whether the exps is finished
125
+ final_iter = get_final_iter(used_config)
126
+ final_model = 'iter_{}.pth'.format(final_iter)
127
+ model_path = osp.join(exp_dir, final_model)
128
+
129
+ # skip if the model is still training
130
+ if not osp.exists(model_path):
131
+ print(f'{used_config} train not finished yet')
132
+ continue
133
+
134
+ # get logs
135
+ log_json_paths = glob.glob(osp.join(exp_dir, '*.log.json'))
136
+ log_json_path = log_json_paths[0]
137
+ model_performance = None
138
+ for idx, _log_json_path in enumerate(log_json_paths):
139
+ model_performance = get_final_results(_log_json_path, final_iter)
140
+ if model_performance is not None:
141
+ log_json_path = _log_json_path
142
+ break
143
+
144
+ if model_performance is None:
145
+ print(f'{used_config} model_performance is None')
146
+ continue
147
+
148
+ model_time = osp.split(log_json_path)[-1].split('.')[0]
149
+ model_infos.append(
150
+ dict(
151
+ config_name=config_name,
152
+ results=model_performance,
153
+ iters=final_iter,
154
+ model_time=model_time,
155
+ log_json_path=osp.split(log_json_path)[-1]))
156
+
157
+ # publish model for each checkpoint
158
+ publish_model_infos = []
159
+ for model in model_infos:
160
+ config_name = model['config_name']
161
+ model_publish_dir = osp.join(collect_dir, config_name)
162
+
163
+ publish_model_path = osp.join(model_publish_dir,
164
+ config_name + '_' + model['model_time'])
165
+ trained_model_path = osp.join(work_dir, config_name,
166
+ 'iter_{}.pth'.format(model['iters']))
167
+ if osp.exists(model_publish_dir):
168
+ for file in os.listdir(model_publish_dir):
169
+ if file.endswith('.pth'):
170
+ print(f'model {file} found')
171
+ model['model_path'] = osp.abspath(
172
+ osp.join(model_publish_dir, file))
173
+ break
174
+ if 'model_path' not in model:
175
+ print(f'dir {model_publish_dir} exists, no model found')
176
+
177
+ else:
178
+ mmcv.mkdir_or_exist(model_publish_dir)
179
+
180
+ # convert model
181
+ final_model_path = process_checkpoint(trained_model_path,
182
+ publish_model_path)
183
+ model['model_path'] = final_model_path
184
+
185
+ new_json_path = f'{config_name}_{model["log_json_path"]}'
186
+ # copy log
187
+ shutil.copy(
188
+ osp.join(work_dir, config_name, model['log_json_path']),
189
+ osp.join(model_publish_dir, new_json_path))
190
+
191
+ if args.all:
192
+ new_txt_path = new_json_path.rstrip('.json')
193
+ shutil.copy(
194
+ osp.join(work_dir, config_name,
195
+ model['log_json_path'].rstrip('.json')),
196
+ osp.join(model_publish_dir, new_txt_path))
197
+
198
+ if args.all:
199
+ # copy config to guarantee reproducibility
200
+ raw_config = osp.join('./configs', f'{config_name}.py')
201
+ mmcv.Config.fromfile(raw_config).dump(
202
+ osp.join(model_publish_dir, osp.basename(raw_config)))
203
+
204
+ publish_model_infos.append(model)
205
+
206
+ models = dict(models=publish_model_infos)
207
+ mmcv.dump(models, osp.join(collect_dir, 'model_infos.json'), indent=4)
208
+
209
+
210
+ if __name__ == '__main__':
211
+ main()
EgoHOS/raw/script/mmsegmentation/.dev/generate_benchmark_evaluation_script.py ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) OpenMMLab. All rights reserved.
2
+ import argparse
3
+ import os.path as osp
4
+
5
+ from mmcv import Config
6
+
7
+
8
+ def parse_args():
9
+ parser = argparse.ArgumentParser(
10
+ description='Convert benchmark test model list to script')
11
+ parser.add_argument('config', help='test config file path')
12
+ parser.add_argument('--port', type=int, default=28171, help='dist port')
13
+ parser.add_argument(
14
+ '--work-dir',
15
+ default='work_dirs/benchmark_evaluation',
16
+ help='the dir to save metric')
17
+ parser.add_argument(
18
+ '--out',
19
+ type=str,
20
+ default='.dev/benchmark_evaluation.sh',
21
+ help='path to save model benchmark script')
22
+
23
+ args = parser.parse_args()
24
+ return args
25
+
26
+
27
+ def process_model_info(model_info, work_dir):
28
+ config = model_info['config'].strip()
29
+ fname, _ = osp.splitext(osp.basename(config))
30
+ job_name = fname
31
+ checkpoint = model_info['checkpoint'].strip()
32
+ work_dir = osp.join(work_dir, fname)
33
+ if not isinstance(model_info['eval'], list):
34
+ evals = [model_info['eval']]
35
+ else:
36
+ evals = model_info['eval']
37
+ eval = ' '.join(evals)
38
+ return dict(
39
+ config=config,
40
+ job_name=job_name,
41
+ checkpoint=checkpoint,
42
+ work_dir=work_dir,
43
+ eval=eval)
44
+
45
+
46
+ def create_test_bash_info(commands, model_test_dict, port, script_name,
47
+ partition):
48
+ config = model_test_dict['config']
49
+ job_name = model_test_dict['job_name']
50
+ checkpoint = model_test_dict['checkpoint']
51
+ work_dir = model_test_dict['work_dir']
52
+ eval = model_test_dict['eval']
53
+
54
+ echo_info = f'\necho \'{config}\' &'
55
+ commands.append(echo_info)
56
+ commands.append('\n')
57
+
58
+ command_info = f'GPUS=4 GPUS_PER_NODE=4 ' \
59
+ f'CPUS_PER_TASK=2 {script_name} '
60
+
61
+ command_info += f'{partition} '
62
+ command_info += f'{job_name} '
63
+ command_info += f'{config} '
64
+ command_info += f'$CHECKPOINT_DIR/{checkpoint} '
65
+
66
+ command_info += f'--eval {eval} '
67
+ command_info += f'--work-dir {work_dir} '
68
+ command_info += f'--cfg-options dist_params.port={port} '
69
+ command_info += '&'
70
+
71
+ commands.append(command_info)
72
+
73
+
74
+ def main():
75
+ args = parse_args()
76
+ if args.out:
77
+ out_suffix = args.out.split('.')[-1]
78
+ assert args.out.endswith('.sh'), \
79
+ f'Expected out file path suffix is .sh, but get .{out_suffix}'
80
+
81
+ commands = []
82
+ partition_name = 'PARTITION=$1'
83
+ commands.append(partition_name)
84
+ commands.append('\n')
85
+
86
+ checkpoint_root = 'CHECKPOINT_DIR=$2'
87
+ commands.append(checkpoint_root)
88
+ commands.append('\n')
89
+
90
+ script_name = osp.join('tools', 'slurm_test.sh')
91
+ port = args.port
92
+ work_dir = args.work_dir
93
+
94
+ cfg = Config.fromfile(args.config)
95
+
96
+ for model_key in cfg:
97
+ model_infos = cfg[model_key]
98
+ if not isinstance(model_infos, list):
99
+ model_infos = [model_infos]
100
+ for model_info in model_infos:
101
+ print('processing: ', model_info['config'])
102
+ model_test_dict = process_model_info(model_info, work_dir)
103
+ create_test_bash_info(commands, model_test_dict, port, script_name,
104
+ '$PARTITION')
105
+ port += 1
106
+
107
+ command_str = ''.join(commands)
108
+ if args.out:
109
+ with open(args.out, 'w') as f:
110
+ f.write(command_str + '\n')
111
+
112
+
113
+ if __name__ == '__main__':
114
+ main()
EgoHOS/raw/script/mmsegmentation/.dev/generate_benchmark_train_script.py ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) OpenMMLab. All rights reserved.
2
+ import argparse
3
+ import os.path as osp
4
+
5
+ # Default using 4 gpu when training
6
+ config_8gpu_list = [
7
+ 'configs/swin/upernet_swin_tiny_patch4_window7_512x512_160k_ade20k_pretrain_224x224_1K.py', # noqa
8
+ 'configs/vit/upernet_vit-b16_ln_mln_512x512_160k_ade20k.py',
9
+ 'configs/vit/upernet_deit-s16_ln_mln_512x512_160k_ade20k.py',
10
+ ]
11
+
12
+
13
+ def parse_args():
14
+ parser = argparse.ArgumentParser(
15
+ description='Convert benchmark model json to script')
16
+ parser.add_argument(
17
+ 'txt_path', type=str, help='txt path output by benchmark_filter')
18
+ parser.add_argument('--port', type=int, default=24727, help='dist port')
19
+ parser.add_argument(
20
+ '--out',
21
+ type=str,
22
+ default='.dev/benchmark_train.sh',
23
+ help='path to save model benchmark script')
24
+
25
+ args = parser.parse_args()
26
+ return args
27
+
28
+
29
+ def create_train_bash_info(commands, config, script_name, partition, port):
30
+ cfg = config.strip()
31
+
32
+ # print cfg name
33
+ echo_info = f'echo \'{cfg}\' &'
34
+ commands.append(echo_info)
35
+ commands.append('\n')
36
+
37
+ _, model_name = osp.split(osp.dirname(cfg))
38
+ config_name, _ = osp.splitext(osp.basename(cfg))
39
+ # default setting
40
+ if cfg in config_8gpu_list:
41
+ command_info = f'GPUS=8 GPUS_PER_NODE=8 ' \
42
+ f'CPUS_PER_TASK=2 {script_name} '
43
+ else:
44
+ command_info = f'GPUS=4 GPUS_PER_NODE=4 ' \
45
+ f'CPUS_PER_TASK=2 {script_name} '
46
+ command_info += f'{partition} '
47
+ command_info += f'{config_name} '
48
+ command_info += f'{cfg} '
49
+ command_info += f'--cfg-options ' \
50
+ f'checkpoint_config.max_keep_ckpts=1 ' \
51
+ f'dist_params.port={port} '
52
+ command_info += f'--work-dir work_dirs/{model_name}/{config_name} '
53
+ # Let the script shut up
54
+ command_info += '>/dev/null &'
55
+
56
+ commands.append(command_info)
57
+ commands.append('\n')
58
+
59
+
60
+ def main():
61
+ args = parse_args()
62
+ if args.out:
63
+ out_suffix = args.out.split('.')[-1]
64
+ assert args.out.endswith('.sh'), \
65
+ f'Expected out file path suffix is .sh, but get .{out_suffix}'
66
+
67
+ root_name = './tools'
68
+ script_name = osp.join(root_name, 'slurm_train.sh')
69
+ port = args.port
70
+ partition_name = 'PARTITION=$1'
71
+
72
+ commands = []
73
+ commands.append(partition_name)
74
+ commands.append('\n')
75
+ commands.append('\n')
76
+
77
+ with open(args.txt_path, 'r') as f:
78
+ model_cfgs = f.readlines()
79
+ for i, cfg in enumerate(model_cfgs):
80
+ create_train_bash_info(commands, cfg, script_name, '$PARTITION',
81
+ port)
82
+ port += 1
83
+
84
+ command_str = ''.join(commands)
85
+ if args.out:
86
+ with open(args.out, 'w') as f:
87
+ f.write(command_str)
88
+
89
+
90
+ if __name__ == '__main__':
91
+ main()
EgoHOS/raw/script/mmsegmentation/.dev/log_collector/example_config.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ work_dir = '../../work_dirs'
2
+ metric = 'mIoU'
3
+
4
+ # specify the log files we would like to collect in `log_items`
5
+ log_items = [
6
+ 'segformer_mit-b5_512x512_160k_ade20k_cnn_lr_with_warmup',
7
+ 'segformer_mit-b5_512x512_160k_ade20k_cnn_no_warmup_lr',
8
+ 'segformer_mit-b5_512x512_160k_ade20k_mit_trans_lr',
9
+ 'segformer_mit-b5_512x512_160k_ade20k_swin_trans_lr'
10
+ ]
11
+ # or specify ignore_keywords, then the folders whose name contain
12
+ # `'segformer'` won't be collected
13
+ # ignore_keywords = ['segformer']
14
+
15
+ # should not include metric
16
+ other_info_keys = ['mAcc']
17
+ markdown_file = 'markdowns/lr_in_trans.json.md'
18
+ json_file = 'jsons/trans_in_cnn.json'
EgoHOS/raw/script/mmsegmentation/.dev/log_collector/log_collector.py ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) OpenMMLab. All rights reserved.
2
+ import argparse
3
+ import datetime
4
+ import json
5
+ import os
6
+ import os.path as osp
7
+ from collections import OrderedDict
8
+
9
+ from utils import load_config
10
+
11
+ # automatically collect all the results
12
+
13
+ # The structure of the directory:
14
+ # ├── work-dir
15
+ # │ ├── config_1
16
+ # │ │ ├── time1.log.json
17
+ # │ │ ├── time2.log.json
18
+ # │ │ ├── time3.log.json
19
+ # │ │ ├── time4.log.json
20
+ # │ ├── config_2
21
+ # │ │ ├── time5.log.json
22
+ # │ │ ├── time6.log.json
23
+ # │ │ ├── time7.log.json
24
+ # │ │ ├── time8.log.json
25
+
26
+
27
+ def parse_args():
28
+ parser = argparse.ArgumentParser(description='extract info from log.json')
29
+ parser.add_argument('config_dir')
30
+ args = parser.parse_args()
31
+ return args
32
+
33
+
34
+ def has_keyword(name: str, keywords: list):
35
+ for a_keyword in keywords:
36
+ if a_keyword in name:
37
+ return True
38
+ return False
39
+
40
+
41
+ def main():
42
+ args = parse_args()
43
+ cfg = load_config(args.config_dir)
44
+ work_dir = cfg['work_dir']
45
+ metric = cfg['metric']
46
+ log_items = cfg.get('log_items', [])
47
+ ignore_keywords = cfg.get('ignore_keywords', [])
48
+ other_info_keys = cfg.get('other_info_keys', [])
49
+ markdown_file = cfg.get('markdown_file', None)
50
+ json_file = cfg.get('json_file', None)
51
+
52
+ if json_file and osp.split(json_file)[0] != '':
53
+ os.makedirs(osp.split(json_file)[0], exist_ok=True)
54
+ if markdown_file and osp.split(markdown_file)[0] != '':
55
+ os.makedirs(osp.split(markdown_file)[0], exist_ok=True)
56
+
57
+ assert not (log_items and ignore_keywords), \
58
+ 'log_items and ignore_keywords cannot be specified at the same time'
59
+ assert metric not in other_info_keys, \
60
+ 'other_info_keys should not contain metric'
61
+
62
+ if ignore_keywords and isinstance(ignore_keywords, str):
63
+ ignore_keywords = [ignore_keywords]
64
+ if other_info_keys and isinstance(other_info_keys, str):
65
+ other_info_keys = [other_info_keys]
66
+ if log_items and isinstance(log_items, str):
67
+ log_items = [log_items]
68
+
69
+ if not log_items:
70
+ log_items = [
71
+ item for item in sorted(os.listdir(work_dir))
72
+ if not has_keyword(item, ignore_keywords)
73
+ ]
74
+
75
+ experiment_info_list = []
76
+ for config_dir in log_items:
77
+ preceding_path = os.path.join(work_dir, config_dir)
78
+ log_list = [
79
+ item for item in os.listdir(preceding_path)
80
+ if item.endswith('.log.json')
81
+ ]
82
+ log_list = sorted(
83
+ log_list,
84
+ key=lambda time_str: datetime.datetime.strptime(
85
+ time_str, '%Y%m%d_%H%M%S.log.json'))
86
+ val_list = []
87
+ last_iter = 0
88
+ for log_name in log_list:
89
+ with open(os.path.join(preceding_path, log_name), 'r') as f:
90
+ # ignore the info line
91
+ f.readline()
92
+ all_lines = f.readlines()
93
+ val_list.extend([
94
+ json.loads(line) for line in all_lines
95
+ if json.loads(line)['mode'] == 'val'
96
+ ])
97
+ for index in range(len(all_lines) - 1, -1, -1):
98
+ line_dict = json.loads(all_lines[index])
99
+ if line_dict['mode'] == 'train':
100
+ last_iter = max(last_iter, line_dict['iter'])
101
+ break
102
+
103
+ new_log_dict = dict(
104
+ method=config_dir, metric_used=metric, last_iter=last_iter)
105
+ for index, log in enumerate(val_list, 1):
106
+ new_ordered_dict = OrderedDict()
107
+ new_ordered_dict['eval_index'] = index
108
+ new_ordered_dict[metric] = log[metric]
109
+ for key in other_info_keys:
110
+ if key in log:
111
+ new_ordered_dict[key] = log[key]
112
+ val_list[index - 1] = new_ordered_dict
113
+
114
+ assert len(val_list) >= 1, \
115
+ f"work dir {config_dir} doesn't contain any evaluation."
116
+ new_log_dict['last eval'] = val_list[-1]
117
+ new_log_dict['best eval'] = max(val_list, key=lambda x: x[metric])
118
+ experiment_info_list.append(new_log_dict)
119
+ print(f'{config_dir} is processed')
120
+
121
+ if json_file:
122
+ with open(json_file, 'w') as f:
123
+ json.dump(experiment_info_list, f, indent=4)
124
+
125
+ if markdown_file:
126
+ lines_to_write = []
127
+ for index, log in enumerate(experiment_info_list, 1):
128
+ lines_to_write.append(
129
+ f"|{index}|{log['method']}|{log['best eval'][metric]}"
130
+ f"|{log['best eval']['eval_index']}|"
131
+ f"{log['last eval'][metric]}|"
132
+ f"{log['last eval']['eval_index']}|{log['last_iter']}|\n")
133
+ with open(markdown_file, 'w') as f:
134
+ f.write(f'|exp_num|method|{metric} best|best index|'
135
+ f'{metric} last|last index|last iter num|\n')
136
+ f.write('|:---:|:---:|:---:|:---:|:---:|:---:|:---:|\n')
137
+ f.writelines(lines_to_write)
138
+
139
+ print('processed successfully')
140
+
141
+
142
+ if __name__ == '__main__':
143
+ main()
EgoHOS/raw/script/mmsegmentation/.dev/log_collector/readme.md ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Log Collector
2
+
3
+ ## Function
4
+
5
+ Automatically collect logs and write the result in a json file or markdown file.
6
+
7
+ If there are several `.log.json` files in one folder, Log Collector assumes that the `.log.json` files other than the first one are resume from the preceding `.log.json` file. Log Collector returns the result considering all `.log.json` files.
8
+
9
+ ## Usage:
10
+
11
+ To use log collector, you need to write a config file to configure the log collector first.
12
+
13
+ For example:
14
+
15
+ example_config.py:
16
+
17
+ ```python
18
+ # The work directory that contains folders that contains .log.json files.
19
+ work_dir = '../../work_dirs'
20
+ # The metric used to find the best evaluation.
21
+ metric = 'mIoU'
22
+
23
+ # **Don't specify the log_items and ignore_keywords at the same time.**
24
+ # Specify the log files we would like to collect in `log_items`.
25
+ # The folders specified should be the subdirectories of `work_dir`.
26
+ log_items = [
27
+ 'segformer_mit-b5_512x512_160k_ade20k_cnn_lr_with_warmup',
28
+ 'segformer_mit-b5_512x512_160k_ade20k_cnn_no_warmup_lr',
29
+ 'segformer_mit-b5_512x512_160k_ade20k_mit_trans_lr',
30
+ 'segformer_mit-b5_512x512_160k_ade20k_swin_trans_lr'
31
+ ]
32
+ # Or specify `ignore_keywords`. The folders whose name contain one
33
+ # of the keywords in the `ignore_keywords` list(e.g., `'segformer'`)
34
+ # won't be collected.
35
+ # ignore_keywords = ['segformer']
36
+
37
+ # Other log items in .log.json that you want to collect.
38
+ # should not include metric.
39
+ other_info_keys = ["mAcc"]
40
+ # The output markdown file's name.
41
+ markdown_file ='markdowns/lr_in_trans.json.md'
42
+ # The output json file's name. (optional)
43
+ json_file = 'jsons/trans_in_cnn.json'
44
+ ```
45
+
46
+ The structure of the work-dir directory should be like:
47
+
48
+ ```text
49
+ ├── work-dir
50
+ │ ├── folder1
51
+ │ │ ├── time1.log.json
52
+ │ │ ├── time2.log.json
53
+ │ │ ├── time3.log.json
54
+ │ │ ├── time4.log.json
55
+ │ ├── folder2
56
+ │ │ ├── time5.log.json
57
+ │ │ ├── time6.log.json
58
+ │ │ ├── time7.log.json
59
+ │ │ ├── time8.log.json
60
+ ```
61
+
62
+ Then , cd to the log collector folder.
63
+
64
+ Now you can run log_collector.py by using command:
65
+
66
+ ```bash
67
+ python log_collector.py ./example_config.py
68
+ ```
69
+
70
+ The output markdown file is like:
71
+
72
+ |exp_num|method|mIoU best|best index|mIoU last|last index|last iter num|
73
+ |:---:|:---:|:---:|:---:|:---:|:---:|:---:|
74
+ |1|segformer_mit-b5_512x512_160k_ade20k_cnn_lr_with_warmup|0.2776|10|0.2776|10|160000|
75
+ |2|segformer_mit-b5_512x512_160k_ade20k_cnn_no_warmup_lr|0.2802|10|0.2802|10|160000|
76
+ |3|segformer_mit-b5_512x512_160k_ade20k_mit_trans_lr|0.4943|11|0.4943|11|160000|
77
+ |4|segformer_mit-b5_512x512_160k_ade20k_swin_trans_lr|0.4883|11|0.4883|11|160000|
78
+
79
+ The output json file is like:
80
+ ```json
81
+ [
82
+ {
83
+ "method": "segformer_mit-b5_512x512_160k_ade20k_cnn_lr_with_warmup",
84
+ "metric_used": "mIoU",
85
+ "last_iter": 160000,
86
+ "last eval": {
87
+ "eval_index": 10,
88
+ "mIoU": 0.2776,
89
+ "mAcc": 0.3779
90
+ },
91
+ "best eval": {
92
+ "eval_index": 10,
93
+ "mIoU": 0.2776,
94
+ "mAcc": 0.3779
95
+ }
96
+ },
97
+ {
98
+ "method": "segformer_mit-b5_512x512_160k_ade20k_cnn_no_warmup_lr",
99
+ "metric_used": "mIoU",
100
+ "last_iter": 160000,
101
+ "last eval": {
102
+ "eval_index": 10,
103
+ "mIoU": 0.2802,
104
+ "mAcc": 0.3764
105
+ },
106
+ "best eval": {
107
+ "eval_index": 10,
108
+ "mIoU": 0.2802,
109
+ "mAcc": 0.3764
110
+ }
111
+ },
112
+ {
113
+ "method": "segformer_mit-b5_512x512_160k_ade20k_mit_trans_lr",
114
+ "metric_used": "mIoU",
115
+ "last_iter": 160000,
116
+ "last eval": {
117
+ "eval_index": 11,
118
+ "mIoU": 0.4943,
119
+ "mAcc": 0.6097
120
+ },
121
+ "best eval": {
122
+ "eval_index": 11,
123
+ "mIoU": 0.4943,
124
+ "mAcc": 0.6097
125
+ }
126
+ },
127
+ {
128
+ "method": "segformer_mit-b5_512x512_160k_ade20k_swin_trans_lr",
129
+ "metric_used": "mIoU",
130
+ "last_iter": 160000,
131
+ "last eval": {
132
+ "eval_index": 11,
133
+ "mIoU": 0.4883,
134
+ "mAcc": 0.6061
135
+ },
136
+ "best eval": {
137
+ "eval_index": 11,
138
+ "mIoU": 0.4883,
139
+ "mAcc": 0.6061
140
+ }
141
+ }
142
+ ]
143
+ ```
EgoHOS/raw/script/mmsegmentation/.dev/log_collector/utils.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) OpenMMLab. All rights reserved.
2
+ # modified from https://github.dev/open-mmlab/mmcv
3
+ import os.path as osp
4
+ import sys
5
+ from importlib import import_module
6
+
7
+
8
+ def load_config(cfg_dir: str) -> dict:
9
+ assert cfg_dir.endswith('.py')
10
+ root_path, file_name = osp.split(cfg_dir)
11
+ temp_module = osp.splitext(file_name)[0]
12
+ sys.path.insert(0, root_path)
13
+ mod = import_module(temp_module)
14
+ sys.path.pop(0)
15
+ cfg_dict = {
16
+ k: v
17
+ for k, v in mod.__dict__.items() if not k.startswith('__')
18
+ }
19
+ del sys.modules[temp_module]
20
+ return cfg_dict
EgoHOS/raw/script/mmsegmentation/.dev/md2yml.py ADDED
@@ -0,0 +1,291 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+
3
+ # Copyright (c) OpenMMLab. All rights reserved.
4
+ # This tool is used to update model-index.yml which is required by MIM, and
5
+ # will be automatically called as a pre-commit hook. The updating will be
6
+ # triggered if any change of model information (.md files in configs/) has been
7
+ # detected before a commit.
8
+
9
+ import glob
10
+ import os
11
+ import os.path as osp
12
+ import re
13
+ import sys
14
+
15
+ import mmcv
16
+ from lxml import etree
17
+
18
+ MMSEG_ROOT = osp.dirname(osp.dirname((osp.dirname(__file__))))
19
+
20
+
21
+ def dump_yaml_and_check_difference(obj, filename, sort_keys=False):
22
+ """Dump object to a yaml file, and check if the file content is different
23
+ from the original.
24
+
25
+ Args:
26
+ obj (any): The python object to be dumped.
27
+ filename (str): YAML filename to dump the object to.
28
+ sort_keys (str); Sort key by dictionary order.
29
+ Returns:
30
+ Bool: If the target YAML file is different from the original.
31
+ """
32
+
33
+ str_dump = mmcv.dump(obj, None, file_format='yaml', sort_keys=sort_keys)
34
+ if osp.isfile(filename):
35
+ file_exists = True
36
+ with open(filename, 'r', encoding='utf-8') as f:
37
+ str_orig = f.read()
38
+ else:
39
+ file_exists = False
40
+ str_orig = None
41
+
42
+ if file_exists and str_orig == str_dump:
43
+ is_different = False
44
+ else:
45
+ is_different = True
46
+ with open(filename, 'w', encoding='utf-8') as f:
47
+ f.write(str_dump)
48
+
49
+ return is_different
50
+
51
+
52
+ def parse_md(md_file):
53
+ """Parse .md file and convert it to a .yml file which can be used for MIM.
54
+
55
+ Args:
56
+ md_file (str): Path to .md file.
57
+ Returns:
58
+ Bool: If the target YAML file is different from the original.
59
+ """
60
+ collection_name = osp.split(osp.dirname(md_file))[1]
61
+ configs = os.listdir(osp.dirname(md_file))
62
+
63
+ collection = dict(
64
+ Name=collection_name,
65
+ Metadata={'Training Data': []},
66
+ Paper={
67
+ 'URL': '',
68
+ 'Title': ''
69
+ },
70
+ README=md_file,
71
+ Code={
72
+ 'URL': '',
73
+ 'Version': ''
74
+ })
75
+ collection.update({'Converted From': {'Weights': '', 'Code': ''}})
76
+ models = []
77
+ datasets = []
78
+ paper_url = None
79
+ paper_title = None
80
+ code_url = None
81
+ code_version = None
82
+ repo_url = None
83
+
84
+ # To avoid re-counting number of backbone model in OpenMMLab,
85
+ # if certain model in configs folder is backbone whose name is already
86
+ # recorded in MMClassification, then the `COLLECTION` dict of this model
87
+ # in MMSegmentation should be deleted, and `In Collection` in `Models`
88
+ # should be set with head or neck of this config file.
89
+ is_backbone = None
90
+
91
+ with open(md_file, 'r') as md:
92
+ lines = md.readlines()
93
+ i = 0
94
+ current_dataset = ''
95
+ while i < len(lines):
96
+ line = lines[i].strip()
97
+ # In latest README.md the title and url are in the third line.
98
+ if i == 2:
99
+ paper_url = lines[i].split('](')[1].split(')')[0]
100
+ paper_title = lines[i].split('](')[0].split('[')[1]
101
+ if len(line) == 0:
102
+ i += 1
103
+ continue
104
+ elif line[:3] == '<a ':
105
+ content = etree.HTML(line)
106
+ node = content.xpath('//a')[0]
107
+ if node.text == 'Code Snippet':
108
+ code_url = node.get('href', None)
109
+ assert code_url is not None, (
110
+ f'{collection_name} hasn\'t code snippet url.')
111
+ # version extraction
112
+ filter_str = r'blob/(.*)/mm'
113
+ pattern = re.compile(filter_str)
114
+ code_version = pattern.findall(code_url)
115
+ assert len(code_version) == 1, (
116
+ f'false regular expression ({filter_str}) use.')
117
+ code_version = code_version[0]
118
+ elif node.text == 'Official Repo':
119
+ repo_url = node.get('href', None)
120
+ assert repo_url is not None, (
121
+ f'{collection_name} hasn\'t official repo url.')
122
+ i += 1
123
+ elif line[:4] == '### ':
124
+ datasets.append(line[4:])
125
+ current_dataset = line[4:]
126
+ i += 2
127
+ elif line[:15] == '<!-- [BACKBONE]':
128
+ is_backbone = True
129
+ i += 1
130
+ elif line[0] == '|' and (
131
+ i + 1) < len(lines) and lines[i + 1][:3] == '| -':
132
+ cols = [col.strip() for col in line.split('|')]
133
+ method_id = cols.index('Method')
134
+ backbone_id = cols.index('Backbone')
135
+ crop_size_id = cols.index('Crop Size')
136
+ lr_schd_id = cols.index('Lr schd')
137
+ mem_id = cols.index('Mem (GB)')
138
+ fps_id = cols.index('Inf time (fps)')
139
+ try:
140
+ ss_id = cols.index('mIoU')
141
+ except ValueError:
142
+ ss_id = cols.index('Dice')
143
+ try:
144
+ ms_id = cols.index('mIoU(ms+flip)')
145
+ except ValueError:
146
+ ms_id = False
147
+ config_id = cols.index('config')
148
+ download_id = cols.index('download')
149
+ j = i + 2
150
+ while j < len(lines) and lines[j][0] == '|':
151
+ els = [el.strip() for el in lines[j].split('|')]
152
+ config = ''
153
+ model_name = ''
154
+ weight = ''
155
+ for fn in configs:
156
+ if fn in els[config_id]:
157
+ left = els[download_id].index(
158
+ 'https://download.openmmlab.com')
159
+ right = els[download_id].index('.pth') + 4
160
+ weight = els[download_id][left:right]
161
+ config = f'configs/{collection_name}/{fn}'
162
+ model_name = fn[:-3]
163
+ fps = els[fps_id] if els[fps_id] != '-' and els[
164
+ fps_id] != '' else -1
165
+ mem = els[mem_id].split(
166
+ '\\'
167
+ )[0] if els[mem_id] != '-' and els[mem_id] != '' else -1
168
+ crop_size = els[crop_size_id].split('x')
169
+ assert len(crop_size) == 2
170
+ method = els[method_id].split()[0].split('-')[-1]
171
+ model = {
172
+ 'Name':
173
+ model_name,
174
+ 'In Collection':
175
+ method,
176
+ 'Metadata': {
177
+ 'backbone': els[backbone_id],
178
+ 'crop size': f'({crop_size[0]},{crop_size[1]})',
179
+ 'lr schd': int(els[lr_schd_id]),
180
+ },
181
+ 'Results': [
182
+ {
183
+ 'Task': 'Semantic Segmentation',
184
+ 'Dataset': current_dataset,
185
+ 'Metrics': {
186
+ cols[ss_id]: float(els[ss_id]),
187
+ },
188
+ },
189
+ ],
190
+ 'Config':
191
+ config,
192
+ 'Weights':
193
+ weight,
194
+ }
195
+ if fps != -1:
196
+ try:
197
+ fps = float(fps)
198
+ except Exception:
199
+ j += 1
200
+ continue
201
+ model['Metadata']['inference time (ms/im)'] = [{
202
+ 'value':
203
+ round(1000 / float(fps), 2),
204
+ 'hardware':
205
+ 'V100',
206
+ 'backend':
207
+ 'PyTorch',
208
+ 'batch size':
209
+ 1,
210
+ 'mode':
211
+ 'FP32' if 'fp16' not in config else 'FP16',
212
+ 'resolution':
213
+ f'({crop_size[0]},{crop_size[1]})'
214
+ }]
215
+ if mem != -1:
216
+ model['Metadata']['Training Memory (GB)'] = float(mem)
217
+ # Only have semantic segmentation now
218
+ if ms_id and els[ms_id] != '-' and els[ms_id] != '':
219
+ model['Results'][0]['Metrics'][
220
+ 'mIoU(ms+flip)'] = float(els[ms_id])
221
+ models.append(model)
222
+ j += 1
223
+ i = j
224
+ else:
225
+ i += 1
226
+ flag = (code_url is not None) and (paper_url is not None) and (repo_url
227
+ is not None)
228
+ assert flag, f'{collection_name} readme error'
229
+ collection['Name'] = method
230
+ collection['Metadata']['Training Data'] = datasets
231
+ collection['Code']['URL'] = code_url
232
+ collection['Code']['Version'] = code_version
233
+ collection['Paper']['URL'] = paper_url
234
+ collection['Paper']['Title'] = paper_title
235
+ collection['Converted From']['Code'] = repo_url
236
+ # ['Converted From']['Weights] miss
237
+ # remove empty attribute
238
+ check_key_list = ['Code', 'Paper', 'Converted From']
239
+ for check_key in check_key_list:
240
+ key_list = list(collection[check_key].keys())
241
+ for key in key_list:
242
+ if check_key not in collection:
243
+ break
244
+ if collection[check_key][key] == '':
245
+ if len(collection[check_key].keys()) == 1:
246
+ collection.pop(check_key)
247
+ else:
248
+ collection[check_key].pop(key)
249
+ if is_backbone:
250
+ result = {'Models': models}
251
+ else:
252
+ result = {'Collections': [collection], 'Models': models}
253
+ yml_file = f'{md_file[:-9]}{collection_name}.yml'
254
+ return dump_yaml_and_check_difference(result, yml_file)
255
+
256
+
257
+ def update_model_index():
258
+ """Update model-index.yml according to model .md files.
259
+
260
+ Returns:
261
+ Bool: If the updated model-index.yml is different from the original.
262
+ """
263
+ configs_dir = osp.join(MMSEG_ROOT, 'configs')
264
+ yml_files = glob.glob(osp.join(configs_dir, '**', '*.yml'), recursive=True)
265
+ yml_files.sort()
266
+
267
+ # add .replace('\\', '/') to avoid Windows Style path
268
+ model_index = {
269
+ 'Import': [
270
+ osp.relpath(yml_file, MMSEG_ROOT).replace('\\', '/')
271
+ for yml_file in yml_files
272
+ ]
273
+ }
274
+ model_index_file = osp.join(MMSEG_ROOT, 'model-index.yml')
275
+ is_different = dump_yaml_and_check_difference(model_index,
276
+ model_index_file)
277
+
278
+ return is_different
279
+
280
+
281
+ if __name__ == '__main__':
282
+ file_list = [fn for fn in sys.argv[1:] if osp.basename(fn) == 'README.md']
283
+ if not file_list:
284
+ sys.exit(0)
285
+ file_modified = False
286
+ for fn in file_list:
287
+ file_modified |= parse_md(fn)
288
+
289
+ file_modified |= update_model_index()
290
+
291
+ sys.exit(1 if file_modified else 0)
EgoHOS/raw/script/mmsegmentation/.dev/upload_modelzoo.py ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) OpenMMLab. All rights reserved.
2
+ import argparse
3
+ import os
4
+ import os.path as osp
5
+
6
+ import oss2
7
+
8
+ ACCESS_KEY_ID = os.getenv('OSS_ACCESS_KEY_ID', None)
9
+ ACCESS_KEY_SECRET = os.getenv('OSS_ACCESS_KEY_SECRET', None)
10
+ BUCKET_NAME = 'openmmlab'
11
+ ENDPOINT = 'https://oss-accelerate.aliyuncs.com'
12
+
13
+
14
+ def parse_args():
15
+ parser = argparse.ArgumentParser(description='Upload models to OSS')
16
+ parser.add_argument('model_zoo', type=str, help='model_zoo input')
17
+ parser.add_argument(
18
+ '--dst-folder',
19
+ type=str,
20
+ default='mmsegmentation/v0.5',
21
+ help='destination folder')
22
+ args = parser.parse_args()
23
+ return args
24
+
25
+
26
+ def main():
27
+ args = parse_args()
28
+ model_zoo = args.model_zoo
29
+ dst_folder = args.dst_folder
30
+ bucket = oss2.Bucket(
31
+ oss2.Auth(ACCESS_KEY_ID, ACCESS_KEY_SECRET), ENDPOINT, BUCKET_NAME)
32
+
33
+ for root, dirs, files in os.walk(model_zoo):
34
+ for file in files:
35
+ file_path = osp.relpath(osp.join(root, file), model_zoo)
36
+ print(f'Uploading {file_path}')
37
+
38
+ oss2.resumable_upload(bucket, osp.join(dst_folder, file_path),
39
+ osp.join(model_zoo, file_path))
40
+ bucket.put_object_acl(
41
+ osp.join(dst_folder, file_path), oss2.OBJECT_ACL_PUBLIC_READ)
42
+
43
+
44
+ if __name__ == '__main__':
45
+ main()
EgoHOS/raw/script/mmsegmentation/.gitignore ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+ MANIFEST
27
+
28
+ # PyInstaller
29
+ # Usually these files are written by a python script from a template
30
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Installer logs
35
+ pip-log.txt
36
+ pip-delete-this-directory.txt
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .tox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ .hypothesis/
48
+ .pytest_cache/
49
+
50
+ # Translations
51
+ *.mo
52
+ *.pot
53
+
54
+ # Django stuff:
55
+ *.log
56
+ local_settings.py
57
+ db.sqlite3
58
+
59
+ # Flask stuff:
60
+ instance/
61
+ .webassets-cache
62
+
63
+ # Scrapy stuff:
64
+ .scrapy
65
+
66
+ # Sphinx documentation
67
+ docs/en/_build/
68
+ docs/zh_cn/_build/
69
+
70
+ # PyBuilder
71
+ target/
72
+
73
+ # Jupyter Notebook
74
+ .ipynb_checkpoints
75
+
76
+ # pyenv
77
+ .python-version
78
+
79
+ # celery beat schedule file
80
+ celerybeat-schedule
81
+
82
+ # SageMath parsed files
83
+ *.sage.py
84
+
85
+ # Environments
86
+ .env
87
+ .venv
88
+ env/
89
+ venv/
90
+ ENV/
91
+ env.bak/
92
+ venv.bak/
93
+ .DS_Store
94
+
95
+ # Spyder project settings
96
+ .spyderproject
97
+ .spyproject
98
+
99
+ # Rope project settings
100
+ .ropeproject
101
+
102
+ # mkdocs documentation
103
+ /site
104
+
105
+ # mypy
106
+ .mypy_cache/
107
+
108
+ data
109
+ .vscode
110
+ .idea
111
+
112
+ # custom
113
+ *.pkl
114
+ *.pkl.json
115
+ *.log.json
116
+ work_dirs/
117
+ mmseg/.mim
118
+
119
+ # Pytorch
120
+ *.pth
EgoHOS/raw/script/mmsegmentation/.owners.yml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ assign:
2
+ strategy:
3
+ # random
4
+ # daily-shift-based
5
+ round-robin
6
+ assignees:
7
+ - MeowZheng
8
+ - MengzhangLI
9
+ - linfangjian01
10
+ - xiaoachen98
EgoHOS/raw/script/mmsegmentation/.pre-commit-config.yaml ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ repos:
2
+ - repo: https://gitlab.com/pycqa/flake8.git
3
+ rev: 3.8.3
4
+ hooks:
5
+ - id: flake8
6
+ - repo: https://github.com/PyCQA/isort
7
+ rev: 5.10.1
8
+ hooks:
9
+ - id: isort
10
+ - repo: https://github.com/pre-commit/mirrors-yapf
11
+ rev: v0.30.0
12
+ hooks:
13
+ - id: yapf
14
+ - repo: https://github.com/pre-commit/pre-commit-hooks
15
+ rev: v3.1.0
16
+ hooks:
17
+ - id: trailing-whitespace
18
+ - id: check-yaml
19
+ - id: end-of-file-fixer
20
+ - id: requirements-txt-fixer
21
+ - id: double-quote-string-fixer
22
+ - id: check-merge-conflict
23
+ - id: fix-encoding-pragma
24
+ args: ["--remove"]
25
+ - id: mixed-line-ending
26
+ args: ["--fix=lf"]
27
+ - repo: https://github.com/markdownlint/markdownlint
28
+ rev: v0.11.0
29
+ hooks:
30
+ - id: markdownlint
31
+ args: ["-r", "~MD002,~MD013,~MD029,~MD033,~MD034",
32
+ "-t", "allow_different_nesting"]
33
+ - repo: https://github.com/codespell-project/codespell
34
+ rev: v2.1.0
35
+ hooks:
36
+ - id: codespell
37
+ - repo: https://github.com/myint/docformatter
38
+ rev: v1.3.1
39
+ hooks:
40
+ - id: docformatter
41
+ args: ["--in-place", "--wrap-descriptions", "79"]
42
+ - repo: local
43
+ hooks:
44
+ - id: update-model-index
45
+ name: update-model-index
46
+ description: Collect model information and update model-index.yml
47
+ entry: .dev/md2yml.py
48
+ additional_dependencies: [mmcv, lxml]
49
+ language: python
50
+ files: ^configs/.*\.md$
51
+ require_serial: true
52
+ - repo: https://github.com/open-mmlab/pre-commit-hooks
53
+ rev: v0.2.0 # Use the rev to fix revision
54
+ hooks:
55
+ - id: check-algo-readme
56
+ - id: check-copyright
57
+ args: ["mmseg", "tools", "tests", "demo"] # the dir_to_check with expected directory to check
EgoHOS/raw/script/mmsegmentation/.readthedocs.yml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ version: 2
2
+
3
+ formats: all
4
+
5
+ python:
6
+ version: 3.7
7
+ install:
8
+ - requirements: requirements/docs.txt
9
+ - requirements: requirements/readthedocs.txt
EgoHOS/raw/script/mmsegmentation/CITATION.cff ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite it as below."
3
+ authors:
4
+ - name: "MMSegmentation Contributors"
5
+ title: "OpenMMLab Semantic Segmentation Toolbox and Benchmark"
6
+ date-released: 2020-07-10
7
+ url: "https://github.com/open-mmlab/mmsegmentation"
8
+ license: Apache-2.0
EgoHOS/raw/script/mmsegmentation/LICENSE ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright 2020 The MMSegmentation Authors. All rights reserved.
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE text from the Work, provided
122
+ that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions stated in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work
134
+ by You to the Licensor shall be under the terms and conditions of
135
+ this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify
137
+ the terms of any separate license agreement you may have executed
138
+ with Licensor regarding such Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for reasonable and customary use in describing the
143
+ origin of the Work and reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or
146
+ agreed to in writing, Licensor provides the Work (and each
147
+ Contributor provides its Contributions) on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
+ implied, including, without limitation, any warranties or conditions
150
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
+ PARTICULAR PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor
165
+ has been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may choose to offer,
169
+ and charge a fee for, acceptance of support, warranty, indemnity,
170
+ or other liability obligations and/or rights consistent with this
171
+ License. However, in accepting such obligations, You may act only
172
+ on Your own behalf and on Your sole responsibility, not on behalf
173
+ of any other Contributor, and only if You agree to indemnify,
174
+ defend, and hold each Contributor harmless for any liability
175
+ incurred by, or claims asserted against, such Contributor by reason
176
+ of your accepting any such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS
179
+
180
+ APPENDIX: How to apply the Apache License to your work.
181
+
182
+ To apply the Apache License to your work, attach the following
183
+ boilerplate notice, with the fields enclosed by brackets "[]"
184
+ replaced with your own identifying information. (Don't include
185
+ the brackets!) The text should be enclosed in the appropriate
186
+ comment syntax for the file format. We also recommend that a
187
+ file or class name and description of purpose be included on the
188
+ same "printed page" as the copyright notice for easier
189
+ identification within third-party archives.
190
+
191
+ Copyright 2020 The MMSegmentation Authors.
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.
EgoHOS/raw/script/mmsegmentation/MANIFEST.in ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ include requirements/*.txt
2
+ include mmseg/.mim/model-index.yml
3
+ recursive-include mmseg/.mim/configs *.py *.yml
4
+ recursive-include mmseg/.mim/tools *.py *.sh
EgoHOS/raw/script/mmsegmentation/README.md ADDED
@@ -0,0 +1,230 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div align="center">
2
+ <img src="resources/mmseg-logo.png" width="600"/>
3
+ <div>&nbsp;</div>
4
+ <div align="center">
5
+ <b><font size="5">OpenMMLab website</font></b>
6
+ <sup>
7
+ <a href="https://openmmlab.com">
8
+ <i><font size="4">HOT</font></i>
9
+ </a>
10
+ </sup>
11
+ &nbsp;&nbsp;&nbsp;&nbsp;
12
+ <b><font size="5">OpenMMLab platform</font></b>
13
+ <sup>
14
+ <a href="https://platform.openmmlab.com">
15
+ <i><font size="4">TRY IT OUT</font></i>
16
+ </a>
17
+ </sup>
18
+ </div>
19
+ <div>&nbsp;</div>
20
+
21
+ <br />
22
+
23
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mmsegmentation)](https://pypi.org/project/mmsegmentation/)
24
+ [![PyPI](https://img.shields.io/pypi/v/mmsegmentation)](https://pypi.org/project/mmsegmentation)
25
+ [![docs](https://img.shields.io/badge/docs-latest-blue)](https://mmsegmentation.readthedocs.io/en/latest/)
26
+ [![badge](https://github.com/open-mmlab/mmsegmentation/workflows/build/badge.svg)](https://github.com/open-mmlab/mmsegmentation/actions)
27
+ [![codecov](https://codecov.io/gh/open-mmlab/mmsegmentation/branch/master/graph/badge.svg)](https://codecov.io/gh/open-mmlab/mmsegmentation)
28
+ [![license](https://img.shields.io/github/license/open-mmlab/mmsegmentation.svg)](https://github.com/open-mmlab/mmsegmentation/blob/master/LICENSE)
29
+ [![issue resolution](https://isitmaintained.com/badge/resolution/open-mmlab/mmsegmentation.svg)](https://github.com/open-mmlab/mmsegmentation/issues)
30
+ [![open issues](https://isitmaintained.com/badge/open/open-mmlab/mmsegmentation.svg)](https://github.com/open-mmlab/mmsegmentation/issues)
31
+
32
+ [📘Documentation](https://mmsegmentation.readthedocs.io/en/latest/) |
33
+ [🛠️Installation](https://mmsegmentation.readthedocs.io/en/latest/get_started.html) |
34
+ [👀Model Zoo](https://mmsegmentation.readthedocs.io/en/latest/model_zoo.html) |
35
+ [🆕Update News](https://mmsegmentation.readthedocs.io/en/latest/changelog.html) |
36
+ [🤔Reporting Issues](https://github.com/open-mmlab/mmsegmentation/issues/new/choose)
37
+
38
+ </div>
39
+
40
+ <div align="center">
41
+
42
+ English | [简体中文](README_zh-CN.md)
43
+
44
+ </div>
45
+
46
+ ## Introduction
47
+
48
+ MMSegmentation is an open source semantic segmentation toolbox based on PyTorch.
49
+ It is a part of the [OpenMMLab](https://openmmlab.com/) project.
50
+
51
+ The master branch works with **PyTorch 1.5+**.
52
+
53
+ ![demo image](resources/seg_demo.gif)
54
+
55
+ <details open>
56
+ <summary>Major features</summary>
57
+
58
+ - **Unified Benchmark**
59
+
60
+ We provide a unified benchmark toolbox for various semantic segmentation methods.
61
+
62
+ - **Modular Design**
63
+
64
+ We decompose the semantic segmentation framework into different components and one can easily construct a customized semantic segmentation framework by combining different modules.
65
+
66
+ - **Support of multiple methods out of box**
67
+
68
+ The toolbox directly supports popular and contemporary semantic segmentation frameworks, *e.g.* PSPNet, DeepLabV3, PSANet, DeepLabV3+, etc.
69
+
70
+ - **High efficiency**
71
+
72
+ The training speed is faster than or comparable to other codebases.
73
+
74
+ </details>
75
+
76
+ ## What's New
77
+
78
+ v0.26.0 was released in 7/1/2022:
79
+
80
+ - Update New SegFormer models on ADE20K
81
+ - Dedicated MMSegWandbHook for MMSegmentation to use wandb visualization tool
82
+
83
+ Please refer to [changelog.md](docs/en/changelog.md) for details and release history.
84
+
85
+ ## Installation
86
+
87
+ Please refer to [get_started.md](docs/en/get_started.md#installation) for installation and [dataset_prepare.md](docs/en/dataset_prepare.md#prepare-datasets) for dataset preparation.
88
+
89
+ ## Get Started
90
+
91
+ Please see [train.md](docs/en/train.md) and [inference.md](docs/en/inference.md) for the basic usage of MMSegmentation.
92
+ There are also tutorials for:
93
+
94
+ - [customizing dataset](docs/en/tutorials/customize_datasets.md)
95
+ - [designing data pipeline](docs/en/tutorials/data_pipeline.md)
96
+ - [customizing modules](docs/en/tutorials/customize_models.md)
97
+ - [customizing runtime](docs/en/tutorials/customize_runtime.md)
98
+ - [training tricks](docs/en/tutorials/training_tricks.md)
99
+ - [useful tools](docs/en/useful_tools.md)
100
+
101
+ A Colab tutorial is also provided. You may preview the notebook [here](demo/MMSegmentation_Tutorial.ipynb) or directly [run](https://colab.research.google.com/github/open-mmlab/mmsegmentation/blob/master/demo/MMSegmentation_Tutorial.ipynb) on Colab.
102
+
103
+ ## Benchmark and model zoo
104
+
105
+ Results and models are available in the [model zoo](docs/en/model_zoo.md).
106
+
107
+ Supported backbones:
108
+
109
+ - [x] ResNet (CVPR'2016)
110
+ - [x] ResNeXt (CVPR'2017)
111
+ - [x] [HRNet (CVPR'2019)](configs/hrnet)
112
+ - [x] [ResNeSt (ArXiv'2020)](configs/resnest)
113
+ - [x] [MobileNetV2 (CVPR'2018)](configs/mobilenet_v2)
114
+ - [x] [MobileNetV3 (ICCV'2019)](configs/mobilenet_v3)
115
+ - [x] [Vision Transformer (ICLR'2021)](configs/vit)
116
+ - [x] [Swin Transformer (ICCV'2021)](configs/swin)
117
+ - [x] [Twins (NeurIPS'2021)](configs/twins)
118
+ - [x] [BEiT (ICLR'2022)](configs/beit)
119
+ - [x] [ConvNeXt (CVPR'2022)](configs/convnext)
120
+ - [x] [MAE (CVPR'2022)](configs/mae)
121
+
122
+ Supported methods:
123
+
124
+ - [x] [FCN (CVPR'2015/TPAMI'2017)](configs/fcn)
125
+ - [x] [ERFNet (T-ITS'2017)](configs/erfnet)
126
+ - [x] [UNet (MICCAI'2016/Nat. Methods'2019)](configs/unet)
127
+ - [x] [PSPNet (CVPR'2017)](configs/pspnet)
128
+ - [x] [DeepLabV3 (ArXiv'2017)](configs/deeplabv3)
129
+ - [x] [BiSeNetV1 (ECCV'2018)](configs/bisenetv1)
130
+ - [x] [PSANet (ECCV'2018)](configs/psanet)
131
+ - [x] [DeepLabV3+ (CVPR'2018)](configs/deeplabv3plus)
132
+ - [x] [UPerNet (ECCV'2018)](configs/upernet)
133
+ - [x] [ICNet (ECCV'2018)](configs/icnet)
134
+ - [x] [NonLocal Net (CVPR'2018)](configs/nonlocal_net)
135
+ - [x] [EncNet (CVPR'2018)](configs/encnet)
136
+ - [x] [Semantic FPN (CVPR'2019)](configs/sem_fpn)
137
+ - [x] [DANet (CVPR'2019)](configs/danet)
138
+ - [x] [APCNet (CVPR'2019)](configs/apcnet)
139
+ - [x] [EMANet (ICCV'2019)](configs/emanet)
140
+ - [x] [CCNet (ICCV'2019)](configs/ccnet)
141
+ - [x] [DMNet (ICCV'2019)](configs/dmnet)
142
+ - [x] [ANN (ICCV'2019)](configs/ann)
143
+ - [x] [GCNet (ICCVW'2019/TPAMI'2020)](configs/gcnet)
144
+ - [x] [FastFCN (ArXiv'2019)](configs/fastfcn)
145
+ - [x] [Fast-SCNN (ArXiv'2019)](configs/fastscnn)
146
+ - [x] [ISANet (ArXiv'2019/IJCV'2021)](configs/isanet)
147
+ - [x] [OCRNet (ECCV'2020)](configs/ocrnet)
148
+ - [x] [DNLNet (ECCV'2020)](configs/dnlnet)
149
+ - [x] [PointRend (CVPR'2020)](configs/point_rend)
150
+ - [x] [CGNet (TIP'2020)](configs/cgnet)
151
+ - [x] [BiSeNetV2 (IJCV'2021)](configs/bisenetv2)
152
+ - [x] [STDC (CVPR'2021)](configs/stdc)
153
+ - [x] [SETR (CVPR'2021)](configs/setr)
154
+ - [x] [DPT (ArXiv'2021)](configs/dpt)
155
+ - [x] [Segmenter (ICCV'2021)](configs/segmenter)
156
+ - [x] [SegFormer (NeurIPS'2021)](configs/segformer)
157
+ - [x] [K-Net (NeurIPS'2021)](configs/knet)
158
+
159
+ Supported datasets:
160
+
161
+ - [x] [Cityscapes](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#cityscapes)
162
+ - [x] [PASCAL VOC](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#pascal-voc)
163
+ - [x] [ADE20K](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#ade20k)
164
+ - [x] [Pascal Context](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#pascal-context)
165
+ - [x] [COCO-Stuff 10k](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#coco-stuff-10k)
166
+ - [x] [COCO-Stuff 164k](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#coco-stuff-164k)
167
+ - [x] [CHASE_DB1](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#chase-db1)
168
+ - [x] [DRIVE](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#drive)
169
+ - [x] [HRF](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#hrf)
170
+ - [x] [STARE](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#stare)
171
+ - [x] [Dark Zurich](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#dark-zurich)
172
+ - [x] [Nighttime Driving](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#nighttime-driving)
173
+ - [x] [LoveDA](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#loveda)
174
+ - [x] [Potsdam](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#isprs-potsdam)
175
+ - [x] [Vaihingen](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#isprs-vaihingen)
176
+ - [x] [iSAID](https://github.com/open-mmlab/mmsegmentation/blob/master/docs/en/dataset_prepare.md#isaid)
177
+
178
+ ## FAQ
179
+
180
+ Please refer to [FAQ](docs/en/faq.md) for frequently asked questions.
181
+
182
+ ## Contributing
183
+
184
+ We appreciate all contributions to improve MMSegmentation. Please refer to [CONTRIBUTING.md](.github/CONTRIBUTING.md) for the contributing guideline.
185
+
186
+ ## Acknowledgement
187
+
188
+ MMSegmentation is an open source project that welcome any contribution and feedback.
189
+ We wish that the toolbox and benchmark could serve the growing research
190
+ community by providing a flexible as well as standardized toolkit to reimplement existing methods
191
+ and develop their own new semantic segmentation methods.
192
+
193
+ ## Citation
194
+
195
+ If you find this project useful in your research, please consider cite:
196
+
197
+ ```bibtex
198
+ @misc{mmseg2020,
199
+ title={{MMSegmentation}: OpenMMLab Semantic Segmentation Toolbox and Benchmark},
200
+ author={MMSegmentation Contributors},
201
+ howpublished = {\url{https://github.com/open-mmlab/mmsegmentation}},
202
+ year={2020}
203
+ }
204
+ ```
205
+
206
+ ## License
207
+
208
+ MMSegmentation is released under the Apache 2.0 license, while some specific features in this library are with other licenses. Please refer to [LICENSES.md](LICENSES.md) for the careful check, if you are using our code for commercial matters.
209
+
210
+ ## Projects in OpenMMLab
211
+
212
+ - [MMCV](https://github.com/open-mmlab/mmcv): OpenMMLab foundational library for computer vision.
213
+ - [MIM](https://github.com/open-mmlab/mim): MIM installs OpenMMLab packages.
214
+ - [MMClassification](https://github.com/open-mmlab/mmclassification): OpenMMLab image classification toolbox and benchmark.
215
+ - [MMDetection](https://github.com/open-mmlab/mmdetection): OpenMMLab detection toolbox and benchmark.
216
+ - [MMDetection3D](https://github.com/open-mmlab/mmdetection3d): OpenMMLab's next-generation platform for general 3D object detection.
217
+ - [MMRotate](https://github.com/open-mmlab/mmrotate): OpenMMLab rotated object detection toolbox and benchmark.
218
+ - [MMSegmentation](https://github.com/open-mmlab/mmsegmentation): OpenMMLab semantic segmentation toolbox and benchmark.
219
+ - [MMOCR](https://github.com/open-mmlab/mmocr): OpenMMLab text detection, recognition, and understanding toolbox.
220
+ - [MMPose](https://github.com/open-mmlab/mmpose): OpenMMLab pose estimation toolbox and benchmark.
221
+ - [MMHuman3D](https://github.com/open-mmlab/mmhuman3d): OpenMMLab 3D human parametric model toolbox and benchmark.
222
+ - [MMSelfSup](https://github.com/open-mmlab/mmselfsup): OpenMMLab self-supervised learning toolbox and benchmark.
223
+ - [MMRazor](https://github.com/open-mmlab/mmrazor): OpenMMLab model compression toolbox and benchmark.
224
+ - [MMFewShot](https://github.com/open-mmlab/mmfewshot): OpenMMLab fewshot learning toolbox and benchmark.
225
+ - [MMAction2](https://github.com/open-mmlab/mmaction2): OpenMMLab's next-generation action understanding toolbox and benchmark.
226
+ - [MMTracking](https://github.com/open-mmlab/mmtracking): OpenMMLab video perception toolbox and benchmark.
227
+ - [MMFlow](https://github.com/open-mmlab/mmflow): OpenMMLab optical flow toolbox and benchmark.
228
+ - [MMEditing](https://github.com/open-mmlab/mmediting): OpenMMLab image and video editing toolbox.
229
+ - [MMGeneration](https://github.com/open-mmlab/mmgeneration): OpenMMLab image and video generative models toolbox.
230
+ - [MMDeploy](https://github.com/open-mmlab/mmdeploy): OpenMMLab Model Deployment Framework.
EgoHOS/raw/script/mmsegmentation/cleanup_ckpt.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import glob
2
+ import pdb
3
+ import os
4
+
5
+
6
+ ckpt_dir = './work_dirs'
7
+
8
+ for ckpt_file in glob.glob(ckpt_dir + '/**/*.pth'):
9
+
10
+ if 'best' in ckpt_file:
11
+ print('keep : ', ckpt_file)
12
+ else:
13
+ print('remove: ', ckpt_file)
14
+ os.remove(ckpt_file)
15
+
16
+
17
+
18
+
19
+
EgoHOS/raw/script/mmsegmentation/configs/_base_/datasets/ade20k.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # dataset settings
2
+ dataset_type = 'ADE20KDataset'
3
+ data_root = 'data/ade/ADEChallengeData2016'
4
+ img_norm_cfg = dict(
5
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
6
+ crop_size = (512, 512)
7
+ train_pipeline = [
8
+ dict(type='LoadImageFromFile'),
9
+ dict(type='LoadAnnotations', reduce_zero_label=True),
10
+ dict(type='Resize', img_scale=(2048, 512), ratio_range=(0.5, 2.0)),
11
+ dict(type='RandomCrop', crop_size=crop_size, cat_max_ratio=0.75),
12
+ dict(type='RandomFlip', prob=0.5),
13
+ dict(type='PhotoMetricDistortion'),
14
+ dict(type='Normalize', **img_norm_cfg),
15
+ dict(type='Pad', size=crop_size, pad_val=0, seg_pad_val=255),
16
+ dict(type='DefaultFormatBundle'),
17
+ dict(type='Collect', keys=['img', 'gt_semantic_seg']),
18
+ ]
19
+ test_pipeline = [
20
+ dict(type='LoadImageFromFile'),
21
+ dict(
22
+ type='MultiScaleFlipAug',
23
+ img_scale=(2048, 512),
24
+ # img_ratios=[0.5, 0.75, 1.0, 1.25, 1.5, 1.75],
25
+ flip=False,
26
+ transforms=[
27
+ dict(type='Resize', keep_ratio=True),
28
+ dict(type='RandomFlip'),
29
+ dict(type='Normalize', **img_norm_cfg),
30
+ dict(type='ImageToTensor', keys=['img']),
31
+ dict(type='Collect', keys=['img']),
32
+ ])
33
+ ]
34
+ data = dict(
35
+ samples_per_gpu=4,
36
+ workers_per_gpu=4,
37
+ train=dict(
38
+ type=dataset_type,
39
+ data_root=data_root,
40
+ img_dir='images/training',
41
+ ann_dir='annotations/training',
42
+ pipeline=train_pipeline),
43
+ val=dict(
44
+ type=dataset_type,
45
+ data_root=data_root,
46
+ img_dir='images/validation',
47
+ ann_dir='annotations/validation',
48
+ pipeline=test_pipeline),
49
+ test=dict(
50
+ type=dataset_type,
51
+ data_root=data_root,
52
+ img_dir='images/validation',
53
+ ann_dir='annotations/validation',
54
+ pipeline=test_pipeline))
EgoHOS/raw/script/mmsegmentation/configs/_base_/datasets/ade20k_640x640.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # dataset settings
2
+ dataset_type = 'ADE20KDataset'
3
+ data_root = 'data/ade/ADEChallengeData2016'
4
+ img_norm_cfg = dict(
5
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
6
+ crop_size = (640, 640)
7
+ train_pipeline = [
8
+ dict(type='LoadImageFromFile'),
9
+ dict(type='LoadAnnotations', reduce_zero_label=True),
10
+ dict(type='Resize', img_scale=(2560, 640), ratio_range=(0.5, 2.0)),
11
+ dict(type='RandomCrop', crop_size=crop_size, cat_max_ratio=0.75),
12
+ dict(type='RandomFlip', prob=0.5),
13
+ dict(type='PhotoMetricDistortion'),
14
+ dict(type='Normalize', **img_norm_cfg),
15
+ dict(type='Pad', size=crop_size, pad_val=0, seg_pad_val=255),
16
+ dict(type='DefaultFormatBundle'),
17
+ dict(type='Collect', keys=['img', 'gt_semantic_seg']),
18
+ ]
19
+ test_pipeline = [
20
+ dict(type='LoadImageFromFile'),
21
+ dict(
22
+ type='MultiScaleFlipAug',
23
+ img_scale=(2560, 640),
24
+ # img_ratios=[0.5, 0.75, 1.0, 1.25, 1.5, 1.75],
25
+ flip=False,
26
+ transforms=[
27
+ dict(type='Resize', keep_ratio=True),
28
+ dict(type='RandomFlip'),
29
+ dict(type='Normalize', **img_norm_cfg),
30
+ dict(type='ImageToTensor', keys=['img']),
31
+ dict(type='Collect', keys=['img']),
32
+ ])
33
+ ]
34
+ data = dict(
35
+ samples_per_gpu=4,
36
+ workers_per_gpu=4,
37
+ train=dict(
38
+ type=dataset_type,
39
+ data_root=data_root,
40
+ img_dir='images/training',
41
+ ann_dir='annotations/training',
42
+ pipeline=train_pipeline),
43
+ val=dict(
44
+ type=dataset_type,
45
+ data_root=data_root,
46
+ img_dir='images/validation',
47
+ ann_dir='annotations/validation',
48
+ pipeline=test_pipeline),
49
+ test=dict(
50
+ type=dataset_type,
51
+ data_root=data_root,
52
+ img_dir='images/validation',
53
+ ann_dir='annotations/validation',
54
+ pipeline=test_pipeline))
EgoHOS/raw/script/mmsegmentation/configs/_base_/datasets/chase_db1.py ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # dataset settings
2
+ dataset_type = 'ChaseDB1Dataset'
3
+ data_root = 'data/CHASE_DB1'
4
+ img_norm_cfg = dict(
5
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
6
+ img_scale = (960, 999)
7
+ crop_size = (128, 128)
8
+ train_pipeline = [
9
+ dict(type='LoadImageFromFile'),
10
+ dict(type='LoadAnnotations'),
11
+ dict(type='Resize', img_scale=img_scale, ratio_range=(0.5, 2.0)),
12
+ dict(type='RandomCrop', crop_size=crop_size, cat_max_ratio=0.75),
13
+ dict(type='RandomFlip', prob=0.5),
14
+ dict(type='PhotoMetricDistortion'),
15
+ dict(type='Normalize', **img_norm_cfg),
16
+ dict(type='Pad', size=crop_size, pad_val=0, seg_pad_val=255),
17
+ dict(type='DefaultFormatBundle'),
18
+ dict(type='Collect', keys=['img', 'gt_semantic_seg'])
19
+ ]
20
+ test_pipeline = [
21
+ dict(type='LoadImageFromFile'),
22
+ dict(
23
+ type='MultiScaleFlipAug',
24
+ img_scale=img_scale,
25
+ # img_ratios=[0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0],
26
+ flip=False,
27
+ transforms=[
28
+ dict(type='Resize', keep_ratio=True),
29
+ dict(type='RandomFlip'),
30
+ dict(type='Normalize', **img_norm_cfg),
31
+ dict(type='ImageToTensor', keys=['img']),
32
+ dict(type='Collect', keys=['img'])
33
+ ])
34
+ ]
35
+
36
+ data = dict(
37
+ samples_per_gpu=4,
38
+ workers_per_gpu=4,
39
+ train=dict(
40
+ type='RepeatDataset',
41
+ times=40000,
42
+ dataset=dict(
43
+ type=dataset_type,
44
+ data_root=data_root,
45
+ img_dir='images/training',
46
+ ann_dir='annotations/training',
47
+ pipeline=train_pipeline)),
48
+ val=dict(
49
+ type=dataset_type,
50
+ data_root=data_root,
51
+ img_dir='images/validation',
52
+ ann_dir='annotations/validation',
53
+ pipeline=test_pipeline),
54
+ test=dict(
55
+ type=dataset_type,
56
+ data_root=data_root,
57
+ img_dir='images/validation',
58
+ ann_dir='annotations/validation',
59
+ pipeline=test_pipeline))
EgoHOS/raw/script/mmsegmentation/configs/_base_/datasets/cityscapes.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # dataset settings
2
+ dataset_type = 'CityscapesDataset'
3
+ data_root = 'data/cityscapes/'
4
+ img_norm_cfg = dict(
5
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
6
+ crop_size = (512, 1024)
7
+ train_pipeline = [
8
+ dict(type='LoadImageFromFile'),
9
+ dict(type='LoadAnnotations'),
10
+ dict(type='Resize', img_scale=(2048, 1024), ratio_range=(0.5, 2.0)),
11
+ dict(type='RandomCrop', crop_size=crop_size, cat_max_ratio=0.75),
12
+ dict(type='RandomFlip', prob=0.5),
13
+ dict(type='PhotoMetricDistortion'),
14
+ dict(type='Normalize', **img_norm_cfg),
15
+ dict(type='Pad', size=crop_size, pad_val=0, seg_pad_val=255),
16
+ dict(type='DefaultFormatBundle'),
17
+ dict(type='Collect', keys=['img', 'gt_semantic_seg']),
18
+ ]
19
+ test_pipeline = [
20
+ dict(type='LoadImageFromFile'),
21
+ dict(
22
+ type='MultiScaleFlipAug',
23
+ img_scale=(2048, 1024),
24
+ # img_ratios=[0.5, 0.75, 1.0, 1.25, 1.5, 1.75],
25
+ flip=False,
26
+ transforms=[
27
+ dict(type='Resize', keep_ratio=True),
28
+ dict(type='RandomFlip'),
29
+ dict(type='Normalize', **img_norm_cfg),
30
+ dict(type='ImageToTensor', keys=['img']),
31
+ dict(type='Collect', keys=['img']),
32
+ ])
33
+ ]
34
+ data = dict(
35
+ samples_per_gpu=2,
36
+ workers_per_gpu=2,
37
+ train=dict(
38
+ type=dataset_type,
39
+ data_root=data_root,
40
+ img_dir='leftImg8bit/train',
41
+ ann_dir='gtFine/train',
42
+ pipeline=train_pipeline),
43
+ val=dict(
44
+ type=dataset_type,
45
+ data_root=data_root,
46
+ img_dir='leftImg8bit/val',
47
+ ann_dir='gtFine/val',
48
+ pipeline=test_pipeline),
49
+ test=dict(
50
+ type=dataset_type,
51
+ data_root=data_root,
52
+ img_dir='leftImg8bit/val',
53
+ ann_dir='gtFine/val',
54
+ pipeline=test_pipeline))
EgoHOS/raw/script/mmsegmentation/configs/_base_/datasets/cityscapes_1024x1024.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = './cityscapes.py'
2
+ img_norm_cfg = dict(
3
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
4
+ crop_size = (1024, 1024)
5
+ train_pipeline = [
6
+ dict(type='LoadImageFromFile'),
7
+ dict(type='LoadAnnotations'),
8
+ dict(type='Resize', img_scale=(2048, 1024), ratio_range=(0.5, 2.0)),
9
+ dict(type='RandomCrop', crop_size=crop_size, cat_max_ratio=0.75),
10
+ dict(type='RandomFlip', prob=0.5),
11
+ dict(type='PhotoMetricDistortion'),
12
+ dict(type='Normalize', **img_norm_cfg),
13
+ dict(type='Pad', size=crop_size, pad_val=0, seg_pad_val=255),
14
+ dict(type='DefaultFormatBundle'),
15
+ dict(type='Collect', keys=['img', 'gt_semantic_seg']),
16
+ ]
17
+ test_pipeline = [
18
+ dict(type='LoadImageFromFile'),
19
+ dict(
20
+ type='MultiScaleFlipAug',
21
+ img_scale=(2048, 1024),
22
+ # img_ratios=[0.5, 0.75, 1.0, 1.25, 1.5, 1.75],
23
+ flip=False,
24
+ transforms=[
25
+ dict(type='Resize', keep_ratio=True),
26
+ dict(type='RandomFlip'),
27
+ dict(type='Normalize', **img_norm_cfg),
28
+ dict(type='ImageToTensor', keys=['img']),
29
+ dict(type='Collect', keys=['img']),
30
+ ])
31
+ ]
32
+ data = dict(
33
+ train=dict(pipeline=train_pipeline),
34
+ val=dict(pipeline=test_pipeline),
35
+ test=dict(pipeline=test_pipeline))
EgoHOS/raw/script/mmsegmentation/configs/_base_/datasets/cityscapes_768x768.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _base_ = './cityscapes.py'
2
+ img_norm_cfg = dict(
3
+ mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
4
+ crop_size = (768, 768)
5
+ train_pipeline = [
6
+ dict(type='LoadImageFromFile'),
7
+ dict(type='LoadAnnotations'),
8
+ dict(type='Resize', img_scale=(2049, 1025), ratio_range=(0.5, 2.0)),
9
+ dict(type='RandomCrop', crop_size=crop_size, cat_max_ratio=0.75),
10
+ dict(type='RandomFlip', prob=0.5),
11
+ dict(type='PhotoMetricDistortion'),
12
+ dict(type='Normalize', **img_norm_cfg),
13
+ dict(type='Pad', size=crop_size, pad_val=0, seg_pad_val=255),
14
+ dict(type='DefaultFormatBundle'),
15
+ dict(type='Collect', keys=['img', 'gt_semantic_seg']),
16
+ ]
17
+ test_pipeline = [
18
+ dict(type='LoadImageFromFile'),
19
+ dict(
20
+ type='MultiScaleFlipAug',
21
+ img_scale=(2049, 1025),
22
+ # img_ratios=[0.5, 0.75, 1.0, 1.25, 1.5, 1.75],
23
+ flip=False,
24
+ transforms=[
25
+ dict(type='Resize', keep_ratio=True),
26
+ dict(type='RandomFlip'),
27
+ dict(type='Normalize', **img_norm_cfg),
28
+ dict(type='ImageToTensor', keys=['img']),
29
+ dict(type='Collect', keys=['img']),
30
+ ])
31
+ ]
32
+ data = dict(
33
+ train=dict(pipeline=train_pipeline),
34
+ val=dict(pipeline=test_pipeline),
35
+ test=dict(pipeline=test_pipeline))