Skip to content

jutanke/pak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pak

milk Personal computer vision/deep learning dataset helper toolbox to make it less tedious to download and load common datasets. This software is not affiliated with any of the datasets but is instead just a thin helper box to ease interacting with the data. Please respect the respective dataset author's licenses!

Install

Install the library using pip:

pip install git+https://github.com/jutanke/pak.git

Requirements

  • python >=3.5
  • numpy
  • scipy
  • skimage
  • h5py
  • pppr (for evaluation)

Install pppr

pip install git+https://github.com/justayak/pppr.git

spacepy

Some datasets require to read the CDF file format from NASA. Install as follows (taken from stackoverflow).

wget -r -l1 -np -nd -nc http://cdaweb.gsfc.nasa.gov/pub/software/cdf/dist/latest-release/linux/ -A cdf*-dist-all.tar.gz
tar xf cdf*-dist-all.tar.gz -C ./
cd cdf*dist
apt install build-essential gfortran libncurses5-dev
make OS=linux ENV=gnu CURSES=yes FORTRAN=no UCOPTIONS=-O2 SHARED=yes -j4 all
make install #no sudo

Add to .bashrc:

export CDF_BASE=$HOME/Libraries/cdf/cdf36_3-dist
export CDF_INC=$CDF_BASE/include
export CDF_LIB=$CDF_BASE/lib
export CDF_BIN=$CDF_BASE/bin
export LD_LIBRARY_PATH=$CDF_BASE/lib:$LD_LIBRARY_PATH

Install spacepy

pip install git+https://github.com/spacepy/spacepy.git

transforms3d

Some datasets require transforms3d:

pip install transforms3d

This library offers some of the common evaluation strategies

Datasets

MOT16

Dataset[1] with 14 video sequences (7 train, 7 test) in unconstrained environments with both static and moving cameras. Tracking + evaluation is done in image coordinates. Sample code

from pak.datasets.MOT import MOT16
mot16 = MOT16('/place/to/store/the/data')
# if the library cannot find the data in the given directory it
# will download it and place it there..

# Some videos might be too large to fit into your memory so you
# can load them into a memory-mapped file for easier handling
X, Y_det, Y_gt  = mot16.get_train("MOT16-02", memmapped=True)
X, Y_det        = mot16.get_test("MOT16-01", memmapped=True)

mot16

License

Creative Commons Attribution-NonCommercial-ShareAlike 3.0. This means that you must attribute the work in the manner specified by the authors, you may not use this work for commercial purposes and if you alter, transform, or build upon this work, you may distribute the resulting work only under the same license. If you are interested in commercial usage you can contact us for further options.

2DMOT2015

Dataset[2] with video sequences in unconstrained environments using static and moving cameras. Sample code

from pak.datasets.MOT import MOT152D
mot15 = MOT152D('/place/to/store/the/data')
# if the library cannot find the data in the given directory it
# will download it and place it there..

X, Y_det, Y_gt  = mot15.get_train("ADL-Rundle-6")
X, Y_det        = mot15.get_test("ADL-Rundle-1")

mot15

License

Creative Commons Attribution-NonCommercial-ShareAlike 3.0. This means that you must attribute the work in the manner specified by the authors, you may not use this work for commercial purposes and if you alter, transform, or build upon this work, you may distribute the resulting work only under the same license. If you are interested in commercial usage you can contact us for further options.

Market-1501

[3]Person re-identitification dataset collected in front of a supermarket from six different cameras. The dataset contains 1501 different identities that are captured by at least two cameras. Sample code

from pak.datasets.Market1501 import Market1501 

mot15 = Market1501('/place/to/store/the/data')
# if the library cannot find the data in the given directory it
# will download it and place it there..

X, Y = m1501.get_train()

market1501

CUHK03

Dataset[4] with cropped images of persons from different angles and cameras. The dataset uses human annotated as well as automatically annotated pictures. The authors require users to explicitly download the data from their website so it is not possible to automatically download it. Sample code

from pak.datasets.CUHK03 import cuhk03

# the images do not have the same size and have to be resized
w, h = 60, 160
cuhk03 = cuhk03('/place/where/the/downloaded/zip/is/stored', target_w=w, target_h=h)

X, Y = cuhk03.get_labeled()
# X, Y = cuhk03.get_detected()

Licence

This dataset is ONLY released for academic use. Please do not further distribute the dataset (including the download link), or put any of the images on the public website, due to the university regulations and privacy policy in Hong Kong law. Please kindly cite our paper if you use our data in your research. Thanks and hope you will benefit from our dataset.

Leeds Sports Pose Extended Training Dataset

[5]Dataset

Sample code

from pak.datasets.LSPE import LSPE

lspe = LSPE('/place/to/store/the/data')
# if the library cannot find the data in the given directory it
# will download it and place it there..

X, Y = lspe.get_raw()

pak_lspe

DukeMTMC-reID

[6]Dataset that is similar to market-1501. However, the images are not cropped to have the same size!

Sample code

from pak.datasets.DukeMTMC import DukeMTMC_reID

duke = DukeMTMC_reID('/place/to/store/the/data')
# please download the dataset from the given url and put the zip file into the path

X, Y = duke.get_test()

duke

License

ATTRIBUTION PROTOCOL

