install_trained_data.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import argparse
00004 from distutils.version import LooseVersion
00005 import multiprocessing
00006 import os.path as osp
00007 import sys
00008 
00009 try:
00010     import chainer
00011 except:
00012     print('### Failed to import chainer')
00013 
00014 import jsk_data
00015 
00016 
00017 def download_data(*args, **kwargs):
00018     p = multiprocessing.Process(
00019             target=jsk_data.download_data,
00020             args=args,
00021             kwargs=kwargs)
00022     p.start()
00023 
00024 
00025 def main():
00026     parser = argparse.ArgumentParser()
00027     parser.add_argument('-v', '--verbose', dest='quiet', action='store_false')
00028     args = parser.parse_args()
00029     quiet = args.quiet
00030 
00031     PKG = 'jsk_perception'
00032 
00033     download_data(
00034         pkg_name=PKG,
00035         path='trained_data/drill_svm.xml',
00036         url='https://drive.google.com/uc?id=0B5hRAGKTOm_KWW11R0FTX0xjTDg',
00037         md5='762d0da4bcbf50e0e92939372988901a',
00038         quiet=quiet,
00039     )
00040 
00041     download_data(
00042         pkg_name=PKG,
00043         path='trained_data/apc2015_sample_bof.pkl.gz',
00044         url='https://drive.google.com/uc?id=0B9P1L--7Wd2vemVRaDBOWDVpb28',
00045         md5='97eb737f71a33bfc23ec573f1d351bd8',
00046         quiet=quiet,
00047     )
00048     download_data(
00049         pkg_name=PKG,
00050         path='trained_data/apc2015_sample_clf.pkl.gz',
00051         url='https://drive.google.com/uc?id=0B9P1L--7Wd2veFY5ZFNqbzAzNmc',
00052         md5='25e396358e9d7bfd1bd08334953fc287',
00053         quiet=quiet,
00054     )
00055 
00056     files = [
00057         ('ObjNessB2W8HSV.idx.yml.gz', 'e066c100d60246a3911d4559182d9d2a'),
00058         ('ObjNessB2W8HSV.wS1.yml.gz', '728507d99521d7dba9b0eb114ccbb830'),
00059         ('ObjNessB2W8HSV.wS2.yml.gz', '790e27251267d86168a12f2bd2d96f8d'),
00060         ('ObjNessB2W8I.idx.yml.gz', '9425dd4d31521fced82aeb6fc56ce4d5'),
00061         ('ObjNessB2W8I.wS1.yml.gz', 'a04d4b4504887fc16800b8b42bac9e70'),
00062         ('ObjNessB2W8I.wS2.yml.gz', 'f2e2f5726e352bfa16224066e2bdc7ad'),
00063         ('ObjNessB2W8MAXBGR.idx.yml.gz', 'ef2fbd5da0ffb5fe4332685b8529dc5c'),
00064         ('ObjNessB2W8MAXBGR.wS1.yml.gz', 'cbe8147fca9a5885b7bb25d38fa5f4d1'),
00065         ('ObjNessB2W8MAXBGR.wS2.yml.gz', '02b76364df35cef862da041585b537de'),
00066     ]
00067     dirname = 'https://github.com/Itseez/opencv_contrib/raw/3.1.0/modules/saliency/samples/ObjectnessTrainedModel'  # NOQA
00068     for fname, md5 in files:
00069         download_data(
00070             pkg_name=PKG,
00071             path=osp.join('trained_data/ObjectnessTrainedModel/', fname),
00072             url=osp.join(dirname, fname),
00073             md5=md5,
00074             quiet=quiet,
00075         )
00076 
00077     # node_scripts/fast_rcnn.py
00078     download_data(
00079         pkg_name=PKG,
00080         path='trained_data/vgg16_fast_rcnn.chainermodel',
00081         url='https://drive.google.com/uc?id=0B9P1L--7Wd2vX015UzB4aC13cVk',
00082         md5='5ae12288962e96124cce212fd3f18cad',
00083         quiet=quiet,
00084     )
00085     download_data(
00086         pkg_name=PKG,
00087         path='trained_data/vgg_cnn_m_1024.chainermodel',
00088         url='https://drive.google.com/uc?id=0B9P1L--7Wd2vZzJuaFRIdDMtLWc',
00089         md5='eb33103e36f299b4433c63fcfc165cbd',
00090         quiet=quiet,
00091     )
00092     download_data(
00093         pkg_name=PKG,
00094         path='trained_data/vgg16_bn_apc2015_496000.chainermodel',
00095         url='https://drive.google.com/uc?id=0B9P1L--7Wd2vQ2tCN1hoYV84eHM',
00096         md5='4a48c2f39234e46937759f4cc43bb257',
00097         quiet=quiet,
00098     )
00099 
00100     # node_scripts/fcn_object_segmentation.py
00101     # ref: https://github.com/wkentaro/fcn#training
00102     download_data(
00103         pkg_name=PKG,
00104         path='trained_data/fcn8s_voc.npz',
00105         url = 'https://drive.google.com/uc?id=0B9P1L--7Wd2vWG5MeUEwWmxudU0',
00106         md5 = '75128c0e175767fc82a7d4f1e21f4009',
00107     )
00108 
00109     # node_scripts/vgg16_object_recognition.py
00110     download_data(
00111         pkg_name=PKG,
00112         path='trained_data/bvlc_vgg16.chainermodel',
00113         url='https://drive.google.com/uc?id=0B9P1L--7Wd2vSlFjQlJFQjM5TEk',
00114         md5='292e6472062392f5de02ef431bba4a48',
00115     )
00116 
00117     # node_scripts/alexnet_object_recognition.py
00118     download_data(
00119         pkg_name=PKG,
00120         path='trained_data/bvlc_alexnet.chainermodel',
00121         url='https://drive.google.com/uc?id=0B5DV6gwLHtyJZkd1ZTRiNUdrUXM',
00122         md5='2175620a2237bbd33e35bf38867d84b2',
00123     )
00124 
00125     # node_scripts/people_pose_estimation_2d.py
00126     path = 'trained_data/pose_estimation_2d_chainermodel.pkl'
00127     if not 'chainer' in sys.modules or LooseVersion(chainer.__version__) >= LooseVersion('2.0.0'):
00128         # created on chainer v2.0.0
00129         download_data(
00130             pkg_name=PKG,
00131             path=path,
00132             url='https://drive.google.com/uc?id=0B_NiLAzvehC9R2stRmQyM3ZiVjQ',
00133             md5='587933c2c0adf335ebed0486c183541f',
00134         )
00135     else:
00136         # created on chainer v1.24.0
00137         download_data(
00138             pkg_name=PKG,
00139             path=path,
00140             url='https://drive.google.com/uc?id=0B4ysRIwB7GryNnhidGN3VVJkNVE',
00141             md5='4d41e1ac80185849384a67a329746115',
00142         )
00143 
00144     # node_scripts/feature_based_object_recognition.py
00145     download_data(
00146         pkg_name=PKG,
00147         path='trained_data/resnet_lsvrc2012_mean.npy',
00148         url='https://drive.google.com/uc?id=0B9P1L--7Wd2vTDV3ZzUyTlBFZE0',
00149         md5='00431426c4fab22985885da0e2ff31b8',
00150     )
00151     download_data(
00152         pkg_name=PKG,
00153         path='trained_data/resnet152_from_caffe.npz',
00154         url='https://drive.google.com/uc?id=0B9P1L--7Wd2vQVBodlFsMnpGbkU',
00155         md5='77fe66a229a2444688a21e3b63fa0661',
00156     )
00157 
00158 
00159 if __name__ == '__main__':
00160     main()


jsk_perception
Author(s): Manabu Saito, Ryohei Ueda
autogenerated on Sun Oct 8 2017 02:43:23