├── .idea ├── dictionaries │ └── jai.xml └── vcs.xml ├── ConAE_MSE_Loss.png ├── ConvAE_Regeneration_Results_1.png ├── ConvAE_Regeneration_Results_2.png ├── ConvAE_Stage1_output.txt ├── ConvAE_Stage1_process_node_name.txt ├── README.md ├── Stage2_graph_results.png ├── Stage2_results_1.txt ├── Test_Regeneration_Results.png ├── core ├── test_bi_lstm.py ├── test_lstm.py ├── train_auto_enocder_1.py ├── train_bi_lstm.py ├── train_lstm.py └── train_vae.py ├── data └── videos │ ├── bg_train_data │ ├── 14 │ │ ├── 014_005_003.mp4 │ │ ├── 014_006_003.mp4 │ │ ├── 014_008_002.mp4 │ │ ├── 014_009_002.mp4 │ │ └── 014_010_002.mp4 │ └── 15 │ │ ├── 015_001_001.mp4 │ │ ├── 015_001_002.mp4 │ │ ├── 015_001_003.mp4 │ │ ├── 015_002_001.mp4 │ │ └── 015_002_002.mp4 │ ├── testing_data │ ├── 001_001_004.mp4 │ ├── 001_003_004.mp4 │ ├── 001_004_005.mp4 │ ├── 001_005_005.mp4 │ ├── 001_006_004.mp4 │ ├── 001_007_005.mp4 │ ├── 001_009_004.mp4 │ ├── 001_010_004.mp4 │ ├── 002_001_004.mp4 │ ├── 002_004_005.mp4 │ ├── 002_006_004.mp4 │ ├── 002_007_004.mp4 │ ├── 002_007_005.mp4 │ ├── 002_009_004.mp4 │ ├── 002_010_004.mp4 │ ├── 002_010_005.mp4 │ ├── 003_001_004.mp4 │ ├── 003_003_004.mp4 │ ├── 003_004_005.mp4 │ ├── 003_005_005.mp4 │ ├── 003_006_004.mp4 │ ├── 003_007_005.mp4 │ ├── 003_009_004.mp4 │ ├── 003_010_004.mp4 │ ├── 004_001_004.mp4 │ ├── 004_004_005.mp4 │ ├── 004_006_004.mp4 │ ├── 004_007_004.mp4 │ ├── 004_007_005.mp4 │ ├── 004_009_004.mp4 │ ├── 004_010_004.mp4 │ ├── 004_010_005.mp4 │ ├── 005_001_004.mp4 │ ├── 005_003_004.mp4 │ ├── 005_004_005.mp4 │ ├── 005_005_005.mp4 │ ├── 005_006_004.mp4 │ ├── 005_007_005.mp4 │ ├── 005_009_004.mp4 │ ├── 005_010_004.mp4 │ ├── 006_001_004.mp4 │ ├── 006_001_005.mp4 │ ├── 006_004_005.mp4 │ ├── 006_006_004.mp4 │ ├── 006_007_004.mp4 │ ├── 006_007_005.mp4 │ ├── 006_009_004.mp4 │ ├── 006_010_004.mp4 │ ├── 006_010_005.mp4 │ ├── 007_001_004.mp4 │ ├── 007_003_004.mp4 │ ├── 007_004_005.mp4 │ ├── 007_006_004.mp4 │ ├── 007_007_005.mp4 │ ├── 007_009_004.mp4 │ ├── 007_010_004.mp4 │ ├── 008_001_004.mp4 │ ├── 008_001_005.mp4 │ ├── 008_006_004.mp4 │ ├── 008_007_005.mp4 │ ├── 008_009_004.mp4 │ ├── 008_010_004.mp4 │ ├── 009_001_004.mp4 │ ├── 009_003_004.mp4 │ ├── 009_006_004.mp4 │ ├── 009_007_005.mp4 │ ├── 009_009_004.mp4 │ ├── 009_010_004.mp4 │ ├── 010_001_004.mp4 │ ├── 010_002_005.mp4 │ ├── 010_004_004.mp4 │ ├── 010_005_005.mp4 │ ├── 010_007_004.mp4 │ ├── 010_008_005.mp4 │ ├── 010_010_004.mp4 │ ├── 011_001_004.mp4 │ ├── 011_002_004.mp4 │ ├── 011_002_005.mp4 │ ├── 011_004_004.mp4 │ ├── 011_005_005.mp4 │ ├── 011_007_004.mp4 │ ├── 011_010_004.mp4 │ ├── 012_001_004.mp4 │ ├── 012_002_005.mp4 │ ├── 012_004_004.mp4 │ ├── 012_005_005.mp4 │ ├── 012_006_004.mp4 │ ├── 012_007_004.mp4 │ ├── 012_008_005.mp4 │ ├── 012_010_004.mp4 │ ├── 013_001_004.mp4 │ ├── 013_002_004.mp4 │ ├── 013_002_005.mp4 │ ├── 013_004_004.mp4 │ ├── 013_004_005.mp4 │ ├── 013_005_005.mp4 │ ├── 013_007_004.mp4 │ ├── 013_010_004.mp4 │ ├── 014_001_004.mp4 │ ├── 014_002_005.mp4 │ ├── 014_004_004.mp4 │ ├── 014_005_005.mp4 │ ├── 014_006_004.mp4 │ ├── 014_007_004.mp4 │ ├── 014_008_005.mp4 │ ├── 014_010_004.mp4 │ ├── 015_001_004.mp4 │ ├── 015_002_004.mp4 │ ├── 015_002_005.mp4 │ ├── 015_004_004.mp4 │ ├── 015_004_005.mp4 │ ├── 015_005_005.mp4 │ ├── 015_007_004.mp4 │ └── 015_010_004.mp4 │ └── training_data │ ├── 01 │ ├── 001_001_001.mp4 │ ├── 001_001_002.mp4 │ ├── 001_001_003.mp4 │ ├── 001_002_001.mp4 │ ├── 001_002_002.mp4 │ ├── 001_002_003.mp4 │ ├── 001_003_001.mp4 │ ├── 001_003_002.mp4 │ ├── 001_003_003.mp4 │ ├── 001_004_001.mp4 │ ├── 001_004_002.mp4 │ ├── 001_004_003.mp4 │ ├── 001_005_001.mp4 │ ├── 001_005_002.mp4 │ ├── 001_005_003.mp4 │ ├── 001_006_001.mp4 │ ├── 001_006_002.mp4 │ ├── 001_006_003.mp4 │ ├── 001_007_001.mp4 │ ├── 001_007_002.mp4 │ ├── 001_007_003.mp4 │ ├── 001_008_001.mp4 │ ├── 001_008_002.mp4 │ ├── 001_008_003.mp4 │ ├── 001_009_001.mp4 │ ├── 001_009_002.mp4 │ ├── 001_009_003.mp4 │ ├── 001_010_001.mp4 │ ├── 001_010_002.mp4 │ └── 001_010_003.mp4 │ └── 02 │ ├── 002_001_001.mp4 │ ├── 002_001_002.mp4 │ ├── 002_001_003.mp4 │ ├── 002_002_001.mp4 │ ├── 002_002_002.mp4 │ ├── 002_002_003.mp4 │ ├── 002_003_001.mp4 │ ├── 002_003_002.mp4 │ ├── 002_003_003.mp4 │ ├── 002_004_001.mp4 │ ├── 002_004_002.mp4 │ ├── 002_004_003.mp4 │ ├── 002_005_001.mp4 │ ├── 002_005_002.mp4 │ ├── 002_005_003.mp4 │ ├── 002_006_001.mp4 │ ├── 002_006_002.mp4 │ ├── 002_007_001.mp4 │ ├── 002_007_002.mp4 │ ├── 002_007_003.mp4 │ ├── 002_008_001.mp4 │ ├── 002_008_002.mp4 │ ├── 002_008_003.mp4 │ ├── 002_009_001.mp4 │ ├── 002_009_002.mp4 │ ├── 002_009_003.mp4 │ ├── 002_010_001.mp4 │ ├── 002_010_002.mp4 │ └── 002_010_003.mp4 ├── extra └── prepare_data.py ├── models ├── auto_enocder_1.py ├── bi_lstm.py ├── lstm.py └── vae.py ├── stage1_encoder_1_graphj.png └── utils ├── __pycache__ ├── constants.cpython-36.pyc ├── cv_utils.cpython-36.pyc ├── os_utils.cpython-36.pyc └── utility.cpython-36.pyc ├── constants.py ├── cv_utils.py ├── os_utils.py └── utility.py /.idea/dictionaries/jai.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | logits 5 | lstm 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ConAE_MSE_Loss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/ConAE_MSE_Loss.png -------------------------------------------------------------------------------- /ConvAE_Regeneration_Results_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/ConvAE_Regeneration_Results_1.png -------------------------------------------------------------------------------- /ConvAE_Regeneration_Results_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/ConvAE_Regeneration_Results_2.png -------------------------------------------------------------------------------- /ConvAE_Stage1_process_node_name.txt: -------------------------------------------------------------------------------- 1 | encoder/conv1/LeakyRelu/Maximum, 2 | encoder/LeakyRelu_3/Maximum, 3 | encoder/maxpool1/MaxPool, 4 | encoder/LeakyRelu_7/Maximum, 5 | encoder/maxpool2/MaxPool, 6 | encoder/LeakyRelu_11/Maximum, 7 | encoder/maxpool3/MaxPool, 8 | 9 | decoder/dense1/LeakyRelu/Maximum, 10 | decoder/c, 11 | decoder/conv4/LeakyRelu/Maximum, 12 | decoder/upsample1, 13 | decoder/conv5/LeakyRelu/Maximum, 14 | decoder/upsample2, 15 | decoder/conv6/LeakyRelu/Maximum, 16 | decoder/upsample3, 17 | decoder/conv7/LeakyRelu/Maximum, 18 | decoder/logits/BiasAdd, 19 | decoder/decoded 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DeepSign: A Deep Learning Architecture for Sign-Language-Recognition 2 | DeepSign is a new deep-learning architecture which achieves comparable results with limited training data for Sign Language Recognition. 3 | 4 | ## Paper Link 5 | https://rc.library.uta.edu/uta-ir/bitstream/handle/10106/27803/SHAH-THESIS-2018.pdf?sequence=1&isAllowed=y 6 | 7 | ## Medium Post 8 | https://medium.com/@jayshah_84248/deepsign-a-deep-learning-pipeline-for-sign-language-recognition-a51a8f116dfc 9 | 10 | ## core: 11 | 12 | - This is the folder where the training code is and the testing code is. 13 | - It has following files: 14 | 1. train_auto_encoder_1.py 15 | - This file consist the code which trains the auto-encoder. 16 | - This auto encoder is Model-1. 17 | 18 | 2. train_bi_lstm.py 19 | - This file consist the code which trains the bi-directional LSTM. 20 | - This bi-directio2nal LSTM is Model-2. 21 | - This file also loads the Model-1 and only takes output from enocder of Model-1 to bi-directional LSTM. 22 | 23 | 3. train_lstm.py 24 | - This file consist the code which trains the uni-directional LSTM. 25 | - This uni-directio2nal LSTM is Model-2. 26 | - This file also loads the Model-1 and only takes output from enocder of Model-1 to uni-directional LSTM. 27 | 28 | 4. train_vae.py 29 | - This file consist the code which trains the variational auto-encoder. 30 | - This auto encoder is Model-1. 31 | 32 | 5. test_bi_lstm.py 33 | - This file consists of the code which does inference of bi-directional LSTM. 34 | - This file loads the freezed model and does predictions on test data. 35 | 36 | 6. test_lstm.py 37 | - This file consists of the code which does inference of uni-directional LSTM. 38 | - This file loads the freezed model and does predictions on test data. 39 | 40 | ## models: 41 | 1. auto_encoder_1.py 42 | - This file consist the architecture of auto-encoder. 43 | - This auto-encoder is Model-1. 44 | - It is 10 Layered encoder and 15 layered decoder. 45 | - The file also defines the cost function and the optimizer. 46 | - This file is used by `train_auto_encoder_1.py` of `core` module. 47 | 48 | 2. bi_lstm.py 49 | - This file consist the architecture of bi-directional lstm. 50 | - This bi-directional lstm is Model-2. 51 | - The file also defines the cost function and the optimizer. 52 | - This file is used by `train_bi_lstm.py` of `core` module. 53 | 54 | 3. lstm.py 55 | - This file consist the architecture of uni-directional lstm. 56 | - This bi-directional lstm is Model-2. 57 | - The file also defines the cost function and the optimizer. 58 | - This file is used by `train_lstm.py` of `core` module. 59 | 60 | 4. vae.py 61 | - This file consist the architecture of auto-encoder. 62 | - This variational auto-encoder is Model-1. 63 | - The file also defines the cost function and the optimizer. 64 | - This file is used by `train_auto_encoder_1.py` of `core` module. 65 | 66 | ## utils: 67 | 1. constants.py 68 | - This file consists of constant.py 69 | - It has defined path to data folder and models 70 | - Only this file needs to be changed if you want to use a custom path with in the project 71 | 72 | 2. cv_utils.py 73 | - contains all the `OPENCV` functions that are commonly used by files in the `core` module. 74 | - functions like reading frames, converting image to black and white, resizinng video frame. 75 | 76 | 3. os_utils.py 77 | - contains all the `os` module functions that are commonly used by files in the `core` module. 78 | - functions like iteratng a directory, creating a folder, joining paths. 79 | 80 | 4. utility.py 81 | - contains all the functions that are commonly used by files in the `core` module. 82 | - functions like `freeze_model`, `prepare_batch_frames_from_bg_data`, `load_a_frozen_model`. 83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /Stage2_graph_results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/Stage2_graph_results.png -------------------------------------------------------------------------------- /Stage2_results_1.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Epoch Number 0 has ended in 1249.314429283142 seconds for 420 videos total loss is = 2.128 validation accuracy is = 10.0 4 | Epoch Number 1 has ended in 1232.8844513893127 seconds for 420 videos total loss is = 2.002 validation accuracy is = 17.142857142857142 5 | Epoch Number 2 has ended in 1236.0131850242615 seconds for 420 videos total loss is = 2.013 validation accuracy is = 12.857142857142856 6 | Epoch Number 3 has ended in 1237.4587092399597 seconds for 420 videos total loss is = 1.923 validation accuracy is = 14.285714285714285 7 | Epoch Number 4 has ended in 1242.7690598964691 seconds for 420 videos total loss is = 2.000 validation accuracy is = 5.714285714285714 8 | Epoch Number 5 has ended in 1242.8872978687286 seconds for 420 videos total loss is = 2.068 validation accuracy is = 15.714285714285714 9 | Epoch Number 6 has ended in 1240.3365013599396 seconds for 420 videos total loss is = 1.990 validation accuracy is = 18.571428571428573 10 | Epoch Number 7 has ended in 1242.8389217853546 seconds for 420 videos total loss is = 1.977 validation accuracy is = 22.857142857142858 11 | Epoch Number 8 has ended in 1241.3947684764862 seconds for 420 videos total loss is = 2.043 validation accuracy is = 8.571428571428571 12 | Epoch Number 9 has ended in 1239.866235256195 seconds for 420 videos total loss is = 1.925 validation accuracy is = 21.428571428571427 13 | Epoch Number 10 has ended in 1240.6913866996765 seconds for 420 videos total loss is = 1.877 validation accuracy is = 32.857142857142854 14 | Epoch Number 11 has ended in 1241.9838926792145 seconds for 420 videos total loss is = 1.848 validation accuracy is = 35.714285714285715 15 | Epoch Number 12 has ended in 1241.6398491859436 seconds for 420 videos total loss is = 1.816 validation accuracy is = 42.857142857142854 16 | Epoch Number 13 has ended in 1241.73255443573 seconds for 420 videos total loss is = 1.784 validation accuracy is = 38.57142857142858 17 | Epoch Number 14 has ended in 1241.1113500595093 seconds for 420 videos total loss is = 1.733 validation accuracy is = 55.714285714285715 18 | Epoch Number 15 has ended in 1237.6543085575104 seconds for 420 videos total loss is = 1.711 validation accuracy is = 45.714285714285715 19 | Epoch Number 16 has ended in 1238.0837152004242 seconds for 420 videos total loss is = 1.675 validation accuracy is = 57.14285714285714 20 | Epoch Number 17 has ended in 1240.8498599529266 seconds for 420 videos total loss is = 1.653 validation accuracy is = 67.14285714285714 21 | Epoch Number 18 has ended in 1242.9199516773224 seconds for 420 videos total loss is = 1.665 validation accuracy is = 65.71428571428571 22 | Epoch Number 19 has ended in 1237.8822529315948 seconds for 420 videos total loss is = 1.664 validation accuracy is = 58.57142857142858 23 | Epoch Number 20 has ended in 1238.4491651058197 seconds for 420 videos total loss is = 1.641 validation accuracy is = 58.57142857142858 24 | Epoch Number 21 has ended in 1233.8747200965881 seconds for 420 videos total loss is = 1.602 validation accuracy is = 74.28571428571429 25 | Epoch Number 22 has ended in 1233.40109872818 seconds for 420 videos total loss is = 1.568 validation accuracy is = 65.71428571428571 26 | Epoch Number 23 has ended in 1234.4948172569275 seconds for 420 videos total loss is = 1.556 validation accuracy is = 71.42857142857143 27 | Epoch Number 24 has ended in 1232.3021426200867 seconds for 420 videos total loss is = 1.549 validation accuracy is = 85.71428571428571 28 | Epoch Number 25 has ended in 1233.8135149478912 seconds for 420 videos total loss is = 1.534 validation accuracy is = 77.14285714285715 29 | Epoch Number 26 has ended in 1234.4361946582794 seconds for 420 videos total loss is = 1.529 validation accuracy is = 81.42857142857143 30 | Epoch Number 27 has ended in 1233.8681569099426 seconds for 420 videos total loss is = 1.520 validation accuracy is = 82.85714285714286 31 | Epoch Number 28 has ended in 1234.4074280261993 seconds for 420 videos total loss is = 1.515 validation accuracy is = 82.85714285714286 32 | Epoch Number 29 has ended in 1234.2901673316956 seconds for 420 videos total loss is = 1.511 validation accuracy is = 85.71428571428571 33 | Epoch Number 30 has ended in 1234.9839992523193 seconds for 420 videos total loss is = 1.508 validation accuracy is = 75.71428571428571 34 | Epoch Number 31 has ended in 1228.319476366043 seconds for 420 videos total loss is = 1.508 validation accuracy is = 85.71428571428571 35 | Epoch Number 32 has ended in 1235.253803730011 seconds for 420 videos total loss is = 1.506 validation accuracy is = 82.85714285714286 36 | Epoch Number 33 has ended in 1232.4626786708832 seconds for 420 videos total loss is = 1.519 validation accuracy is = 88.57142857142857 37 | Epoch Number 34 has ended in 1239.7619984149933 seconds for 420 videos total loss is = 1.530 validation accuracy is = 85.71428571428571 38 | Epoch Number 35 has ended in 1229.5270154476166 seconds for 420 videos total loss is = 1.512 validation accuracy is = 81.42857142857143 39 | Epoch Number 36 has ended in 1237.696259021759 seconds for 420 videos total loss is = 1.500 validation accuracy is = 80.0 40 | Epoch Number 37 has ended in 1240.8955929279327 seconds for 420 videos total loss is = 1.501 validation accuracy is = 82.85714285714286 41 | Epoch Number 38 has ended in 1238.8219084739685 seconds for 420 videos total loss is = 1.499 validation accuracy is = 88.57142857142857 42 | Epoch Number 39 has ended in 1240.5004124641418 seconds for 420 videos total loss is = 1.497 validation accuracy is = 88.57142857142857 43 | Epoch Number 40 has ended in 1238.8284463882446 seconds for 420 videos total loss is = 1.490 validation accuracy is = 82.85714285714286 44 | Epoch Number 41 has ended in 1240.013144493103 seconds for 420 videos total loss is = 1.491 validation accuracy is = 84.28571428571429 45 | Epoch Number 42 has ended in 1239.5384814739227 seconds for 420 videos total loss is = 1.489 validation accuracy is = 88.57142857142857 46 | Epoch Number 43 has ended in 1239.679298877716 seconds for 420 videos total loss is = 1.490 validation accuracy is = 92.85714285714286 47 | Epoch Number 44 has ended in 1240.8478255271912 seconds for 420 videos total loss is = 1.490 validation accuracy is = 92.85714285714286 48 | Epoch Number 45 has ended in 1240.328919172287 seconds for 420 videos total loss is = 1.490 validation accuracy is = 85.71428571428571 49 | Epoch Number 46 has ended in 1240.0526175498962 seconds for 420 videos total loss is = 1.489 validation accuracy is = 87.14285714285714 50 | Epoch Number 47 has ended in 1239.5537667274475 seconds for 420 videos total loss is = 1.488 validation accuracy is = 87.14285714285714 51 | Epoch Number 48 has ended in 1240.401505947113 seconds for 420 videos total loss is = 1.488 validation accuracy is = 88.57142857142857 52 | Epoch Number 49 has ended in 1240.1786935329437 seconds for 420 videos total loss is = 1.489 validation accuracy is = 90.0 53 | Epoch Number 50 has ended in 1239.215901374817 seconds for 420 videos total loss is = 1.489 validation accuracy is = 82.85714285714286 54 | Epoch Number 51 has ended in 1238.7274396419525 seconds for 420 videos total loss is = 1.488 validation accuracy is = 82.85714285714286 55 | Epoch Number 52 has ended in 1234.0192894935608 seconds for 420 videos total loss is = 1.489 validation accuracy is = 84.28571428571429 56 | Epoch Number 53 has ended in 1231.7837553024292 seconds for 420 videos total loss is = 1.490 validation accuracy is = 81.42857142857143 57 | Epoch Number 54 has ended in 1233.4487760066986 seconds for 420 videos total loss is = 1.490 validation accuracy is = 81.42857142857143 58 | Epoch Number 55 has ended in 1231.3624749183655 seconds for 420 videos total loss is = 1.496 validation accuracy is = 85.71428571428571 59 | Epoch Number 56 has ended in 1231.6556265354156 seconds for 420 videos total loss is = 1.492 validation accuracy is = 82.85714285714286 60 | Epoch Number 57 has ended in 1224.6099524497986 seconds for 420 videos total loss is = 1.487 validation accuracy is = 78.57142857142857 61 | Epoch Number 58 has ended in 1226.3912425041199 seconds for 420 videos total loss is = 1.488 validation accuracy is = 88.57142857Epoch 62 | Epoch Number 59 has ended in 1232.9894979000092 seconds for 420 videos total loss is = 1.490 validation accuracy is = 77.14285714285715 63 | Epoch Number 60 has ended in 1233.548808336258 seconds for 420 videos total loss is = 1.551 validation accuracy is = 80.0 64 | 65 | -------------------------------------------------------------------------------- /Test_Regeneration_Results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/Test_Regeneration_Results.png -------------------------------------------------------------------------------- /core/test_bi_lstm.py: -------------------------------------------------------------------------------- 1 | import os 2 | import time 3 | import random 4 | import numpy as np 5 | import tensorflow as tf 6 | import utils.constants as cs 7 | from sklearn import preprocessing 8 | from models.bi_lstm import Bi_LSTM 9 | from tensorflow.python.platform import gfile 10 | from utils import utility, os_utils, cv_utils 11 | from sklearn.preprocessing import OneHotEncoder 12 | 13 | 14 | def get_batch(video_path, all_frame): 15 | # batch_x = cv_utils.prepare_batch_frames(video_path, all_frame=all_frame) 16 | batch_x = utility.prepare_batch_frames_from_bg_data(video_path) 17 | return batch_x 18 | 19 | 20 | def get_target_name(video_path): 21 | # print(video_path) 22 | split_path = video_path.split(cs.SLASH) 23 | # print(int(split_path[-1][0:3])) 24 | return int(split_path[-1][0:3]) 25 | 26 | 27 | def get_label_enocder(path_gen): 28 | list_of_target_names = [] 29 | one_hot_list = [] 30 | 31 | counter = 1 32 | for video_path in path_gen: 33 | # batch_x = get_batch(video_path, False) 34 | # 35 | # if batch_x is None: 36 | # continue 37 | 38 | list_of_target_names.append(get_target_name(video_path)) 39 | one_hot_list.append(get_target_name(video_path)) 40 | counter += 1 41 | 42 | # if counter == 10: 43 | # break 44 | label_encoder = preprocessing.LabelEncoder() 45 | label_encoder.fit(one_hot_list) 46 | transformed = label_encoder.transform(one_hot_list) 47 | return label_encoder, len(transformed) 48 | 49 | 50 | def get_encoded_embeddings(logs_path): 51 | frozen_graph_filename = logs_path + cs.ENCODER1_FREEZED_PB_NAME 52 | 53 | with gfile.FastGFile(frozen_graph_filename, "rb") as f: 54 | graph_def = tf.GraphDef() 55 | byte = f.read() 56 | graph_def.ParseFromString(byte) 57 | 58 | # for node in graph_def.node: 59 | # print(node.name) 60 | tf.import_graph_def(graph_def, name='') 61 | 62 | detection_graph = tf.get_default_graph() 63 | x = detection_graph.get_tensor_by_name('inputs:0') 64 | encoded = detection_graph.get_tensor_by_name('encoder/encoded/LeakyRelu/Maximum:0') 65 | 66 | # embedding = sess.run(encoded, feed_dict={x: frame}) 67 | # embedding = embedding.reshape((1, embedding.shape[0], embedding.shape[1])) 68 | 69 | return x, encoded 70 | 71 | 72 | def get_encoded_embeddings(logs_path): 73 | frozen_graph_filename = logs_path + cs.ENCODER1_FREEZED_PB_NAME 74 | 75 | with gfile.FastGFile(frozen_graph_filename, "rb") as f: 76 | graph_def = tf.GraphDef() 77 | byte = f.read() 78 | graph_def.ParseFromString(byte) 79 | 80 | # for node in graph_def.node: 81 | # print(node.name) 82 | tf.import_graph_def(graph_def, name='') 83 | 84 | detection_graph = tf.get_default_graph() 85 | x = detection_graph.get_tensor_by_name('inputs:0') 86 | encoded = detection_graph.get_tensor_by_name('encoder/encoded/LeakyRelu/Maximum:0') 87 | 88 | # embedding = sess.run(encoded, feed_dict={x: frame}) 89 | # embedding = embedding.reshape((1, embedding.shape[0], embedding.shape[1])) 90 | 91 | return x, encoded 92 | 93 | 94 | def test(): 95 | encoder_logs_path = cs.BASE_LOG_PATH + cs.MODEL_CONV_AE_1 96 | bi_lstm_logs_path = cs.BASE_LOG_PATH + cs.MODEL_BI_LSTM 97 | path_generator = os_utils.iterate_test_data(cs.BASE_DATA_PATH + cs.DATA_BG_TEST_VIDEO, "mp4") 98 | 99 | graph = tf.Graph() 100 | accuracy_1 = 0 101 | accuracy_3 = 0 102 | accuracy_5 = 0 103 | 104 | with graph.as_default(): 105 | rnn = Bi_LSTM(lstm_size=128, batch_len=BATCH_SIZE, output_nodes=14, keep_prob=0.0, learning_rate=0.001) 106 | rnn.build_model() 107 | stage_1_ip, stage_2_ip = get_encoded_embeddings(encoder_logs_path) 108 | prediction = tf.nn.softmax(rnn.predictions) 109 | saver = tf.train.Saver() 110 | 111 | label_encoder, num_classes = get_label_enocder(path_generator) 112 | path_generator = os_utils.iterate_test_data(cs.BASE_DATA_PATH + cs.DATA_BG_TEST_VIDEO, "mp4") 113 | 114 | with tf.Session(graph=graph) as sess: 115 | saver.restore(sess, tf.train.latest_checkpoint(bi_lstm_logs_path)) 116 | state_fw = sess.run(rnn.initial_state_fw) 117 | state_bw = sess.run(rnn.initial_state_bw) 118 | loop_count = 0 119 | for video_path in path_generator: 120 | # print(video_path) 121 | batch_x = get_batch(video_path, True) 122 | batch_y = get_target_name(video_path) 123 | 124 | encoded_batch = sess.run(stage_2_ip, feed_dict={stage_1_ip: batch_x}) 125 | encoded_batch = encoded_batch.reshape((1, encoded_batch.shape[0], encoded_batch.shape[1])) 126 | 127 | feed = {rnn.inputs_: encoded_batch, 128 | rnn.targets_: label_encoder.transform([batch_y]), 129 | rnn.keep_prob: 0.5, 130 | rnn.initial_state_fw: state_fw, 131 | rnn.initial_state_bw: state_bw} 132 | 133 | probabilities_1, probabilities_3, probabilities_5 = sess.run([tf.nn.top_k(prediction, k=1), 134 | tf.nn.top_k(prediction, k=3), 135 | tf.nn.top_k(prediction, k=5)], 136 | feed_dict=feed) 137 | 138 | print(probabilities_1[1][0]) 139 | print(probabilities_3[1][0]) 140 | print(probabilities_5[1][0]) 141 | print(batch_y - 1) 142 | 143 | if batch_y - 1 in probabilities_1[1][0]: 144 | accuracy_1 += 1 145 | print("accuracy_1 =", accuracy_1) 146 | 147 | if batch_y - 1 in probabilities_3[1][0]: 148 | accuracy_3 += 1 149 | print("accuracy_3 =", accuracy_3) 150 | 151 | if batch_y - 1 in probabilities_5[1][0]: 152 | accuracy_5 += 1 153 | print("accuracy_5 =", accuracy_5) 154 | loop_count += 1 155 | 156 | print("==============================", loop_count, "=================================") 157 | 158 | print(accuracy_1, 100 * accuracy_1 / 280) 159 | print(accuracy_3, 100 * accuracy_3 / 280) 160 | print(accuracy_5, 100 * accuracy_5 / 280) 161 | 162 | 163 | if __name__ == "__main__": 164 | total_start_time = time.time() 165 | BATCH_SIZE = 1 166 | test() 167 | total_end_time = time.time() 168 | print("===================================================") 169 | print("Total Execution Time =", total_end_time - total_start_time) 170 | print("===================================================") 171 | 172 | # 1748.5977 173 | -------------------------------------------------------------------------------- /core/test_lstm.py: -------------------------------------------------------------------------------- 1 | import os 2 | import time 3 | import random 4 | import numpy as np 5 | import tensorflow as tf 6 | import utils.constants as cs 7 | from sklearn import preprocessing 8 | from models.lstm import RecurrentNetwork 9 | from tensorflow.python.platform import gfile 10 | from utils import utility, os_utils, cv_utils 11 | from sklearn.preprocessing import OneHotEncoder 12 | 13 | 14 | def get_batch(video_path, all_frame): 15 | # batch_x = cv_utils.prepare_batch_frames(video_path, all_frame=all_frame) 16 | batch_x = utility.prepare_batch_frames_from_bg_data(video_path) 17 | return batch_x 18 | 19 | 20 | def get_target_name(video_path): 21 | # print(video_path) 22 | split_path = video_path.split(cs.SLASH) 23 | # print(int(split_path[-1][0:3])) 24 | return int(split_path[-1][0:3]) 25 | 26 | 27 | def get_label_enocder(path_gen): 28 | list_of_target_names = [] 29 | one_hot_list = [] 30 | 31 | counter = 1 32 | for video_path in path_gen: 33 | # batch_x = get_batch(video_path, False) 34 | # 35 | # if batch_x is None: 36 | # continue 37 | 38 | list_of_target_names.append(get_target_name(video_path)) 39 | one_hot_list.append(get_target_name(video_path)) 40 | counter += 1 41 | 42 | # if counter == 10: 43 | # break 44 | label_encoder = preprocessing.LabelEncoder() 45 | label_encoder.fit(one_hot_list) 46 | transformed = label_encoder.transform(one_hot_list) 47 | return label_encoder, len(transformed) 48 | 49 | 50 | def get_encoded_embeddings(logs_path): 51 | 52 | frozen_graph_filename = logs_path + cs.ENCODER1_FREEZED_PB_NAME 53 | 54 | with gfile.FastGFile(frozen_graph_filename, "rb") as f: 55 | graph_def = tf.GraphDef() 56 | byte = f.read() 57 | graph_def.ParseFromString(byte) 58 | 59 | # for node in graph_def.node: 60 | # print(node.name) 61 | tf.import_graph_def(graph_def, name='') 62 | 63 | detection_graph = tf.get_default_graph() 64 | x = detection_graph.get_tensor_by_name('inputs:0') 65 | encoded = detection_graph.get_tensor_by_name('encoder/encoded/LeakyRelu/Maximum:0') 66 | 67 | # embedding = sess.run(encoded, feed_dict={x: frame}) 68 | # embedding = embedding.reshape((1, embedding.shape[0], embedding.shape[1])) 69 | 70 | return x, encoded 71 | 72 | 73 | def get_encoded_embeddings(logs_path): 74 | 75 | frozen_graph_filename = logs_path + cs.ENCODER1_FREEZED_PB_NAME 76 | 77 | with gfile.FastGFile(frozen_graph_filename, "rb") as f: 78 | graph_def = tf.GraphDef() 79 | byte = f.read() 80 | graph_def.ParseFromString(byte) 81 | 82 | # for node in graph_def.node: 83 | # print(node.name) 84 | tf.import_graph_def(graph_def, name='') 85 | 86 | detection_graph = tf.get_default_graph() 87 | x = detection_graph.get_tensor_by_name('inputs:0') 88 | encoded = detection_graph.get_tensor_by_name('encoder/encoded/LeakyRelu/Maximum:0') 89 | 90 | # embedding = sess.run(encoded, feed_dict={x: frame}) 91 | # embedding = embedding.reshape((1, embedding.shape[0], embedding.shape[1])) 92 | 93 | return x, encoded 94 | 95 | 96 | def write_summaries(model_object, validation_acc, loss): 97 | # ================================================ 98 | # Create a summary to monitor training loss tensor 99 | # ================================================ 100 | tf.summary.scalar("loss", loss) 101 | 102 | # ================================================ 103 | # Create a summary to monitor validation accuracy 104 | # ================================================ 105 | tf.summary.scalar("validation_accuracy", validation_acc) 106 | 107 | return tf.summary.merge_all() 108 | 109 | 110 | def train(): 111 | encoder_logs_path = cs.BASE_LOG_PATH + cs.MODEL_CONV_AE_1 112 | lstm_logs_path = cs.BASE_LOG_PATH + cs.MODEL_LSTM 113 | path_generator = os_utils.iterate_test_data(cs.BASE_DATA_PATH+cs.DATA_BG_TEST_VIDEO, "mp4") 114 | 115 | graph = tf.Graph() 116 | accuracy_1 = 0 117 | accuracy_3 = 0 118 | accuracy_5 = 0 119 | 120 | with graph.as_default(): 121 | rnn = RecurrentNetwork(lstm_size=128, batch_len=BATCH_SIZE, output_nodes=14, keep_prob=0.85, 122 | learning_rate=0.001) 123 | rnn.build_model() 124 | stage_1_ip, stage_2_ip = get_encoded_embeddings(encoder_logs_path) 125 | prediction = tf.nn.softmax(rnn.predictions) 126 | saver = tf.train.Saver() 127 | 128 | label_encoder, num_classes = get_label_enocder(path_generator) 129 | path_generator = os_utils.iterate_test_data(cs.BASE_DATA_PATH+cs.DATA_BG_TEST_VIDEO, "mp4") 130 | 131 | with tf.Session(graph=graph) as sess: 132 | saver.restore(sess, lstm_logs_path+"lstm_loop_count_21421.ckpt") 133 | state = sess.run(rnn.initial_state) 134 | loop_count = 0 135 | for video_path in path_generator: 136 | # print(video_path) 137 | batch_x = get_batch(video_path, True) 138 | batch_y = get_target_name(video_path) 139 | 140 | encoded_batch = sess.run(stage_2_ip, feed_dict={stage_1_ip: batch_x}) 141 | encoded_batch = encoded_batch.reshape((1, encoded_batch.shape[0], encoded_batch.shape[1])) 142 | 143 | feed = {rnn.inputs_: encoded_batch, 144 | rnn.targets_: label_encoder.transform([batch_y]), 145 | rnn.keep_prob: 0.99, 146 | rnn.initial_state: state} 147 | 148 | probabilities_1, probabilities_3, probabilities_5 = sess.run([tf.nn.top_k(prediction, k=1), 149 | tf.nn.top_k(prediction, k=3), 150 | tf.nn.top_k(prediction, k=5)], 151 | feed_dict=feed) 152 | 153 | print(probabilities_1[1][0]) 154 | print(probabilities_3[1][0]) 155 | print(probabilities_5[1][0]) 156 | print(batch_y-1) 157 | 158 | if batch_y-1 in probabilities_1[1][0]: 159 | accuracy_1 += 1 160 | print("accuracy_1 =", accuracy_1) 161 | 162 | if batch_y - 1 in probabilities_3[1][0]: 163 | accuracy_3 += 1 164 | print("accuracy_3 =", accuracy_3) 165 | 166 | if batch_y - 1 in probabilities_5[1][0]: 167 | accuracy_5 += 1 168 | print("accuracy_5 =", accuracy_5) 169 | loop_count += 1 170 | print("=================accuracy_3=============", loop_count, "=================================") 171 | 172 | print(accuracy_1, 100*accuracy_1/280) 173 | print(accuracy_3, 100*accuracy_3/280) 174 | print(accuracy_5, 100*accuracy_5/280) 175 | 176 | 177 | if __name__ == "__main__": 178 | total_start_time = time.time() 179 | BATCH_SIZE = 1 180 | train() 181 | total_end_time = time.time() 182 | print("===================================================") 183 | print("Total Execution Time =", total_end_time - total_start_time) 184 | print("===================================================") 185 | 186 | # 1748.5977 187 | -------------------------------------------------------------------------------- /core/train_auto_enocder_1.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import cv2 4 | import time 5 | import argparse 6 | import numpy as np 7 | from tqdm import tqdm 8 | import tensorflow as tf 9 | from utils import utility 10 | import utils.constants as cs 11 | import matplotlib.pyplot as plt 12 | from utils import os_utils, cv_utils 13 | from models.auto_enocder_1 import ConvAutoEncoder1 as ConVAE 14 | 15 | 16 | def iterate_videos(path, input_format): 17 | """ 18 | Iterates through each file present in path 19 | and returns a generator that contains the path 20 | to the video files that has MPEG format 21 | 22 | :param path: string 23 | path which has to be iterated 24 | 25 | :param input_format: string 26 | data file extension which is to be iterated 27 | 28 | :return full_path: generator 29 | contains the path to video files ending with "data_format" extension 30 | """ 31 | for root, dirs, files in sorted(os.walk(path)): 32 | files = sorted(files) 33 | for file in files: 34 | if file.endswith(input_format): 35 | full_path = root + cs.Slash + file 36 | print(full_path) 37 | 38 | 39 | def get_batch(video_path): 40 | """ 41 | 42 | :param video_path: string 43 | path to video from which the batch has to be prepared 44 | :return: batch_x: numpy array object of shape (batch_size, height, width, d1) 45 | array which contains set of frames read from the video 46 | """ 47 | batch_x = utility.prepare_batch_frames_from_bg_data(video_path) 48 | return batch_x 49 | 50 | 51 | def display_reconstruction_results(test_frame, reconstructed): 52 | fig, axes = plt.subplots(nrows=2, ncols=10, sharex=True, sharey=True, figsize=(20, 4)) 53 | 54 | for images, row in zip([test_frame, reconstructed], axes): 55 | for img, ax in zip(images, row): 56 | ax.imshow(img.reshape((240, 240))) 57 | ax.get_xaxis().set_visible(False) 58 | ax.get_yaxis().set_visible(False) 59 | 60 | fig.tight_layout(pad=0.1) 61 | plt.show() 62 | 63 | 64 | def write_summaries(model_object): 65 | """ 66 | Creates the necessary 'Summary' protobuf for evaluating our model on tensor-board 67 | 68 | :param model_object: instance of ConvAutoEncoder1 69 | 70 | :return full_path: returns a scalar `Tensor` of type `string` 71 | contains all the serialized `Summary` protocol buffer resulting from the merging. 72 | """ 73 | # Create a summary to monitor training loss tensor 74 | tf.summary.scalar("loss", tf.reduce_mean(model_object.loss)) 75 | 76 | # ============================================== 77 | # Create a summary to visualize input images 78 | # ============================================== 79 | tf.summary.image("input", model_object.inputs_, 40) 80 | 81 | # =================================================== 82 | # Create a summary to visualize reconstructed images 83 | # =================================================== 84 | tf.summary.image("reconstructed", model_object.decoded, 40) 85 | 86 | # ============================================== 87 | # Create a summary to visualize Loss histogram 88 | # ============================================== 89 | tf.summary.histogram("loss_histogram", tf.reduce_mean(model_object.loss)) 90 | 91 | return tf.summary.merge_all() 92 | 93 | 94 | def train(): 95 | """ This function builds the graph and performs the training """ 96 | 97 | epochs = 150 # epochs: Number of iterations for which training will be performed 98 | loading = False # loading : flag for loading an already trained model 99 | logs_path = cs.BASE_LOG_PATH + cs.MODEL_CONV_AE_1 # logs_path : path to store checkpoint and summary events 100 | tf.reset_default_graph() 101 | cae = ConVAE() 102 | cae.build_model() 103 | merged_summary_op = write_summaries(cae) 104 | sess = tf.Session() 105 | saver = tf.train.Saver(max_to_keep=10) 106 | 107 | # ======================================================================= 108 | # If loading flag is true then load the latest model form the logs_path 109 | # ======================================================================= 110 | if loading: 111 | sess.run(tf.global_variables_initializer()) 112 | saver.restore(sess, tf.train.latest_checkpoint(logs_path)) 113 | latest_checkpoint_path = tf.train.latest_checkpoint(logs_path) 114 | checkpoint_number = latest_checkpoint_path.split(".")[0] 115 | checkpoint_number = int(checkpoint_number.split("_")[-1]) 116 | print("loading checkpoint_number =", checkpoint_number) 117 | 118 | else: 119 | sess.run(tf.global_variables_initializer()) 120 | checkpoint_number = 0 121 | 122 | summary_writer = tf.summary.FileWriter(logs_path, graph=sess.graph) 123 | summary_writer.add_graph(sess.graph) 124 | 125 | loop_counter = 1 126 | 127 | for e in tqdm(range(checkpoint_number, checkpoint_number+epochs)): 128 | print() 129 | path_generator = os_utils.iterate_data(cs.BASE_DATA_PATH+cs.DATA_BG_TRAIN_VIDEO, "mp4") 130 | batch_counter = 0 131 | start_time = time.time() 132 | 133 | for video_path in path_generator: 134 | # ====================================== 135 | # get batches to feed into the network 136 | # ====================================== 137 | batch_x = get_batch(video_path) 138 | 139 | if batch_x is None: 140 | continue 141 | 142 | else: 143 | print("video_path", video_path) 144 | print("video number =", batch_counter, "..... batch_x.shape", batch_x.shape, 145 | " loop_counter =", checkpoint_number + loop_counter) 146 | 147 | batch_loss, _, summary = sess.run([cae.loss, cae.opt, merged_summary_op], 148 | feed_dict={cae.inputs_: batch_x, 149 | cae.targets_: batch_x.copy()}) 150 | 151 | # ============================== 152 | # Write logs at every iteration 153 | # ============================== 154 | summary_writer.add_summary(summary, checkpoint_number + loop_counter) 155 | 156 | print("Epoch: {}/{}...".format(e+1-checkpoint_number, epochs), 157 | "Training loss: {:.4f}".format(batch_loss)) 158 | 159 | # if batch_counter % 2 == 0: 160 | # print("saving the model at epoch", checkpoint_number + loop_counter) 161 | # saver.save(sess, os.path.join(logs_path, 'encoder_epoch_number_{}.ckpt' 162 | # .format(checkpoint_number + loop_counter))) 163 | 164 | batch_counter += 1 165 | loop_counter += 1 166 | if batch_counter == 420: 167 | end_time = time.time() 168 | print("==============================================================================================") 169 | print("Epoch Number", e, "has ended in", end_time-start_time, "seconds for", batch_counter, "videos") 170 | print("==============================================================================================") 171 | 172 | # break 173 | 174 | if e % 10 == 0: 175 | print("################################################") 176 | print("saving the model at epoch", checkpoint_number + loop_counter) 177 | print("################################################") 178 | 179 | saver.save(sess, os.path.join(logs_path, 'encoder_epoch_number_{}.ckpt' 180 | .format(checkpoint_number + loop_counter))) 181 | # ========================= 182 | # Freeze the session graph 183 | # ========================= 184 | cae.process_node_names() 185 | utility.freeze_model(sess, logs_path, tf.train.latest_checkpoint(logs_path), 186 | cae, "encoder_train.pb", cs.ENCODER1_FREEZED_PB_NAME) 187 | 188 | print("Run the command line:\n--> tensorboard --logdir={}".format(logs_path), 189 | "\nThen open http://0.0.0.0:6006/ into your web browser") 190 | 191 | path_generator = os_utils.iterate_test_data(cs.BASE_DATA_PATH+cs.DATA_BG_TRAIN_VIDEO, "mp4") 192 | 193 | # ============================================================== 194 | # Now testing the performance of our model on an unknown data 195 | # ============================================================== 196 | for video_path in path_generator: 197 | test_frame = get_batch(video_path) 198 | 199 | if test_frame is not None: 200 | 201 | test_frame = test_frame[20:40, :, :, :] 202 | reconstructed = sess.run(cae.decoded, feed_dict={cae.inputs_: test_frame}) 203 | display_reconstruction_results(test_frame, reconstructed) 204 | 205 | break 206 | 207 | sess.close() 208 | 209 | 210 | if __name__ == '__main__': 211 | total_start_time = time.time() 212 | train() 213 | total_end_time = time.time() 214 | print("===================================================") 215 | print("Total Execution Time =", total_end_time - total_start_time) 216 | print("===================================================") 217 | 218 | -------------------------------------------------------------------------------- /core/train_bi_lstm.py: -------------------------------------------------------------------------------- 1 | import os 2 | import time 3 | import random 4 | import numpy as np 5 | import tensorflow as tf 6 | import utils.constants as cs 7 | from sklearn import preprocessing 8 | from models.bi_lstm import Bi_LSTM 9 | from tensorflow.python.platform import gfile 10 | from utils import utility, os_utils, cv_utils 11 | from sklearn.preprocessing import OneHotEncoder 12 | 13 | 14 | def get_batch(video_path): 15 | # batch_x = cv_utils.prepare_batch_frames(video_path, all_frame=all_frame) 16 | batch_x = utility.prepare_batch_frames_from_bg_data(video_path=video_path, frame_limit=50) 17 | return batch_x 18 | 19 | 20 | def get_target_name(video_path): 21 | split_path = video_path.split(cs.SLASH) 22 | # print(int(split_path[-1][0:3])) 23 | return int(split_path[-1][0:3]) 24 | 25 | 26 | def get_label_enocder(path_gen): 27 | list_of_target_names = [] 28 | one_hot_list = [] 29 | 30 | counter = 1 31 | for video_path in path_gen: 32 | # batch_x = get_batch(video_path, False) 33 | # 34 | # if batch_x is None: 35 | # continue 36 | 37 | list_of_target_names.append(get_target_name(video_path)) 38 | one_hot_list.append(get_target_name(video_path)) 39 | counter += 1 40 | 41 | # if counter == 10: 42 | # break 43 | label_encoder = preprocessing.LabelEncoder() 44 | label_encoder.fit(one_hot_list) 45 | transformed = label_encoder.transform(one_hot_list) 46 | return label_encoder, len(transformed) 47 | 48 | 49 | def get_encoded_embeddings(logs_path): 50 | """ 51 | 52 | :param logs_path: string 53 | encoder logs path which contains the frozen protobuf file 54 | :return: x: input tensor 55 | 56 | :return: encoded: hidden representation tensor 57 | 58 | """ 59 | frozen_graph_filename = logs_path + cs.ENCODER1_FREEZED_PB_NAME 60 | 61 | with gfile.FastGFile(frozen_graph_filename, "rb") as f: 62 | graph_def = tf.GraphDef() 63 | byte = f.read() 64 | graph_def.ParseFromString(byte) 65 | 66 | # for node in graph_def.node: 67 | # print(node.name) 68 | tf.import_graph_def(graph_def, name='') 69 | 70 | detection_graph = tf.get_default_graph() 71 | x = detection_graph.get_tensor_by_name('inputs:0') 72 | encoded = detection_graph.get_tensor_by_name('encoder/encoded/LeakyRelu/Maximum:0') 73 | 74 | # embedding = sess.run(encoded, feed_dict={x: frame}) 75 | # embedding = embedding.reshape((1, / len(sampling_list)embedding.shape[0], embedding.shape[1])) 76 | 77 | return x, encoded 78 | 79 | 80 | def write_summaries(validation_acc, loss): 81 | # ================================================ 82 | # Create a summary to monitor training loss tensor 83 | # ================================================ 84 | tf.summary.scalar("loss", loss) 85 | 86 | # ================================================ 87 | # Create a summary to monitor validation accuracy 88 | # ================================================ 89 | tf.summary.scalar("validation_accuracy", validation_acc) 90 | 91 | return tf.summary.merge_all() 92 | 93 | 94 | def train(): 95 | epochs = 51 96 | sampling_number = 70 97 | encoder_logs_path = cs.BASE_LOG_PATH + cs.MODEL_CONV_AE_1 98 | path_generator = os_utils.iterate_data(cs.BASE_DATA_PATH+cs.DATA_BG_TRAIN_VIDEO, "mp4") 99 | logs_path = cs.BASE_LOG_PATH + cs.MODEL_BI_LSTM 100 | checkpoint_number = 0 101 | loop_counter = 1 102 | 103 | graph = tf.Graph() 104 | 105 | # ====================== 106 | # Add nodes to the graph 107 | # ====================== 108 | with graph.as_default(): 109 | val_acc = tf.Variable(0.0, tf.float32) 110 | tot_loss = tf.Variable(0.0, tf.float32) 111 | 112 | rnn = Bi_LSTM(lstm_size=128, batch_len=BATCH_SIZE, output_nodes=14, keep_prob=0.85, learning_rate=0.001) 113 | rnn.build_model() 114 | stage_1_ip, stage_2_ip = get_encoded_embeddings(encoder_logs_path) 115 | prediction = tf.argmax(rnn.predictions, 1) 116 | 117 | label_encoder, num_classes = get_label_enocder(path_generator) 118 | 119 | # ================================= 120 | # Essential for creating summaries 121 | # ================================= 122 | with graph.as_default(): 123 | merged_summary_op = write_summaries(val_acc, tot_loss) 124 | summary_writer = tf.summary.FileWriter(logs_path, graph=graph) 125 | summary_writer.add_graph(graph) 126 | saver = tf.train.Saver(max_to_keep=4) 127 | 128 | with tf.Session(graph=graph) as sess: 129 | 130 | sess.run(tf.global_variables_initializer()) 131 | iteration = 1 132 | tf.get_default_graph().finalize() 133 | for e in range(epochs): 134 | sampling_list = random.sample(range(0, 419), sampling_number) 135 | start_time = time.time() 136 | total_loss = 0 137 | validation_accuracy = 0 138 | state_fw = sess.run(rnn.initial_state_fw) 139 | state_bw = sess.run(rnn.initial_state_bw) 140 | 141 | path_generator = os_utils.iterate_data(cs.BASE_DATA_PATH + cs.DATA_BG_TRAIN_VIDEO, "mp4") 142 | 143 | batch_counter = 0 144 | for video_path in path_generator: 145 | 146 | batch_x = get_batch(video_path) 147 | batch_y = get_target_name(video_path) 148 | 149 | if batch_x is None: 150 | continue 151 | 152 | encoded_batch = sess.run(stage_2_ip, feed_dict={stage_1_ip: batch_x}) 153 | encoded_batch = encoded_batch.reshape((1, encoded_batch.shape[0], encoded_batch.shape[1])) 154 | 155 | # print(encoded_batch.shape) 156 | feed = {rnn.inputs_: encoded_batch, 157 | rnn.targets_: label_encoder.transform([batch_y]), 158 | rnn.keep_prob: 0.5, 159 | rnn.initial_state_fw: state_fw, 160 | rnn.initial_state_bw: state_bw} 161 | 162 | if batch_counter in sampling_list: 163 | network_prediction = sess.run([prediction], 164 | feed_dict=feed) 165 | print("validation =======> network_prediction: {}".format(network_prediction[0][0]), 166 | "and ground truth: {}".format(batch_y-1)) 167 | # print(network_prediction[0]) 168 | # print(batch_y-1) 169 | if network_prediction[0][0] == batch_y-1: 170 | validation_accuracy += 1 171 | 172 | else: 173 | batch_loss, state_fw, state_bw, _ = sess.run([rnn.loss, rnn.final_state_fw, 174 | rnn.final_state_bw, rnn.optimizer], 175 | feed_dict=feed) 176 | 177 | total_loss += batch_loss 178 | 179 | print("Epoch: {}/{}".format(e, epochs), 180 | "Video Number: {}".format(batch_counter), 181 | "Batch Loss: {:.3f}".format(batch_loss)) 182 | iteration += 1 183 | 184 | batch_counter += 1 185 | loop_counter += 1 186 | 187 | if batch_counter == 420: 188 | total_loss = total_loss / 420 189 | end_time = time.time() 190 | print("===========================================================================================") 191 | print("Epoch Number", e, "has ended in", end_time - start_time, "seconds for", batch_counter, 192 | "videos", 193 | "total loss is = {:.3f}".format(total_loss), 194 | "validation accuracy is = {}".format(100*(validation_accuracy / len(sampling_list)))) 195 | print("===========================================================================================") 196 | feed = {val_acc: validation_accuracy/len(sampling_list), tot_loss: total_loss} 197 | summary = sess.run(merged_summary_op, feed_dict=feed) 198 | summary_writer.add_summary(summary, e) 199 | 200 | break 201 | 202 | if e % 2 == 0: 203 | print("################################################") 204 | print("saving the model at epoch", checkpoint_number + loop_counter) 205 | print("################################################") 206 | 207 | saver.save(sess, os.path.join(logs_path, 'lstm_loop_count_{}.ckpt' 208 | .format(checkpoint_number + loop_counter))) 209 | 210 | print("Run the command line:\n--> tensorboard --logdir={}".format(logs_path), 211 | "\nThen open http://0.0.0.0:6006/ into your web browser") 212 | 213 | rnn.process_node_names() 214 | utility.freeze_model(sess, logs_path, tf.train.latest_checkpoint(logs_path), 215 | rnn, "lstm_train.pb", cs.LSTM_FREEZED_PB_NAME) 216 | 217 | sess.close() 218 | 219 | 220 | if __name__ == "__main__": 221 | total_start_time = time.time() 222 | BATCH_SIZE = 1 223 | train() 224 | total_end_time = time.time() 225 | print("===================================================") 226 | print("Total Execution Time =", total_end_time - total_start_time) 227 | print("===================================================") 228 | 229 | # 1748.5977 230 | -------------------------------------------------------------------------------- /core/train_lstm.py: -------------------------------------------------------------------------------- 1 | import os 2 | import time 3 | import random 4 | import numpy as np 5 | import tensorflow as tf 6 | import utils.constants as cs 7 | from sklearn import preprocessing 8 | from models.lstm import RecurrentNetwork 9 | from tensorflow.python.platform import gfile 10 | from utils import utility, os_utils, cv_utils 11 | from sklearn.preprocessing import OneHotEncoder 12 | 13 | 14 | def get_batch(video_path): 15 | # batch_x = cv_utils.prepare_batch_frames(video_path, all_frame=all_frame) 16 | batch_x = utility.prepare_batch_frames_from_bg_data(video_path=video_path, frame_limit=50) 17 | return batch_x 18 | 19 | 20 | def get_target_name(video_path): 21 | # print(video_path) 22 | split_path = video_path.split(cs.SLASH) 23 | # print(int(split_path[-1][0:3])) 24 | return int(split_path[-1][0:3]) 25 | 26 | 27 | def get_label_enocder(path_gen): 28 | list_of_target_names = [] 29 | one_hot_list = [] 30 | 31 | counter = 1 32 | for video_path in path_gen: 33 | # batch_x = get_batch(video_path, False) 34 | # 35 | # if batch_x is None: 36 | # continue 37 | 38 | list_of_target_names.append(get_target_name(video_path)) 39 | one_hot_list.append(get_target_name(video_path)) 40 | counter += 1 41 | 42 | # if counter == 10: 43 | # break 44 | label_encoder = preprocessing.LabelEncoder() 45 | label_encoder.fit(one_hot_list) 46 | transformed = label_encoder.transform(one_hot_list) 47 | return label_encoder, len(transformed) 48 | 49 | 50 | def get_encoded_embeddings(logs_path): 51 | 52 | frozen_graph_filename = logs_path + cs.ENCODER1_FREEZED_PB_NAME 53 | 54 | with gfile.FastGFile(frozen_graph_filename, "rb") as f: 55 | graph_def = tf.GraphDef() 56 | byte = f.read() 57 | graph_def.ParseFromString(byte) 58 | 59 | # for node in graph_def.node: 60 | # print(node.name) 61 | tf.import_graph_def(graph_def, name='') 62 | 63 | detection_graph = tf.get_default_graph() 64 | x = detection_graph.get_tensor_by_name('inputs:0') 65 | encoded = detection_graph.get_tensor_by_name('encoder/encoded/LeakyRelu/Maximum:0') 66 | 67 | # embedding = sess.run(encoded, feed_dict={x: frame}) 68 | # embedding = embedding.reshape((1, / len(sampling_list)embedding.shape[0], embedding.shape[1])) 69 | 70 | return x, encoded 71 | 72 | 73 | def write_summaries(validation_acc, loss): 74 | # ================================================ 75 | # Create a summary to monitor training loss tensor 76 | # ================================================ 77 | tf.summary.scalar("loss", loss) 78 | 79 | # ================================================ 80 | # Create a summary to monitor validation accuracy 81 | # ================================================ 82 | tf.summary.scalar("validation_accuracy", validation_acc) 83 | 84 | return tf.summary.merge_all() 85 | 86 | 87 | def train(): 88 | epochs = 50 89 | sampling_number = 70 90 | encoder_logs_path = cs.BASE_LOG_PATH + cs.MODEL_CONV_AE_1 91 | path_generator = os_utils.iterate_data(cs.BASE_DATA_PATH + cs.DATA_BG_TRAIN_VIDEO, "mp4") 92 | logs_path = cs.BASE_LOG_PATH + cs.MODEL_LSTM 93 | checkpoint_number = 0 94 | loop_counter = 1 95 | 96 | graph = tf.Graph() 97 | # Add nodes to the graph 98 | with graph.as_default(): 99 | val_acc = tf.Variable(0.0, tf.float32) 100 | tot_loss = tf.Variable(0.0, tf.float32) 101 | 102 | rnn = RecurrentNetwork(lstm_size=128, batch_len=BATCH_SIZE, output_nodes=14, learning_rate=0.001) 103 | rnn.build_model() 104 | stage_1_ip, stage_2_ip = get_encoded_embeddings(encoder_logs_path) 105 | prediction = tf.argmax(rnn.predictions, 1) 106 | 107 | label_encoder, num_classes = get_label_enocder(path_generator) 108 | 109 | with graph.as_default(): 110 | merged_summary_op = write_summaries(val_acc, tot_loss) 111 | summary_writer = tf.summary.FileWriter(logs_path, graph=graph) 112 | summary_writer.add_graph(graph) 113 | saver = tf.train.Saver(max_to_keep=4) 114 | 115 | loop_counter = 1 116 | 117 | with tf.Session(graph=graph) as sess: 118 | 119 | sess.run(tf.global_variables_initializer()) 120 | iteration = 1 121 | tf.get_default_graph().finalize() 122 | for e in range(epochs): 123 | sampling_list = random.sample(range(0, 419), sampling_number) 124 | start_time = time.time() 125 | total_loss = 0 126 | validation_accuracy = 0 127 | state = sess.run(rnn.initial_state) 128 | 129 | path_generator = os_utils.iterate_data(cs.BASE_DATA_PATH + cs.DATA_BG_TRAIN_VIDEO, "mp4") 130 | 131 | batch_counter = 0 132 | for video_path in path_generator: 133 | 134 | batch_x = get_batch(video_path) 135 | batch_y = get_target_name(video_path) 136 | 137 | if batch_x is None: 138 | continue 139 | 140 | encoded_batch = sess.run(stage_2_ip, feed_dict={stage_1_ip: batch_x}) 141 | encoded_batch = encoded_batch.reshape((1, encoded_batch.shape[0], encoded_batch.shape[1])) 142 | 143 | # print(encoded_batch.shape) 144 | feed = {rnn.inputs_: encoded_batch, 145 | rnn.targets_: label_encoder.transform([batch_y]), 146 | rnn.keep_prob: 0.80, 147 | rnn.initial_state: state} 148 | 149 | if batch_counter in sampling_list: 150 | network_prediction = sess.run([prediction], 151 | feed_dict=feed) 152 | print("validation =======> network_prediction: {}".format(network_prediction[0][0]), 153 | "and ground truth: {}".format(batch_y-1)) 154 | # print(network_prediction[0]) 155 | # print(batch_y-1) 156 | if network_prediction[0][0] == batch_y-1: 157 | validation_accuracy += 1 158 | 159 | else: 160 | batch_loss, state, _ = sess.run([rnn.loss, rnn.final_state, rnn.optimizer], feed_dict=feed) 161 | 162 | total_loss += batch_loss 163 | 164 | print("Epoch: {}/{}".format(e, epochs), 165 | "Video Number: {}".format(batch_counter), 166 | "Batch Loss: {:.3f}".format(batch_loss)) 167 | iteration += 1 168 | 169 | batch_counter += 1 170 | loop_counter += 1 171 | 172 | if batch_counter == 420: 173 | total_loss = total_loss / 420 174 | end_time = time.time() 175 | print("===========================================================================================") 176 | print("Epoch Number", e, "has ended in", end_time - start_time, "seconds for", batch_counter, 177 | "videos", 178 | "total loss is = {:.3f}".format(total_loss), 179 | "validation accuracy is = {}".format(100*(validation_accuracy / len(sampling_list)))) 180 | print("===========================================================================================") 181 | feed = {val_acc: validation_accuracy/len(sampling_list), tot_loss: total_loss} 182 | summary = sess.run(merged_summary_op, feed_dict=feed) 183 | summary_writer.add_summary(summary, e) 184 | 185 | break 186 | 187 | if e % 30 == 0: 188 | print("################################################") 189 | print("saving the model at epoch", checkpoint_number + loop_counter) 190 | print("################################################") 191 | 192 | saver.save(sess, os.path.join(logs_path, 'lstm_loop_count_{}.ckpt' 193 | .format(checkpoint_number + loop_counter))) 194 | 195 | print("Run the command line:\n--> tensorboard --logdir={}".format(logs_path), 196 | "\nThen open http://0.0.0.0:6006/ into your web browser") 197 | 198 | rnn.process_node_names() 199 | utility.freeze_model(sess, logs_path, tf.train.latest_checkpoint(logs_path), 200 | rnn, "lstm_train.pb", cs.LSTM_FREEZED_PB_NAME) 201 | 202 | sess.close() 203 | 204 | 205 | if __name__ == "__main__": 206 | total_start_time = time.time() 207 | BATCH_SIZE = 1 208 | train() 209 | total_end_time = time.time() 210 | print("===================================================") 211 | print("Total Execution Time =", total_end_time - total_start_time) 212 | print("===================================================") 213 | 214 | # 1748.5977 -------------------------------------------------------------------------------- /core/train_vae.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import cv2 4 | import time 5 | import argparse 6 | import numpy as np 7 | from tqdm import tqdm 8 | import tensorflow as tf 9 | from utils import utility 10 | import utils.constants as cs 11 | from models.vae import ConVAE 12 | import matplotlib.pyplot as plt 13 | from utils import os_utils, cv_utils 14 | from tensorflow.python.tools import freeze_graph 15 | 16 | 17 | def iterate_videos(path, input_format): 18 | """ 19 | Iterates through each file present in path 20 | and returns a generator that contains the path 21 | to the video files that has MPEG format 22 | 23 | :param path: string 24 | path which has to be iterated 25 | 26 | :param input_format: string 27 | data file extension which is to be iterated 28 | 29 | :return full_path: generator 30 | contains the path to video files ending with "data_format" extension 31 | """ 32 | for root, dirs, files in sorted(os.walk(path)): 33 | files = sorted(files) 34 | for file in files: 35 | if file.endswith(input_format): 36 | full_path = root + cs.Slash + file 37 | print(full_path) 38 | 39 | 40 | def get_batch(video_path): 41 | batch_x = utility.prepare_batch_frames(video_path) 42 | return batch_x 43 | 44 | 45 | def display_reconstruction_results(test_frame, reconstructed): 46 | fig, axes = plt.subplots(nrows=2, ncols=10, sharex=True, sharey=True, figsize=(20, 4)) 47 | 48 | for images, row in zip([test_frame, reconstructed], axes): 49 | for img, ax in zip(images, row): 50 | ax.imshow(img.reshape((240, 240))) 51 | ax.get_xaxis().set_visible(False) 52 | ax.get_yaxis().set_visible(False) 53 | 54 | fig.tight_layout(pad=0.1) 55 | plt.show() 56 | 57 | 58 | def write_summaries(model_object): 59 | # Create a summary to monitor training loss tensor 60 | tf.summary.scalar("loss", tf.reduce_mean(model_object.loss)) 61 | 62 | # ============================================== 63 | # Create a summary to visualize input images 64 | # ============================================== 65 | tf.summary.image("input", model_object.inputs_, 40) 66 | 67 | # =================================================== 68 | # Create a summary to visualize reconstructed images 69 | # =================================================== 70 | tf.summary.image("reconstructed", model_object.decoded, 40) 71 | 72 | # ============================================== 73 | # Create a summary to visualize Loss histogram 74 | # ============================================== 75 | tf.summary.histogram("loss_histogram", tf.reduce_mean(model_object.loss)) 76 | 77 | return tf.summary.merge_all() 78 | 79 | 80 | def train(): 81 | loading = False 82 | logs_path = cs.BASE_LOG_PATH + cs.MODEL_VAE 83 | tf.reset_default_graph() 84 | vae = ConVAE() 85 | vae.build_model() 86 | epochs = 12 87 | noise = 0.8 88 | merged_summary_op = write_summaries(vae) 89 | sess = tf.Session() 90 | saver = tf.train.Saver(max_to_keep=10) 91 | 92 | if loading: 93 | sess.run(tf.global_variables_initializer()) 94 | saver.restore(sess, tf.train.latest_checkpoint(logs_path)) 95 | latest_checkpoint_path = tf.train.latest_checkpoint(logs_path) 96 | checkpoint_number = latest_checkpoint_path.split(".")[0] 97 | checkpoint_number = int(checkpoint_number.split("_")[-1]) 98 | print("loading checkpoint_number =", checkpoint_number) 99 | 100 | else: 101 | sess.run(tf.global_variables_initializer()) 102 | checkpoint_number = 0 103 | 104 | summary_writer = tf.summary.FileWriter(logs_path, graph=sess.graph) 105 | summary_writer.add_graph(sess.graph) 106 | 107 | loop_counter = 1 108 | 109 | for e in tqdm(range(checkpoint_number, checkpoint_number+epochs)): 110 | print() 111 | path_generator = os_utils.iterate_data(cs.BASE_DATA_PATH+cs.DATA_TRAIN_VIDEOS, "mp4") 112 | batch_counter = 1 113 | start_time = time.time() 114 | 115 | for video_path in path_generator: 116 | # ====================================== 117 | # get batches to feed into the network 118 | # ====================================== 119 | batch_x = get_batch(video_path) 120 | 121 | if batch_x is None: 122 | # print("video_path", video_path) 123 | continue 124 | 125 | else: 126 | print("video_path", video_path) 127 | print("video number =", batch_counter, "..... batch_x.shape", batch_x.shape, 128 | " loop_counter =", checkpoint_number + loop_counter) 129 | 130 | g_loss, l_loss, _, summary = sess.run([vae.generation_loss, vae.latent_loss, vae.opt, merged_summary_op], 131 | feed_dict={vae.inputs_: batch_x, 132 | vae.targets_: batch_x.copy(), 133 | vae.noise_var: noise}) 134 | 135 | # ============================== 136 | # Write logs at every iteration 137 | # ============================== 138 | summary_writer.add_summary(summary, checkpoint_number + loop_counter) 139 | 140 | print("Epoch: {}/{}...".format(e+1-checkpoint_number, epochs), 141 | "Generation loss: {:.4f}".format(np.mean(g_loss)), 142 | "Latent loss: {:.4f}".format(np.mean(l_loss)), 143 | "Total loss: {:.4f}".format(np.mean(l_loss) + np.mean(g_loss))) 144 | 145 | # if batch_counter % 2 == 0: 146 | # print("saving the model at epoch", checkpoint_number + loop_counter) 147 | # saver.save(sess, os.path.join(logs_path, 'encoder_epoch_number_{}.ckpt' 148 | # .format(checkpoint_number + loop_counter))) 149 | 150 | batch_counter += 1 151 | loop_counter += 1 152 | if batch_counter == 2: 153 | end_time = time.time() 154 | print("==============================================================================================") 155 | print("Epoch Number", e, "has ended in", end_time-start_time, "seconds for", batch_counter, "videos") 156 | print("==============================================================================================") 157 | 158 | break 159 | 160 | if e % 10 == 0: 161 | print("################################################") 162 | print("saving the model at epoch", checkpoint_number + loop_counter) 163 | print("################################################") 164 | 165 | saver.save(sess, os.path.join(logs_path, 'encoder_epoch_number_{}.ckpt' 166 | .format(checkpoint_number + loop_counter))) 167 | # ========================= 168 | # Freeze the session graph 169 | # ========================= 170 | # freeze_model(sess, logs_path, tf.train.latest_checkpoint(logs_path), cae) 171 | utility.freeze_model(sess, logs_path, tf.train.latest_checkpoint(logs_path), 172 | vae, "encoder_train.pb", cs.VAE_FREEZED_PB_NAME) 173 | 174 | print("Run the command line:\n--> tensorboard --logdir={}".format(logs_path), 175 | "\nThen open http://0.0.0.0:6006/ into your web browser") 176 | 177 | path_generator = os_utils.iterate_data(cs.BASE_DATA_PATH, "mp4") 178 | 179 | for video_path in path_generator: 180 | test_frame = get_batch(video_path) 181 | 182 | if test_frame is not None: 183 | 184 | test_frame = test_frame[20:40, :, :, :] 185 | reconstructed = sess.run(vae.decoded, feed_dict={vae.inputs_: test_frame}) 186 | display_reconstruction_results(test_frame, reconstructed) 187 | 188 | break 189 | 190 | sess.close() 191 | 192 | 193 | def parse_arguments(argv): 194 | parser = argparse.ArgumentParser() 195 | 196 | parser.add_argument('epochs', type=int, 197 | help="Number epochs for which the model is to be trained", default=100) 198 | parser.add_argument('loading', type=bool, 199 | help="Load a pre-trained model or train from scratch", default=False) 200 | 201 | return parser.parse_args(argv) 202 | 203 | 204 | if __name__ == '__main__': 205 | total_start_time = time.time() 206 | train() 207 | total_end_time = time.time() 208 | print("===================================================") 209 | print("Total Execution Time =", total_end_time - total_start_time) 210 | print("===================================================") 211 | 212 | -------------------------------------------------------------------------------- /data/videos/bg_train_data/14/014_005_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/bg_train_data/14/014_005_003.mp4 -------------------------------------------------------------------------------- /data/videos/bg_train_data/14/014_006_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/bg_train_data/14/014_006_003.mp4 -------------------------------------------------------------------------------- /data/videos/bg_train_data/14/014_008_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/bg_train_data/14/014_008_002.mp4 -------------------------------------------------------------------------------- /data/videos/bg_train_data/14/014_009_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/bg_train_data/14/014_009_002.mp4 -------------------------------------------------------------------------------- /data/videos/bg_train_data/14/014_010_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/bg_train_data/14/014_010_002.mp4 -------------------------------------------------------------------------------- /data/videos/bg_train_data/15/015_001_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/bg_train_data/15/015_001_001.mp4 -------------------------------------------------------------------------------- /data/videos/bg_train_data/15/015_001_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/bg_train_data/15/015_001_002.mp4 -------------------------------------------------------------------------------- /data/videos/bg_train_data/15/015_001_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/bg_train_data/15/015_001_003.mp4 -------------------------------------------------------------------------------- /data/videos/bg_train_data/15/015_002_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/bg_train_data/15/015_002_001.mp4 -------------------------------------------------------------------------------- /data/videos/bg_train_data/15/015_002_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/bg_train_data/15/015_002_002.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/001_001_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/001_001_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/001_003_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/001_003_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/001_004_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/001_004_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/001_005_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/001_005_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/001_006_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/001_006_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/001_007_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/001_007_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/001_009_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/001_009_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/001_010_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/001_010_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/002_001_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/002_001_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/002_004_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/002_004_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/002_006_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/002_006_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/002_007_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/002_007_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/002_007_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/002_007_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/002_009_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/002_009_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/002_010_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/002_010_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/002_010_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/002_010_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/003_001_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/003_001_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/003_003_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/003_003_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/003_004_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/003_004_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/003_005_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/003_005_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/003_006_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/003_006_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/003_007_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/003_007_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/003_009_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/003_009_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/003_010_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/003_010_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/004_001_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/004_001_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/004_004_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/004_004_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/004_006_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/004_006_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/004_007_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/004_007_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/004_007_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/004_007_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/004_009_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/004_009_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/004_010_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/004_010_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/004_010_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/004_010_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/005_001_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/005_001_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/005_003_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/005_003_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/005_004_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/005_004_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/005_005_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/005_005_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/005_006_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/005_006_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/005_007_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/005_007_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/005_009_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/005_009_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/005_010_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/005_010_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/006_001_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/006_001_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/006_001_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/006_001_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/006_004_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/006_004_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/006_006_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/006_006_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/006_007_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/006_007_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/006_007_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/006_007_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/006_009_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/006_009_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/006_010_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/006_010_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/006_010_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/006_010_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/007_001_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/007_001_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/007_003_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/007_003_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/007_004_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/007_004_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/007_006_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/007_006_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/007_007_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/007_007_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/007_009_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/007_009_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/007_010_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/007_010_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/008_001_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/008_001_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/008_001_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/008_001_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/008_006_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/008_006_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/008_007_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/008_007_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/008_009_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/008_009_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/008_010_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/008_010_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/009_001_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/009_001_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/009_003_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/009_003_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/009_006_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/009_006_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/009_007_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/009_007_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/009_009_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/009_009_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/009_010_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/009_010_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/010_001_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/010_001_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/010_002_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/010_002_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/010_004_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/010_004_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/010_005_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/010_005_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/010_007_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/010_007_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/010_008_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/010_008_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/010_010_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/010_010_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/011_001_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/011_001_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/011_002_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/011_002_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/011_002_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/011_002_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/011_004_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/011_004_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/011_005_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/011_005_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/011_007_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/011_007_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/011_010_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/011_010_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/012_001_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/012_001_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/012_002_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/012_002_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/012_004_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/012_004_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/012_005_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/012_005_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/012_006_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/012_006_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/012_007_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/012_007_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/012_008_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/012_008_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/012_010_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/012_010_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/013_001_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/013_001_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/013_002_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/013_002_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/013_002_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/013_002_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/013_004_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/013_004_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/013_004_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/013_004_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/013_005_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/013_005_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/013_007_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/013_007_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/013_010_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/013_010_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/014_001_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/014_001_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/014_002_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/014_002_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/014_004_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/014_004_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/014_005_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/014_005_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/014_006_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/014_006_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/014_007_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/014_007_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/014_008_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/014_008_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/014_010_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/014_010_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/015_001_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/015_001_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/015_002_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/015_002_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/015_002_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/015_002_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/015_004_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/015_004_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/015_004_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/015_004_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/015_005_005.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/015_005_005.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/015_007_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/015_007_004.mp4 -------------------------------------------------------------------------------- /data/videos/testing_data/015_010_004.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/testing_data/015_010_004.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_001_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_001_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_001_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_001_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_001_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_001_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_002_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_002_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_002_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_002_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_002_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_002_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_003_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_003_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_003_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_003_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_003_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_003_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_004_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_004_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_004_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_004_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_004_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_004_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_005_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_005_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_005_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_005_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_005_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_005_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_006_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_006_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_006_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_006_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_006_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_006_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_007_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_007_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_007_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_007_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_007_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_007_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_008_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_008_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_008_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_008_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_008_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_008_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_009_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_009_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_009_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_009_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_009_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_009_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_010_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_010_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_010_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_010_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/01/001_010_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/01/001_010_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_001_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_001_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_001_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_001_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_001_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_001_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_002_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_002_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_002_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_002_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_002_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_002_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_003_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_003_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_003_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_003_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_003_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_003_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_004_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_004_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_004_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_004_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_004_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_004_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_005_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_005_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_005_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_005_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_005_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_005_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_006_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_006_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_006_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_006_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_007_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_007_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_007_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_007_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_007_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_007_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_008_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_008_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_008_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_008_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_008_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_008_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_009_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_009_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_009_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_009_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_009_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_009_003.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_010_001.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_010_001.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_010_002.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_010_002.mp4 -------------------------------------------------------------------------------- /data/videos/training_data/02/002_010_003.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/data/videos/training_data/02/002_010_003.mp4 -------------------------------------------------------------------------------- /extra/prepare_data.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | from utils import constants as cs 3 | from utils import utility, os_utils 4 | 5 | 6 | if __name__ == '__main__': 7 | fg_bg = cv2.createBackgroundSubtractorMOG2() 8 | IMAGE_SIZE = (12, 8) 9 | 10 | path_gen = os_utils.iterate_data(cs.BASE_DATA_PATH + cs.DATA_TRAIN_VIDEOS, ".mp4") 11 | 12 | for path in path_gen: 13 | utility.write_videos(path, cs.DATA_TRAIN_VIDEOS, cs.DATA_BG_TRAIN_VIDEO) 14 | 15 | path_gen = os_utils.iterate_test_data(cs.BASE_DATA_PATH + cs.DATA_TEST_VIDEOS, ".mp4") 16 | for path in path_gen: 17 | utility.write_videos(path, cs.DATA_TEST_VIDEOS, cs.DATA_BG_TEST_VIDEO) 18 | -------------------------------------------------------------------------------- /models/auto_enocder_1.py: -------------------------------------------------------------------------------- 1 | import tensorflow as tf 2 | from utils import utility 3 | 4 | 5 | class ConvAutoEncoder1(object): 6 | def __init__(self, summary=True): 7 | self.inputs_ = tf.placeholder(tf.float32, (None, 240, 240, 1), name='inputs') 8 | self.targets_ = tf.placeholder(tf.float32, (None, 240, 240, 1), name='targets') 9 | self.nodes = [] 10 | self.summary = summary 11 | self.decoded = None 12 | self.loss = None 13 | self.opt = None 14 | self.acc = None 15 | 16 | def build_model(self): 17 | encoded = self.encoder(self.inputs_) 18 | logits = self.decoder(encoded) 19 | self.loss = tf.nn.sigmoid_cross_entropy_with_logits(labels=self.targets_, logits=logits) 20 | self.loss = tf.reduce_mean(self.loss) 21 | self.opt = tf.train.AdamOptimizer(0.001).minimize(self.loss) 22 | self.process_node_names() 23 | 24 | def process_node_names(self): 25 | print("===================================") 26 | for i in range(len(self.nodes)): 27 | node_name, node_number = self.nodes[i].split(":") 28 | self.nodes[i] = node_name 29 | 30 | print(",".join(self.nodes)) 31 | 32 | def encoder(self, inputs_): 33 | 34 | # =============================== 35 | # Encoder 36 | # =============================== 37 | with tf.variable_scope('encoder'): 38 | 39 | # =============================== 40 | # conv1 = (?, 240, 240, 16) 41 | # =============================== 42 | conv1 = tf.layers.conv2d(inputs_, 16, (3, 3), padding='same', activation=tf.nn.leaky_relu, name="conv1") 43 | 44 | # =============================== 45 | # inception_1 = (?, 240, 240, 64) 46 | # =============================== 47 | inception_1 = utility.apply_inception(conv1, 16, 4) 48 | 49 | # =============================== 50 | # maxpool1 = (?, 120, 120, 16) 51 | # =============================== 52 | maxpool1 = tf.layers.max_pooling2d(inception_1, (2, 2), (2, 2), padding='same', name="maxpool1") 53 | 54 | # =============================== 55 | # inception_2 = (?, 120, 120, 32) 56 | # =============================== 57 | inception_2 = utility.apply_inception(maxpool1, 16, 2) 58 | 59 | # =============================== 60 | # maxpool2 = (?, 60, 60, 8) 61 | # =============================== 62 | maxpool2 = tf.layers.max_pooling2d(inception_2, (2, 2), (2, 2), padding='same', name="maxpool2") 63 | 64 | # =============================== 65 | # conv3 = (?, 60, 60, 8) 66 | # =============================== 67 | inception_3 = utility.apply_inception(maxpool2, 8, 2) 68 | 69 | # =============================== 70 | # maxpool3 = (?, 30, 30, 8) 71 | # =============================== 72 | maxpool3 = tf.layers.max_pooling2d(inception_3, (2, 2), (2, 2), padding='same', name="maxpool3") 73 | 74 | # =========================================== 75 | # Flattening maxpool3 and encoded = (?, 512) 76 | # =========================================== 77 | encoded = tf.layers.dense(tf.contrib.layers.flatten(maxpool3), 512, 78 | activation=tf.nn.leaky_relu, name="encoded") 79 | 80 | self.nodes = [conv1.name, inception_1.name, maxpool1.name, inception_2.name, 81 | maxpool2.name, inception_3.name, maxpool3.name, encoded.name] 82 | 83 | if self.summary: 84 | print(conv1.name, "=", conv1.shape) 85 | print(inception_1.name, "=", inception_1.shape) 86 | print(maxpool1.name, "=", maxpool1.shape) 87 | print(inception_2.name, "=", inception_2.shape) 88 | print(maxpool2.name, "=", maxpool2.shape) 89 | print(inception_3.name, "=", inception_3.shape) 90 | print(maxpool3.name, "=", maxpool3.shape) 91 | print(encoded.name, "=", encoded.shape) 92 | 93 | return encoded 94 | 95 | def decoder(self, encoded): 96 | 97 | # ====================== 98 | # Decoder 99 | # ====================== 100 | with tf.variable_scope('decoder'): 101 | 102 | # ====================== 103 | # dense1 = (?, 7200) 104 | # ====================== 105 | dense1 = tf.layers.dense(encoded, 30*30*8, activation=tf.nn.leaky_relu, name="dense1") 106 | 107 | # ======================== 108 | # dense1 = (?, 30, 30, 8) 109 | # ======================== 110 | reshape1 = tf.reshape(dense1, (-1, 30, 30, 8), name="c") 111 | 112 | # ======================== 113 | # conv4 = (?, 30, 30, 8) 114 | # ======================== 115 | conv4 = tf.layers.conv2d(reshape1, 8, (3, 3), padding='same', activation=tf.nn.leaky_relu, name="conv4") 116 | 117 | # ============================== 118 | # up_sample1 = (?, 60, 60, 8) 119 | # ============================== 120 | up_sample1 = tf.image.resize_nearest_neighbor(conv4, (60, 60), name="upsample1") 121 | 122 | # ============================== 123 | # conv5 = (?, 120, 120, 8) 124 | # ============================== 125 | conv5 = tf.layers.conv2d(up_sample1, 8, (3, 3), padding='same', activation=tf.nn.leaky_relu, name="conv5") 126 | 127 | # ============================== 128 | # upsample2 = (?, 120, 120, 8) 129 | # ============================== 130 | up_sample2 = tf.image.resize_nearest_neighbor(conv5, (120, 120), name="upsample2") 131 | 132 | # ============================== 133 | # conv6 = (?, 240, 240, 16) 134 | # ============================== 135 | conv6 = tf.layers.conv2d(up_sample2, 8, (3, 3), padding='same', activation=tf.nn.leaky_relu, name="conv6") 136 | 137 | # ============================== 138 | # up_sample3 = (?, 240, 240, 16) 139 | # ============================== 140 | up_sample3 = tf.image.resize_nearest_neighbor(conv6, (240, 240), name="upsample3") 141 | 142 | conv7 = tf.layers.conv2d(up_sample3, 16, (3, 3), padding='same', activation=tf.nn.leaky_relu, name="conv7") 143 | 144 | logits = tf.layers.conv2d(conv7, 1, (3, 3), padding='same', activation=None, name="logits") 145 | 146 | self.decoded = tf.nn.sigmoid(logits, name='decoded') 147 | 148 | self.nodes += [dense1.name, reshape1.name, conv4.name, up_sample1.name, conv5.name, up_sample2.name, 149 | conv6.name, up_sample3.name, conv7.name, logits.name, self.decoded.name] 150 | 151 | if self.summary: 152 | print(dense1.name, "=", dense1.shape) 153 | print(reshape1.name, "=", reshape1.shape) 154 | print(conv4.name, "=", conv4.shape) 155 | print(up_sample1.name, "=", up_sample1.shape) 156 | print(conv5.name, "=", conv5.shape) 157 | print(up_sample2.name, "=", up_sample2.shape) 158 | print(conv6.name, "=", conv6.shape) 159 | print(up_sample3.name, "=", up_sample3.shape) 160 | print(conv7.name, "=", conv7.shape) 161 | print(logits.name, "=", logits.shape) 162 | print(self.decoded.name, "=", self.decoded.shape) 163 | 164 | return logits 165 | 166 | 167 | if __name__ == "__main__": 168 | 169 | cae = ConvAutoEncoder1() 170 | cae.build_model() 171 | -------------------------------------------------------------------------------- /models/bi_lstm.py: -------------------------------------------------------------------------------- 1 | import tensorflow as tf 2 | 3 | 4 | class Bi_LSTM(object): 5 | 6 | def __init__(self, lstm_size, batch_len, output_nodes, keep_prob, learning_rate): 7 | self.inputs_ = tf.placeholder(tf.float32, shape=[batch_len, None, 512], name='lstm_inputs') 8 | self.targets_ = tf.placeholder(tf.int32, [batch_len], name='lstm_targets') 9 | self.keep_prob = tf.placeholder(tf.float32, name='keep_prob') 10 | self.learning_rate = learning_rate 11 | self.output_nodes = output_nodes 12 | self.lstm_size = lstm_size 13 | self.batch_len = batch_len 14 | self.nodes = [] 15 | self.loss = None 16 | self.output_fw = None 17 | self.output_bw = None 18 | self.optimizer = None 19 | self.y_one_hot = None 20 | self.predictions = None 21 | self.final_state_fw = None 22 | self.final_state_bw = None 23 | self.initial_state_fw = None 24 | self.initial_state_bw = None 25 | 26 | def process_node_names(self): 27 | print("===================================") 28 | for i in range(len(self.nodes)): 29 | node_name, node_number = self.nodes[i].split(":") 30 | self.nodes[i] = node_name 31 | 32 | print(",".join(self.nodes)) 33 | 34 | def build_model(self): 35 | 36 | self.initial_state_fw, cell_fw = self.lstm_layers(self.batch_len, self.keep_prob, 37 | self.lstm_size, number_of_layers=2) 38 | 39 | self.initial_state_bw, cell_bw = self.lstm_layers(self.batch_len, self.keep_prob, 40 | self.lstm_size, number_of_layers=2) 41 | 42 | outputs, states = tf.nn.bidirectional_dynamic_rnn(cell_fw=cell_fw, 43 | cell_bw=cell_bw, 44 | inputs=self.inputs_, 45 | initial_state_fw=self.initial_state_fw, 46 | initial_state_bw=self.initial_state_bw) 47 | 48 | self.output_fw, self.output_bw = outputs 49 | self.final_state_fw, self.final_state_bw = states 50 | 51 | outputs = tf.concat(outputs, 2) 52 | self.predictions = tf.contrib.layers.fully_connected(outputs[:, -1], self.output_nodes, 53 | activation_fn=tf.sigmoid) 54 | self.build_cost(self.predictions) 55 | self.build_optimizer() 56 | 57 | def build_cost(self, predictions): 58 | self.y_one_hot = tf.one_hot(self.targets_, self.output_nodes) 59 | self.y_one_hot = tf.reshape(self.y_one_hot, predictions.get_shape(), name="lstm_y_one_hot") 60 | self.loss = tf.nn.softmax_cross_entropy_with_logits_v2(logits=predictions, labels=self.y_one_hot) 61 | self.loss = tf.reduce_mean(self.loss) 62 | self.nodes = [self.inputs_.name, self.targets_.name, self.predictions.name, self.y_one_hot.name] 63 | 64 | def build_optimizer(self): 65 | self.optimizer = tf.train.AdamOptimizer(self.learning_rate).minimize(self.loss) 66 | 67 | def lstm_layers(self, batch_size, keep_prob, lstm_size, number_of_layers): 68 | 69 | def lstm_cell(): 70 | lstm_nodes = tf.contrib.rnn.BasicLSTMCell(lstm_size) 71 | 72 | drop = tf.contrib.rnn.DropoutWrapper(lstm_nodes, output_keep_prob=keep_prob) 73 | return drop 74 | 75 | rnn_layers = [lstm_cell() for _ in range(number_of_layers)] 76 | stacked_lstm = tf.contrib.rnn.MultiRNNCell(rnn_layers) 77 | initial_state = stacked_lstm.zero_state(batch_size, tf.float32) 78 | 79 | return initial_state, stacked_lstm 80 | 81 | 82 | if __name__ == '__main__': 83 | rnn = Bi_LSTM(lstm_size=128, batch_len=1, output_nodes=14, keep_prob=0.85, learning_rate=0.001) 84 | rnn.build_model() 85 | 86 | -------------------------------------------------------------------------------- /models/lstm.py: -------------------------------------------------------------------------------- 1 | import tensorflow as tf 2 | 3 | 4 | class RecurrentNetwork(object): 5 | 6 | def __init__(self, lstm_size, batch_len, output_nodes, learning_rate): 7 | self.inputs_ = tf.placeholder(tf.float32, shape=[batch_len, None, 512], name='lstm_inputs') 8 | self.targets_ = tf.placeholder(tf.int32, [batch_len], name='lstm_targets') 9 | self.keep_prob = tf.placeholder(tf.float32, name='keep_prob') 10 | self.learning_rate = learning_rate 11 | self.output_nodes = output_nodes 12 | self.lstm_size = lstm_size 13 | self.batch_len = batch_len 14 | self.nodes = [] 15 | self.loss = None 16 | self.optimizer = None 17 | self.y_one_hot = None 18 | self.predictions = None 19 | self.final_state = None 20 | self.initial_state = None 21 | 22 | def process_node_names(self): 23 | print("===================================") 24 | for i in range(len(self.nodes)): 25 | node_name, node_number = self.nodes[i].split(":") 26 | self.nodes[i] = node_name 27 | 28 | print(",".join(self.nodes)) 29 | 30 | def build_model(self): 31 | 32 | self.initial_state, cell = self.lstm_layers(self.batch_len, self.keep_prob, self.lstm_size, number_of_layers=2) 33 | 34 | outputs, state = tf.nn.dynamic_rnn(cell, self.inputs_, initial_state=self.initial_state) 35 | self.final_state = state 36 | 37 | self.predictions = tf.contrib.layers.fully_connected(outputs[:, -1], self.output_nodes, activation_fn=tf.sigmoid) 38 | 39 | self.build_cost(self.predictions) 40 | self.build_optimizer() 41 | self.process_node_names() 42 | 43 | def build_cost(self, predictions): 44 | self.y_one_hot = tf.one_hot(self.targets_, self.output_nodes) 45 | self.y_one_hot = tf.reshape(self.y_one_hot, predictions.get_shape(), name="lstm_y_one_hot") 46 | self.loss = tf.nn.softmax_cross_entropy_with_logits_v2(logits=predictions, labels=self.y_one_hot) 47 | self.loss = tf.reduce_mean(self.loss) 48 | self.nodes = [self.inputs_.name, self.targets_.name, self.predictions.name, self.y_one_hot.name] 49 | 50 | def build_optimizer(self): 51 | self.optimizer = tf.train.AdamOptimizer(self.learning_rate).minimize(self.loss) 52 | 53 | def lstm_layers(self, batch_size, keep_prob, lstm_size, number_of_layers): 54 | 55 | def lstm_cell(): 56 | lstm_nodes = tf.contrib.rnn.BasicLSTMCell(lstm_size) 57 | drop = tf.contrib.rnn.DropoutWrapper(lstm_nodes, output_keep_prob=keep_prob) 58 | return drop 59 | 60 | rnn_layers = [lstm_cell() for _ in range(number_of_layers)] 61 | stacked_lstm = tf.contrib.rnn.MultiRNNCell(rnn_layers) 62 | initial_state = stacked_lstm.zero_state(batch_size, tf.float32) 63 | 64 | return initial_state, stacked_lstm 65 | 66 | 67 | if __name__ == '__main__': 68 | rnn = RecurrentNetwork(lstm_size=128, batch_len=3, output_nodes=99, learning_rate=0.001) 69 | rnn.build_model() 70 | -------------------------------------------------------------------------------- /models/vae.py: -------------------------------------------------------------------------------- 1 | import tensorflow as tf 2 | from utils import utility 3 | 4 | 5 | class ConVAE(object): 6 | latent_loss = None 7 | generation_loss = None 8 | z_stddev = None 9 | decoded = None 10 | z_mean = None 11 | loss = None 12 | opt = None 13 | acc = None 14 | 15 | def __init__(self, summary=True): 16 | self.inputs_ = tf.placeholder(tf.float32, (None, 240, 240, 1), name='vae_inputs') 17 | self.targets_ = tf.placeholder(tf.float32, (None, 240, 240, 1), name='vae_targets') 18 | self.noise_var = tf.placeholder(tf.float32, name='noise_var') 19 | self.summary = summary 20 | self.nodes = [] 21 | self.n_z = 512 22 | 23 | def process_node_names(self): 24 | print("===================================") 25 | for i in range(len(self.nodes)): 26 | # print(self.nodes[i]) 27 | # print(self.nodes[i].split(":")) 28 | node_name, node_number = self.nodes[i].split(":") 29 | self.nodes[i] = node_name 30 | 31 | print(",".join(self.nodes)) 32 | 33 | def build_model(self): 34 | 35 | self.encoder(self.inputs_) 36 | 37 | samples = tf.random_normal([512], 0, 1, dtype=tf.float32) 38 | sampled_z = self.z_mean + (self.z_stddev * samples) 39 | 40 | self.decoder(sampled_z) 41 | self.build_loss() 42 | 43 | tvars = tf.trainable_variables() 44 | grads, _ = tf.clip_by_global_norm(tf.gradients(self.loss, tvars), 5) 45 | train_op = tf.train.AdamOptimizer(0.001) 46 | self.opt = train_op.apply_gradients(zip(grads, tvars)) 47 | 48 | def build_loss(self): 49 | generated_flat = tf.contrib.layers.flatten(self.decoded) 50 | images_ = tf.contrib.layers.flatten(self.inputs_) 51 | 52 | self.generation_loss = -tf.reduce_sum(images_ * tf.log(1e-8 + generated_flat) + 53 | (1 - images_) * tf.log(1e-8 + 1 - generated_flat), 1) 54 | 55 | self.latent_loss = (-0.5*tf.reduce_mean 56 | ((tf.reduce_mean(1 + tf.clip_by_value(self.z_stddev, -5.0, 5.0) 57 | - tf.square(tf.clip_by_value(self.z_mean, -5.0, 5.0)) 58 | - tf.exp(tf.clip_by_value(self.z_stddev, -5.0, 5.0)), 1)))) 59 | 60 | self.loss = self.generation_loss + self.latent_loss 61 | print("self.loss.shape", self.loss.shape) 62 | 63 | def encoder(self, inputs_): 64 | 65 | # =============================== 66 | # Encoder 67 | # =============================== 68 | with tf.variable_scope('encoder'): 69 | 70 | # =============================== 71 | # conv1 = (?, 240, 240, 16) 72 | # =============================== 73 | conv1 = tf.layers.conv2d(inputs_, 16, (3, 3), padding='same', activation=tf.nn.leaky_relu, name="conv1") 74 | inception_1 = utility.apply_inception(conv1, 16, 16) 75 | 76 | # =============================== 77 | # maxpool1 = (?, 120, 120, 16) 78 | # =============================== 79 | maxpool1 = tf.layers.max_pooling2d(inception_1, (2, 2), (2, 2), padding='same', name="maxpool1") 80 | 81 | # =============================== 82 | # conv2 = (?, 120, 120, 8) 83 | # =============================== 84 | conv2 = tf.layers.conv2d(maxpool1, 8, (3, 3), padding='same', activation=tf.nn.leaky_relu, name="conv2") 85 | inception_2 = utility.apply_inception(conv2, 8, 8) 86 | 87 | # =============================== 88 | # maxpool2 = (?, 60, 60, 8) 89 | # =============================== 90 | maxpool2 = tf.layers.max_pooling2d(inception_2, (2, 2), (2, 2), padding='same', name="maxpool2") 91 | 92 | # =============================== 93 | # conv3 = (?, 60, 60, 8) 94 | # =============================== 95 | conv3 = tf.layers.conv2d(maxpool2, 8, (3, 3), padding='same', activation=tf.nn.leaky_relu, name="conv3") 96 | 97 | # =============================== 98 | # maxpool3 = (?, 30, 30, 8) 99 | # =============================== 100 | maxpool3 = tf.layers.max_pooling2d(conv3, (2, 2), (2, 2), padding='same', name="maxpool3") 101 | 102 | # =========================================== 103 | # Flattening maxpool3 and encoded = (?, 1024) 104 | # =========================================== 105 | dense_1 = tf.layers.dense(tf.contrib.layers.flatten(maxpool3), 1024, activation=tf.nn.leaky_relu, name="dense_1") 106 | 107 | self.z_mean = tf.layers.dense(dense_1, self.n_z, activation=tf.nn.relu, name="z_mean") 108 | self.z_stddev = tf.layers.dense(dense_1, self.n_z, activation=tf.nn.relu, name="z_stddev") 109 | 110 | self.nodes = [conv1.name, inception_1.name, maxpool1.name, conv2.name, inception_2.name, 111 | maxpool2.name, conv3.name, maxpool3.name, self.z_mean.name, self.z_stddev.name] 112 | 113 | if self.summary: 114 | print(conv1.name, "=", conv1.shape) 115 | print(inception_2.name, "=", inception_1.shape) 116 | print(maxpool1.name, "=", maxpool1.shape) 117 | print(conv2.name, "=", conv2.shape) 118 | print(inception_2.name, "=", inception_2.shape) 119 | print(maxpool2.name, "=", maxpool2.shape) 120 | print(conv3.name, "=", conv3.shape) 121 | print(maxpool3.name, "=", maxpool3.shape) 122 | print(dense_1.name, "=", dense_1.shape) 123 | print(self.z_mean.name, "=", self.z_mean.shape) 124 | print(self.z_stddev.name, "=", self.z_stddev.shape) 125 | 126 | def decoder(self, encoded): 127 | # ====================== 128 | # Decoder 129 | # ====================== 130 | with tf.variable_scope('decoder'): 131 | # ====================================== 132 | # dense_2 = (?, 512) --> (?, 1024) 133 | # ====================================== 134 | dense_2 = tf.layers.dense(encoded, 1024, activation=tf.nn.leaky_relu, name="dense_2") 135 | 136 | # ====================================== 137 | # dense_3 = (?, 1113) --> (?, 7200) 138 | # ====================================== 139 | dense_3 = tf.layers.dense(dense_2, 30*30*8, activation=tf.nn.leaky_relu, name="dense_3") 140 | 141 | # ======================== 142 | # dense1 = (?, 30, 30, 8) 143 | # ======================== 144 | reshape1 = tf.reshape(dense_3, (-1, 30, 30, 8), name="reshaped") 145 | 146 | # ======================== 147 | # conv4 = (?, 30, 30, 8) 148 | # ======================== 149 | conv4 = tf.layers.conv2d(reshape1, 8, (3, 3), padding='same', activation=tf.nn.leaky_relu, name="conv4") 150 | 151 | # ============================== 152 | # up_sample1 = (?, 60, 60, 8) 153 | # ============================== 154 | up_sample1 = tf.image.resize_nearest_neighbor(conv4, (60, 60), name="upsample1") 155 | 156 | # ============================== 157 | # conv5 = (?, 120, 120, 8) 158 | # ============================== 159 | conv5 = tf.layers.conv2d(up_sample1, 8, (3, 3), padding='same', activation=tf.nn.leaky_relu, name="conv5") 160 | 161 | # ============================== 162 | # up_sample2 = (?, 120, 120, 8) 163 | # ============================== 164 | up_sample2 = tf.image.resize_nearest_neighbor(conv5, (120, 120), name="upsample2") 165 | 166 | # ============================== 167 | # conv6 = (?, 120, 120, 16) 168 | # ============================== 169 | conv6 = tf.layers.conv2d(up_sample2, 16, (3, 3), padding='same', activation=tf.nn.leaky_relu, name="conv6") 170 | 171 | # ============================== 172 | # up_sample3 = (?, 240, 240, 16) 173 | # ============================== 174 | up_sample3 = tf.image.resize_nearest_neighbor(conv6, (240, 240), name="upsample3") 175 | 176 | # ============================== 177 | # conv7 = (?, 240, 240, 16) 178 | # ============================== 179 | conv7 = tf.layers.conv2d(up_sample3, 16, (3, 3), padding='same', activation=tf.nn.leaky_relu, name="conv7") 180 | 181 | logits = tf.layers.conv2d(conv7, 1, (3, 3), padding='same', activation=tf.nn.sigmoid, name="logits") 182 | self.decoded = logits 183 | 184 | self.nodes += [dense_2.name, reshape1.name, conv4.name, up_sample1.name, 185 | conv5.name, up_sample2.name, conv6.name] 186 | 187 | self.nodes += [up_sample3.name, conv7.name, logits.name] 188 | 189 | if self.summary: 190 | print("encoded", encoded.shape) 191 | print(dense_2.name, "=", dense_2.shape) 192 | print(dense_3.name, "=", dense_3.shape) 193 | print(reshape1.name, "=", reshape1.shape) 194 | print(conv4.name, "=", conv4.shape) 195 | print(up_sample1.name, "=", up_sample1.shape) 196 | print(conv5.name, "=", conv5.shape) 197 | print(up_sample2.name, " =", up_sample2.shape) 198 | print(conv6.name, "=", conv6.shape) 199 | print(up_sample3.name, "=", up_sample3.shape) 200 | print(conv7.name, "=", conv7.shape) 201 | print(logits.name, "=", logits.shape) 202 | self.process_node_names() 203 | 204 | 205 | def conv2d_layer(x, filter_w, in_d, out_d): 206 | conv_w = tf.Variable(tf.truncated_normal(shape=(filter_w, filter_w, in_d, out_d), mean=0.0, stddev=0.1)) 207 | conv_b = tf.Variable(tf.zeros(out_d)) 208 | conv_layer = tf.nn.conv2d(x, conv_w, strides=[1, 2, 2, 1], padding='SAME') + conv_b 209 | return conv_layer 210 | 211 | 212 | def de_conv(inputs, out_d): 213 | conv_trans = tf.layers.conv2d_transpose(inputs, out_d, kernel_size=[3, 3], strides=(2, 2), padding='SAME') 214 | return conv_trans 215 | 216 | 217 | def dense_layer(x, in_d, out_d): 218 | w = tf.Variable(tf.truncated_normal(shape=[in_d, out_d], mean=0.0, stddev=0.1)) 219 | b = tf.Variable(tf.zeros(out_d)) 220 | return tf.matmul(x, w) + b 221 | 222 | 223 | if __name__ == "__main__": 224 | 225 | vae = ConVAE(summary=True) 226 | vae.build_model() 227 | -------------------------------------------------------------------------------- /stage1_encoder_1_graphj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/stage1_encoder_1_graphj.png -------------------------------------------------------------------------------- /utils/__pycache__/constants.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/utils/__pycache__/constants.cpython-36.pyc -------------------------------------------------------------------------------- /utils/__pycache__/cv_utils.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/utils/__pycache__/cv_utils.cpython-36.pyc -------------------------------------------------------------------------------- /utils/__pycache__/os_utils.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/utils/__pycache__/os_utils.cpython-36.pyc -------------------------------------------------------------------------------- /utils/__pycache__/utility.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayshah19949596/DeepSign-A-Deep-Learning-Architecture-for-Sign-Language-Recognition/892d57d574da0ed29130ae9dab0c74b6e6b43084/utils/__pycache__/utility.cpython-36.pyc -------------------------------------------------------------------------------- /utils/constants.py: -------------------------------------------------------------------------------- 1 | FFMPEG_EXECUTABLE = "/usr/share/applications/anaconda3/bin/ffmpeg" 2 | SLASH = "/" 3 | 4 | # ========================== 5 | # All Path constants 6 | # ========================== 7 | BASE_PROJECT_PATH = "/home/jai/Desktop/Thesis2/" 8 | BASE_DATA_PATH = BASE_PROJECT_PATH+"data/" 9 | BASE_LOG_PATH = BASE_PROJECT_PATH+"saved_models/" 10 | 11 | # ===================== 12 | # DATA Relative Path 13 | # ===================== 14 | DATA_TRAIN_VIDEOS = "videos/training_data" 15 | DATA_TEST_VIDEOS = "videos/testing_data" 16 | DATA_BG_TRAIN_VIDEO = "videos/bg_train_data" 17 | DATA_BG_TEST_VIDEO = "videos/bg_test_data" 18 | 19 | 20 | # =========================== 21 | # Saved Models Relative Path 22 | # =========================== 23 | MODEL_VAE = "vae/" 24 | MODEL_SSD = "ssd_mobilenet/" 25 | MODEL_CONV_AE_1 = "auto_encoder_1/" 26 | MODEL_LSTM = "lstm/" 27 | MODEL_BI_LSTM = "bi_lstm/" 28 | MODEL_CONV_LSTM = "conv_lstm/" 29 | MODEL_KERAS_CONV_LSTM = "keras_conv_lstm/" 30 | 31 | # =========================== 32 | # PB File Names 33 | # =========================== 34 | ENCODER1_FREEZED_PB_NAME = "encoder1_freezed.pb" 35 | LSTM_FREEZED_PB_NAME = "lstm_freezed.pb" 36 | VAE_FREEZED_PB_NAME = "vae_freezed.pb" 37 | OBJ_DET__PB_NAME = "frozen_inference_graph.pb" 38 | -------------------------------------------------------------------------------- /utils/cv_utils.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import imageio 3 | from utils import os_utils 4 | import utils.constants as cs 5 | 6 | 7 | def read_image(image_path): 8 | """ 9 | reads the image 10 | 11 | :param image_path: string 12 | image path 13 | """ 14 | return cv2.imread(image_path) 15 | 16 | 17 | def convert_gray(image): 18 | """ 19 | converts bgr image to gray image 20 | 21 | :param image: numpy array 22 | gray image 23 | """ 24 | return cv2.cvtColor(image, cv2.COLOR_RGB2GRAY) 25 | 26 | 27 | def apply_gaussian(image): 28 | """ 29 | applies a gaussian filter to the image 30 | 31 | :param image: numpy array 32 | 33 | """ 34 | return cv2.GaussianBlur(image, (5, 5), 0) 35 | 36 | 37 | def apply_canny(image, low_threshold, high_threshold): 38 | """ 39 | detects edges in the image 40 | 41 | :param image: numpy array 42 | 43 | :param low_threshold: int 44 | 45 | :param high_threshold: int 46 | 47 | """ 48 | return cv2.Canny(image, low_threshold, high_threshold) 49 | 50 | 51 | def resize(image, shape): 52 | """ 53 | returns a resize image 54 | 55 | :param image: numpy array 56 | image which is to be resize 57 | 58 | :param shape: tuple with exactly two elements (width, height) 59 | shape to which image has to be scaled 60 | 61 | 62 | """ 63 | return cv2.resize(image, shape) 64 | 65 | 66 | def equalize_hist(image): 67 | # ======================= 68 | # Histogram Equalization 69 | # ======================= 70 | image[:, :, 0] = cv2.equalizeHist(image[:, :, 0]) 71 | image[:, :, 1] = cv2.equalizeHist(image[:, :, 1]) 72 | image[:, :, 2] = cv2.equalizeHist(image[:, :, 2]) 73 | return image 74 | 75 | 76 | def show_video_in_window(video_path): 77 | video = imageio.get_reader(video_path, 'ffmpeg') 78 | for i in range(len(video)): 79 | frame = video.get_data(i) 80 | cv2.line(frame, (400, 0), (400, 1080), (255, 0, 0), 5) 81 | cv2.line(frame, (1300, 0), (1300, 1080), (255, 0, 0), 5) 82 | 83 | cv2.line(frame, (0, 100), (1920, 100), (255, 0, 0), 5) 84 | cv2.line(frame, (0, 900), (1920, 900), (255, 0, 0), 5) 85 | 86 | cv2.imshow("frame", frame) 87 | 88 | # ============================= 89 | # Press Q on keyboard to exit 90 | # ============================= 91 | if cv2.waitKey(25) & 0xFF == ord('q'): 92 | break 93 | 94 | 95 | def apply_bg_subtraction(video_path): 96 | fg_bg = cv2.createBackgroundSubtractorMOG2() 97 | video = imageio.get_reader(video_path, 'ffmpeg') 98 | for i in range(len(video)): 99 | frame = video.get_data(i) 100 | fg_mask = fg_bg.apply(frame) 101 | cv2.imshow("bg_subtraction", fg_mask) 102 | # ============================= 103 | # Press Q on keyboard to exit 104 | # ============================= 105 | if cv2.waitKey(25) & 0xFF == ord('q'): 106 | break 107 | 108 | 109 | if __name__ == '__main__': 110 | # show_video_in_window("001_001_001.mp4") 111 | # apply_bg_subtraction("001_001_001.mp4") 112 | path_gen = os_utils.iterate_data(cs.BASE_DATA_PATH + cs.DATA_TRAIN_VIDEOS, ".mp4") 113 | for path in path_gen: 114 | show_video_in_window(path) 115 | 116 | -------------------------------------------------------------------------------- /utils/os_utils.py: -------------------------------------------------------------------------------- 1 | import os 2 | from utils import cv_utils 3 | import utils.constants as cs 4 | 5 | 6 | def create_directory(directory): 7 | """ 8 | creates a directory 9 | 10 | :param directory: string 11 | directory path to be created 12 | """ 13 | os.makedirs(directory) 14 | 15 | 16 | def check_existence(directory): 17 | """Test whether a path exists. Returns False for broken symbolic links""" 18 | return os.path.exists(directory) 19 | 20 | 21 | def iterate_data(directory_path, data_format): 22 | """ 23 | Iterates through each file present in path 24 | and returns a generator that contains the path 25 | to the video files that has particular extension 26 | 27 | :param directory_path: string 28 | path which has to be iterated 29 | 30 | :param data_format: string 31 | data file extension which is to be iterated 32 | 33 | :return full_path: generator 34 | contains the path to video files ending with "data_format" extension 35 | """ 36 | for root, dirs, files in sorted(os.walk(directory_path)): 37 | for directory in sorted(dirs): 38 | for sub_root, sub_dirs, sub_files in (os.walk(os.path.join(root, directory))): 39 | sub_files = sorted(sub_files) 40 | for file in sub_files: 41 | if file.endswith(data_format) and file != data_format: 42 | full_path = sub_root + cs.SLASH + file 43 | yield full_path 44 | 45 | 46 | def iterate_test_data(directory_path, data_format): 47 | """ 48 | Iterates through each file present in path 49 | and returns a generator that contains the path 50 | to the video files that has particular extension 51 | 52 | :param directory_path: string 53 | path which has to be iterated 54 | 55 | :param data_format: string 56 | data file extension which is to be iterated 57 | 58 | :return full_path: generator 59 | contains the path to video files ending with "data_format" extension 60 | """ 61 | for root, dirs, files in sorted(os.walk(directory_path)): 62 | for file in files: 63 | full_path = root + cs.SLASH + file 64 | yield full_path 65 | 66 | 67 | if __name__ == '__main__': 68 | 69 | path_gen = iterate_data(cs.BASE_DATA_PATH + cs.DATA_TRAIN_VIDEOS, ".mp4") 70 | for path in path_gen: 71 | cv_utils.show_video_in_window(path) 72 | -------------------------------------------------------------------------------- /utils/utility.py: -------------------------------------------------------------------------------- 1 | import os 2 | import cv2 3 | import random 4 | import imageio 5 | import numpy as np 6 | import tensorflow as tf 7 | import utils.constants as cs 8 | import matplotlib.pyplot as plt 9 | from utils import cv_utils, os_utils 10 | from moviepy.editor import VideoFileClip 11 | from tensorflow.python.tools import freeze_graph 12 | 13 | 14 | def freeze_model(sess, logs_path, latest_checkpoint, model, pb_file_name, freeze_pb_file_name): 15 | """ 16 | :param sess : tensor-flow session instance which creates the all graph information 17 | 18 | :param logs_path: string 19 | directory path where the checkpoint files are stored 20 | 21 | :param latest_checkpoint: string 22 | checkpoint file path 23 | 24 | :param model: model instance for extracting the nodes explicitly 25 | 26 | :param pb_file_name: string 27 | Name of trainable pb file where the graph and weights will be stored 28 | 29 | :param freeze_pb_file_name: string 30 | Name of freeze pb file where the graph and weights will be stored 31 | 32 | """ 33 | print("logs_path =", logs_path) 34 | tf.train.write_graph(sess.graph.as_graph_def(), logs_path, pb_file_name) 35 | input_graph_path = os.path.join(logs_path, pb_file_name) 36 | input_saver_def_path = "" 37 | input_binary = False 38 | input_checkpoint_path = latest_checkpoint 39 | output_graph_path = os.path.join(logs_path, freeze_pb_file_name) 40 | clear_devices = False 41 | output_node_names = ",".join(model.nodes) 42 | restore_op_name = "save/restore_all" 43 | filename_tensor_name = "save/Const:0" 44 | initializer_nodes = "" 45 | freeze_graph.freeze_graph(input_graph_path, 46 | input_saver_def_path, 47 | input_binary, 48 | input_checkpoint_path, 49 | output_node_names, 50 | restore_op_name, 51 | filename_tensor_name, 52 | output_graph_path, 53 | clear_devices, 54 | initializer_nodes) 55 | 56 | 57 | def prepare_batch_frames(video_path): 58 | fg_bg = cv2.createBackgroundSubtractorMOG2() 59 | video = imageio.get_reader(video_path, 'ffmpeg') 60 | frame_batch = np.zeros((240, 240)) 61 | frame_batch = frame_batch.reshape((1, 240, 240)) 62 | 63 | for i in range(len(video)): 64 | frame = video.get_data(i) 65 | edged_image = cv_utils.apply_canny(frame, 50, 150) 66 | rect_pts = detect_person(frame) 67 | fg_mask = fg_bg.apply(frame) 68 | fg_mask = fg_mask[int(rect_pts[0]): int(rect_pts[2]-120), int(rect_pts[1]): int(rect_pts[3]-50)] 69 | edged_image = edged_image[int(rect_pts[0]): int(rect_pts[2]-120), int(rect_pts[1]): int(rect_pts[3]-50)] 70 | fg_mask[fg_mask > 0] = 255.0 71 | print(fg_mask.shape) 72 | fg_mask = cv2.addWeighted(fg_mask, 1, edged_image, 1, 0) 73 | # fg_mask = cv2.bitwise_and(fg_mask, edged_image) 74 | reshaped_img = cv_utils.resize(fg_mask, (240, 240)) 75 | reshaped_img = reshaped_img / 255.0 76 | cv2.imshow("bg_subtraction", reshaped_img) 77 | if cv2.waitKey(25) & 0xFF == ord('q'): 78 | break 79 | 80 | reshaped_img = reshaped_img.reshape((1, 240, 240)) 81 | frame_batch = np.vstack((frame_batch, reshaped_img)) 82 | 83 | frame_batch = frame_batch.reshape(frame_batch.shape[0], 240, 240, 1) 84 | frame_batch = frame_batch[2:, :, :, :] 85 | 86 | return frame_batch 87 | 88 | 89 | def prepare_batch_frames_from_bg_data(video_path, frame_limit=109, resize=(240, 240)): 90 | """ 91 | 92 | This function prepares batches by reading the video and extracting 93 | frames which is used as one mini-batch in training 94 | 95 | :param video_path: string 96 | path to video which is to be read 97 | 98 | :param frame_limit: int 99 | limiting the number frames which is to be returned 100 | if the number of frames in the video is > frame_limit 101 | then random sampling will be carried out to extract frames exactly of frame_limit 102 | :param resize: tuple of shape 2 elements 103 | resizing the frames 104 | :return: frame_batch : numpy array of shape (batch_size, height, width, 1) 105 | """ 106 | sampling = False 107 | video = imageio.get_reader(video_path, 'ffmpeg') 108 | frame_batch = np.zeros(resize) 109 | frame_batch = frame_batch.reshape((1, resize[0], resize[1])) 110 | if frame_limit < len(video): 111 | sampling = True 112 | sampling_list = random.sample(range(0, len(video)-1), frame_limit) 113 | 114 | for i in range(len(video)): 115 | if sampling and i not in sampling_list: 116 | continue 117 | frame = video.get_data(i) 118 | red_channel = frame[:, :, 0] 119 | red_channel = cv_utils.resize(red_channel, resize) 120 | red_channel[red_channel > 0] == 255.0 121 | red_channel = red_channel / 255.0 122 | cv2.imshow("bg_subtraction", red_channel) 123 | if cv2.waitKey(25) & 0xFF == ord('q'): 124 | break 125 | 126 | red_channel = red_channel.reshape((1, resize[0], resize[1])) 127 | frame_batch = np.vstack((frame_batch, red_channel)) 128 | 129 | frame_batch = frame_batch.reshape(frame_batch.shape[0], resize[0], resize[1], 1) 130 | frame_batch = frame_batch[2:, :, :, :] 131 | 132 | return frame_batch 133 | 134 | 135 | def load_a_frozen_model(path_to_ckpt): 136 | """ 137 | 138 | :param path_to_ckpt: string 139 | checkpoint file which contains the graph information to be loaded 140 | :return: detection_graph : tf.Graph() object 141 | : the graph information from ckpt files is loaded into this tf.Graph() object 142 | """ 143 | detection_graph = tf.Graph() 144 | with detection_graph.as_default(): 145 | od_graph_def = tf.GraphDef() 146 | with tf.gfile.GFile(path_to_ckpt, 'rb') as fid: 147 | serialized_graph = fid.read() 148 | od_graph_def.ParseFromString(serialized_graph) 149 | tf.import_graph_def(od_graph_def, name='') 150 | return detection_graph 151 | 152 | 153 | def reframe_box_masks_to_image_masks(box_masks, boxes, image_height, image_width): 154 | """Transforms the box masks back to full image masks. 155 | 156 | Embeds masks in bounding boxes of larger masks whose shapes correspond to 157 | image shape. 158 | 159 | Args: 160 | box_masks: A tf.float32 tensor of size [num_masks, mask_height, mask_width]. 161 | boxes: A tf.float32 tensor of size [num_masks, 4] containing the box 162 | corners. Row i contains [ymin, xmin, ymax, xmax] of the box 163 | corresponding to mask i. Note that the box corners are in 164 | normalized coordinates. 165 | image_height: Image height. The output mask will have the same height as 166 | the image height. 167 | image_width: Image width. The output mask will have the same width as the 168 | image width. 169 | 170 | Returns: 171 | A tf.float32 tensor of size [num_masks, image_height, image_width]. 172 | """ 173 | # TODO: Make this a public function. 174 | def transform_boxes_relative_to_boxes(boxes, reference_boxes): 175 | boxes = tf.reshape(boxes, [-1, 2, 2]) 176 | min_corner = tf.expand_dims(reference_boxes[:, 0:2], 1) 177 | max_corner = tf.expand_dims(reference_boxes[:, 2:4], 1) 178 | transformed_boxes = (boxes - min_corner) / (max_corner - min_corner) 179 | return tf.reshape(transformed_boxes, [-1, 4]) 180 | 181 | box_masks = tf.expand_dims(box_masks, axis=3) 182 | num_boxes = tf.shape(box_masks)[0] 183 | unit_boxes = tf.concat( 184 | [tf.zeros([num_boxes, 2]), tf.ones([num_boxes, 2])], axis=1) 185 | reverse_boxes = transform_boxes_relative_to_boxes(unit_boxes, boxes) 186 | image_masks = tf.image.crop_and_resize(image=box_masks, 187 | boxes=reverse_boxes, 188 | box_ind=tf.range(num_boxes), 189 | crop_size=[image_height, image_width], 190 | extrapolation_value=0.0) 191 | return tf.squeeze(image_masks, axis=3) 192 | 193 | 194 | def run_inference_for_single_image(image, graph): 195 | with graph.as_default(): 196 | with tf.Session() as sess: 197 | # Get handles to input and output tensors 198 | ops = tf.get_default_graph().get_operations() 199 | all_tensor_names = {output.name for op in ops for output in op.outputs} 200 | tensor_dict = {} 201 | for key in [ 202 | 'num_detections', 'detection_boxes', 'detection_scores', 203 | 'detection_classes', 'detection_masks' 204 | ]: 205 | tensor_name = key + ':0' 206 | if tensor_name in all_tensor_names: 207 | tensor_dict[key] = tf.get_default_graph().get_tensor_by_name( 208 | tensor_name) 209 | if 'detection_masks' in tensor_dict: 210 | # The following processing is only for single image 211 | detection_boxes = tf.squeeze(tensor_dict['detection_boxes'], [0]) 212 | detection_masks = tf.squeeze(tensor_dict['detection_masks'], [0]) 213 | # Reframe is required to translate mask from box coordinates to image coordinates and fit image size. 214 | real_num_detection = tf.cast(tensor_dict['num_detections'][0], tf.int32) 215 | detection_boxes = tf.slice(detection_boxes, [0, 0], [real_num_detection, -1]) 216 | detection_masks = tf.slice(detection_masks, [0, 0, 0], [real_num_detection, -1, -1]) 217 | detection_masks_reframed = reframe_box_masks_to_image_masks( 218 | detection_masks, detection_boxes, image.shape[0], image.shape[1]) 219 | detection_masks_reframed = tf.cast( 220 | tf.greater(detection_masks_reframed, 0.5), tf.uint8) 221 | # Follow the convention by adding back the batch dimension 222 | tensor_dict['detection_masks'] = tf.expand_dims( 223 | detection_masks_reframed, 0) 224 | image_tensor = tf.get_default_graph().get_tensor_by_name('image_tensor:0') 225 | 226 | # Run inference 227 | output_dict = sess.run(tensor_dict, 228 | feed_dict={image_tensor: np.expand_dims(image, 0)}) 229 | 230 | # all outputs are float32 numpy arrays, so convert types as appropriate 231 | output_dict['num_detections'] = int(output_dict['num_detections'][0]) 232 | output_dict['detection_classes'] = output_dict[ 233 | 'detection_classes'][0].astype(np.uint8) 234 | output_dict['detection_boxes'] = output_dict['detection_boxes'][0] 235 | output_dict['detection_scores'] = output_dict['detection_scores'][0] 236 | if 'detection_masks' in output_dict: 237 | output_dict['detection_masks'] = output_dict['detection_masks'][0] 238 | return output_dict 239 | 240 | 241 | def detect_person(image): 242 | path_to_ckpt = cs.BASE_LOG_PATH+cs.MODEL_SSD+cs.OBJ_DET__PB_NAME 243 | output_dict = run_inference_for_single_image(image, load_a_frozen_model(path_to_ckpt)) 244 | boxes = output_dict['detection_boxes'] 245 | rectangle_pts = boxes[0, :] * np.array([image.shape[0], image.shape[1], image.shape[0], image.shape[1]]) 246 | # image = image[int(rectangle_pts[0]): int(rectangle_pts[2]), int(rectangle_pts[1]): int(rectangle_pts[3])] 247 | # plt.figure(figsize=IMAGE_SIZE) 248 | # plt.imshow(image[int(rectangle_pts[0]): int(rectangle_pts[2]), int(rectangle_pts[1]): int(rectangle_pts[3])]) 249 | # plt.show() 250 | return rectangle_pts 251 | 252 | 253 | def process_image(image): 254 | edged_image = cv_utils.apply_canny(image, 50, 150) 255 | rect_pts = detect_person(image) 256 | fg_mask = fg_bg.apply(image) 257 | fg_mask = fg_mask[int(rect_pts[0]): int(rect_pts[2] - 120), int(rect_pts[1]): int(rect_pts[3] - 50)] 258 | edged_image = edged_image[int(rect_pts[0]): int(rect_pts[2] - 120), int(rect_pts[1]): int(rect_pts[3] - 50)] 259 | fg_mask[fg_mask > 0] = 255.0 260 | # print(fg_mask.shape) 261 | fg_mask = cv2.addWeighted(fg_mask, 1, edged_image, 1, 0) 262 | reshaped_img = cv_utils.resize(fg_mask, (500, 500)) 263 | reshaped_img = np.dstack((reshaped_img, np.zeros_like(reshaped_img), np.zeros_like(reshaped_img))) 264 | # cv2.imshow("bg_subtraction", reshaped_img) 265 | return reshaped_img 266 | 267 | 268 | def write_videos(video_path, sub_str_1, sub_str_2): 269 | write_op = video_path.replace(sub_str_1, sub_str_2) 270 | raw_clip = VideoFileClip(video_path) 271 | bg_clip = raw_clip.fl_image(process_image) # NOTE: this function expects color images!! 272 | bg_clip.write_videofile(write_op, audio=False) 273 | 274 | 275 | def read_video(video_path): 276 | video = imageio.get_reader(video_path, 'ffmpeg') 277 | for i in range(len(video)): 278 | frame = video.get_data(i) 279 | detect_person(frame) 280 | 281 | 282 | def maxpool_layer(x, filter_w): 283 | return tf.nn.max_pool(x, ksize=[1, filter_w, filter_w, 1], strides=[1, 1, 1, 1], padding='SAME') 284 | 285 | 286 | def maxpool_stride_layer(x, filter_w, s): 287 | return tf.nn.max_pool(x, ksize=[1, filter_w, filter_w, 1], strides=[1, s, s, 1], padding='VALID') 288 | 289 | 290 | def conv_layer(x, filter_w, in_d, out_d, is_relu, mu=0.0, sigma=0.1): 291 | conv_w = tf.Variable(tf.truncated_normal(shape=(filter_w, filter_w, in_d, out_d), mean=mu, stddev=sigma)) 292 | conv_b = tf.Variable(tf.zeros(out_d)) 293 | conv_res = tf.nn.conv2d(x, conv_w, strides=[1, 1, 1, 1], padding='SAME') + conv_b 294 | if is_relu: 295 | return tf.nn.leaky_relu(conv_res) 296 | else: 297 | return conv_res 298 | 299 | 300 | # def apply_inception(x, in_d, out_d, name): 301 | def apply_inception(x, in_d, out_d): 302 | """ This function implements the one inception layer with reduced dimensionality """ 303 | d_1x1 = 32 304 | conv1x1 = conv_layer(x, 1, in_d, out_d, True) 305 | conv2 = conv_layer(x, 1, in_d, d_1x1, True) 306 | conv3 = conv_layer(x, 1, in_d, d_1x1, True) 307 | maxpool = maxpool_layer(x, 3) 308 | conv_maxpool = conv_layer(maxpool, 1, in_d, out_d, False) 309 | conv3x3 = conv_layer(conv2, 3, d_1x1, int(out_d//2), False) 310 | conv3x3 = conv_layer(conv3x3, 1, int(out_d//2), out_d, False) 311 | conv5x5 = conv_layer(conv3, 5, d_1x1, int(out_d//2), False) 312 | conv5x5 = conv_layer(conv5x5, 1, int(out_d//2), out_d, False) 313 | # return tf.nn.leaky_relu(tf.concat([conv1x1, conv3x3, conv5x5, conv_maxpool], 3), name=name) 314 | return tf.nn.leaky_relu(tf.concat([conv1x1, conv3x3, conv5x5, conv_maxpool], 3)) 315 | 316 | 317 | if __name__ == '__main__': 318 | fg_bg = cv2.createBackgroundSubtractorMOG2() 319 | IMAGE_SIZE = (12, 8) 320 | 321 | # path_gen = os_utils.iterate_data(cs.BASE_DATA_PATH + cs.DATA_TRAIN_VIDEOS, ".mp4") 322 | # 323 | # for path in path_gen: 324 | # write_videos(path, cs.DATA_TRAIN_VIDEOS, cs.DATA_BG_TRAIN_VIDEO) 325 | 326 | path_gen = os_utils.iterate_test_data(cs.BASE_DATA_PATH + cs.DATA_TEST_VIDEOS, ".mp4") 327 | for path in path_gen: 328 | write_videos(path, cs.DATA_TEST_VIDEOS, cs.DATA_BG_TEST_VIDEO) 329 | 330 | 331 | --------------------------------------------------------------------------------