├── .gitignore ├── LICENSE ├── README.md ├── clean.py ├── figure └── keypoint.jpg ├── keypoint_test.txt ├── keypoint_train.txt └── split.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py 4 | *.py[cod] 5 | *$py.class 6 | 7 | # C extensions 8 | *.so 9 | 10 | # Distribution / packaging 11 | .Python 12 | env/ 13 | build/ 14 | develop-eggs/ 15 | dist/ 16 | downloads/ 17 | eggs/ 18 | .eggs/ 19 | lib/ 20 | lib64/ 21 | parts/ 22 | sdist/ 23 | var/ 24 | wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .coverage 43 | .coverage.* 44 | .cache 45 | nosetests.xml 46 | coverage.xml 47 | *.cover 48 | .hypothesis/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | 58 | # Flask stuff: 59 | instance/ 60 | .webassets-cache 61 | 62 | # Scrapy stuff: 63 | .scrapy 64 | 65 | # Sphinx documentation 66 | docs/_build/ 67 | 68 | # PyBuilder 69 | target/ 70 | 71 | # Jupyter Notebook 72 | .ipynb_checkpoints 73 | 74 | # pyenv 75 | .python-version 76 | 77 | # celery beat schedule file 78 | celerybeat-schedule 79 | 80 | # SageMath parsed files 81 | *.sage.py 82 | 83 | # dotenv 84 | .env 85 | 86 | # virtualenv 87 | .venv 88 | venv/ 89 | ENV/ 90 | 91 | # Spyder project settings 92 | .spyderproject 93 | .spyproject 94 | 95 | # Rope project settings 96 | .ropeproject 97 | 98 | # mkdocs documentation 99 | /site 100 | 101 | # mypy 102 | .mypy_cache/ 103 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 ZhongdaoWang 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. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Key Point and Vehicle Orientation Annotation for VeRi-776 dataset 2 | ==================================================================== 3 | ### Introduction 4 | [VeRi-776](https://github.com/VehicleReId/VeRidataset) is a large-scale benchmark dateset for vehicle Re-Id in the real-world urban surveillance scenario. 5 | It contains over 50,000 images of 776 vehicles captured by 20 cameras covering an 1.0 km^2 area in 24 hours, which makes the dataset scalable enough for vehicle Re-Id and other related research. 6 | 7 | This repo has annotations of **key point location** and **vehicle orientation** for VeRi-776 dataset, which is used in our 8 | *ICCV'17* paper [Orientation Invariant Feature Embedding and Spatial Temporal Regularization for Vehicle Re-identification](http://openaccess.thecvf.com/content_ICCV_2017/papers/Wang_Orientation_Invariant_Feature_ICCV_2017_paper.pdf). 9 | 10 | 11 | ### Get VeRi-776 dataset 12 | Please refer to [this repo](https://github.com/VehicleReId/VeRidataset). 13 | 14 | ### Key points' definition 15 | We defined 20 key points in a vehicle, which we think are the most discriminative locations or some main vehicle components, 16 | for instance, wheels, lamps, auto logo and so on. You can find our definition of the 20 key points in the figure and the table bellow. 17 | 18 | ![definetion](figure/keypoint.jpg) 19 | 20 | 21 | |index |location |index |location | 22 | |:---:|:------:|:---:|:------:| 23 | |1 |left-front wheel |11 |left rear-view mirror | 24 | |2 |left-back wheel |12 |right rear-view mirror | 25 | |3 |right-front whee l|13 |right-front corner of vehicle top | 26 | |4 |right-back wheel |14 |left-front corner of vehicle top | 27 | |5 |right fog lamp |15 |left-back corner of vehicle top | 28 | |6 |left fog lamp |16 |right-back corner of vehicle top | 29 | |7 |right headlight |17 |left rear lamp | 30 | |8 |left headlight |18 |right rear lamp | 31 | |9 |front auto logo |19 |rear auto logo | 32 | |10 |front license plate |20 |rear license plate | 33 | 34 | ### Orientation's definition 35 | 36 | We classify the orientation of a vehicle into 8 categories, according to which face(s) of the vehicle is visible in this view : 37 | 38 | 0|front 39 | :---:|:---: 40 | 1|rear 41 | 2|left 42 | 3|left front 43 | 4|left rear 44 | 5|right 45 | 6|right front 46 | 7|right rear 47 | 48 | ### Annotation file format 49 | 50 | In each line in the annotation file, the format is: 51 | ```Shell 52 | img_path x1 y1 x2 y2 ... x20 y20 orien 53 | ``` 54 | ```(x_i,y_i)``` is the location of the *i*th key point of a vehicle, and ```orien``` is the orientation label. 55 | 56 | 57 | ### Citation 58 | 59 | If you find this repo useful in your research, please consider to cite: 60 | 61 | @InProceedings{Wang_2017_ICCV, 62 | author = {Wang, Zhongdao and Tang, Luming and Liu, Xihui and Yao, Zhuliang and Yi, Shuai and Shao, Jing and Yan, Junjie and Wang, Shengjin and Li, Hongsheng and Wang, Xiaogang}, 63 | title = {Orientation Invariant Feature Embedding and Spatial Temporal Regularization for Vehicle Re-Identification}, 64 | booktitle = {The IEEE International Conference on Computer Vision (ICCV)}, 65 | month = {Oct}, 66 | year = {2017} 67 | } 68 | 69 | ### Contact 70 | Please concact Zhongdao Wang (wcd17@mails.tsinghua.edu.cn) if you have questions about the annotations. -------------------------------------------------------------------------------- /clean.py: -------------------------------------------------------------------------------- 1 | text_out = [] 2 | 3 | with open('landmark_test.txt') as f1: 4 | for line in f1: 5 | line_list = line.split(' ') 6 | l = [line_list[0]] 7 | text_out.append(l+line_list[6:]) 8 | with open('keypoint_test.txt','w') as f: 9 | for i in text_out: 10 | s = i[0] 11 | for p in i[1:]: 12 | s += ' ' 13 | s += p 14 | f.write(s) -------------------------------------------------------------------------------- /figure/keypoint.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Zhongdao/VehicleReIDKeyPointData/15ca456f43311b96c35953a1563c124a73e60365/figure/keypoint.jpg -------------------------------------------------------------------------------- /split.py: -------------------------------------------------------------------------------- 1 | text_train = [] 2 | text_test = [] 3 | 4 | with open('finaltest.txt') as f1: 5 | for line in f1: 6 | if 'train' in line: 7 | text_train.append(line) 8 | elif 'test' in line: 9 | text_test.append(line) 10 | 11 | with open('finaltrain.txt') as f2: 12 | for line in f2: 13 | if 'train' in line: 14 | text_train.append(line) 15 | elif 'test' in line: 16 | text_test.append(line) 17 | 18 | with open('landmark_train.txt','w') as f: 19 | for i in text_train: 20 | f.write(i) 21 | with open('landmark_test.txt','w') as f: 22 | for i in text_test: 23 | f.write(i) --------------------------------------------------------------------------------