If you use the DukeMTMC-reID data or any data derived from it, please cite the original work as follows:

@article{zheng2017unlabeled,
  title={Unlabeled Samples Generated by GAN Improve the Person Re-identification Baseline in vitro},
  author={Zheng, Zhedong and Zheng, Liang and Yang, Yi},
  journal={arXiv preprint arXiv:1701.07717},
  year={2017}
}

and include this license and attribution protocol within any derivative work.

If you use the DukeMTMC data or any data derived from it, please cite the original work as follows:

@inproceedings{ristani2016MTMC,
  title =        {Performance Measures and a Data Set for Multi-Target, Multi-Camera Tracking},
  author =       {Ristani, Ergys and Solera, Francesco and Zou, Roger and Cucchiara, Rita and Tomasi, Carlo},
  booktitle =    {European Conference on Computer Vision workshop on Benchmarking Multi-Target Tracking},
  year =         {2016}
}

and include this license and attribution protocol within any derivative work.

The DukeMTMC-reID dataset is derived from DukeMTMC dataset (http://vision.cs.duke.edu/DukeMTMC/).

The DukeMTMC-reID dataset is made available under the Open Data Commons Attribution License (https://opendatacommons.org/licenses/by/1.0/) and for academic use only.

READABLE SUMMARY OF Open Data Commons Attribution License

You are free:

To Share: To copy, distribute and use the database.
To Create: To produce works from the database.
To Adapt: To modify, transform and build upon the database.

As long as you:

Attribute: You must attribute any public use of the database, or works produced from the database, in the manner specified in the license. For any use or redistribution of the database, or works produced from it, you must make clear to others the license of the database and keep intact any notices on the original database.

Hand Dataset

[7]Collection of hand images from various public images. Sample code

from pak.datasets.Hands import Hand
hand = Hand('/place/to/store/the/data')
# if the library cannot find the data in the given directory it
# will download it and place it there..

X_test, Y_test = hand.get_test()
X_train, Y_train = hand.get_train()
X_val, Y_val = hand.get_val()

hand_dataset

EgoHands Dataset

[8]Dataset containing 48 Google Glass videos of interactions between two people. Sample code

from pak.datasets.EgoHands import EgoHands

egohand = EgoHands(root)
# if the library cannot find the data in the given directory it
# will download it and place it there..

# the image data occupies ~15GB of RAM so if your computer
# cannot handle such big data you should set memmapped=True
X, Y = egohand.get_raw(memmapped=True)

egohands

MARCOnI

MARker-less Motion Capture in Outdoor and Indoor Scenes[9] is a test data set for marker-less motcap methods. Sample code

from pak.datasets.MARCOnI import MARCOnI

marconi = MARCOnI(root)
# if the library cannot find the data in the given directory it
# will download it and place it there..

X, CNN, Annotations = marconi['Soccer']

marconi_img

UMPM

Utrecht Multi-Person Motion Benchmark[10]

from pak.datasets.UMPM import UMPM

root = '/dir/with/data'
user = 'username@requested@umpm'
pwd = 'a_password'

mpm = UMPM(root, user, pwd)

X, Y, Calib = mpm.get_data('p1_grab_3')

umpm

External Code

To parse some of the datasets, external code written by other people is used.

CMU MoCap dataset:

Parsing .asf and .amc written by Yuxiao Zhou (https://github.com/CalciferZh/AMCParser)

References

[0] Milk-Icon: Icon made by Smashicons from www.flaticon.com

[1] Milan, Anton, et al. "MOT16: A benchmark for multi-object tracking." arXiv preprint arXiv:1603.00831 (2016)

[2] Leal-Taixé, Laura, et al. "Motchallenge 2015: Towards a benchmark for multi-target tracking." arXiv preprint arXiv:1504.01942 (2015).

[3] Zheng, Liang, et al. "Scalable person re-identification: A benchmark." Proceedings of the IEEE International Conference on Computer Vision. 2015.

[4] Li, Wei, et al. "Deepreid: Deep filter pairing neural network for person re-identification." Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2014.

[5] Johnson, Sam, and Mark Everingham. "Learning effective human pose estimation from inaccurate annotation." Computer Vision and Pattern Recognition (CVPR), 2011 IEEE Conference on. IEEE, 2011.

[6] Ristani, Ergys, et al. "Performance measures and a data set for multi-target, multi-camera tracking." European Conference on Computer Vision. Springer International Publishing, 2016.

[7] Mittal, Arpit, Andrew Zisserman, and Philip HS Torr. "Hand detection using multiple proposals." BMVC. 2011.

[8] Bambach, Sven, et al. "Lending a hand: Detecting hands and recognizing activities in complex egocentric interactions." Proceedings of the IEEE International Conference on Computer Vision. 2015.

[9] Elhayek, Ahmed, et al. "Efficient ConvNet-based marker-less motion capture in general scenes with a low number of cameras." Computer Vision and Pattern Recognition (CVPR), 2015 IEEE Conference on. IEEE, 2015.

[10] Van der Aa, N. P., et al. "Umpm benchmark: A multi-person dataset with synchronized video and motion capture data for evaluation of articulated human motion and interaction." Computer Vision Workshops (ICCV Workshops), 2011 IEEE International Conference on. IEEE, 2011.

About

computer vision/deep learning data set helper toolbox

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages