├── DSH.jpg ├── README.md ├── Sketchy ├── Image │ ├── deploy_it_128.prototxt │ ├── deploy_it_256.prototxt │ ├── deploy_it_32.prototxt │ └── deploy_it_64.prototxt ├── README.md └── Sketch │ ├── deploy_sk_128.prototxt │ ├── deploy_sk_256.prototxt │ ├── deploy_sk_32.prototxt │ └── deploy_sk_64.prototxt └── TU ├── Image ├── deploy_it_128.prototxt ├── deploy_it_256.prototxt ├── deploy_it_32.prototxt └── deploy_it_64.prototxt ├── README.md └── Sketch ├── deploy_sk_128.prototxt ├── deploy_sk_256.prototxt ├── deploy_sk_32.prototxt └── deploy_sk_64.prototxt /DSH.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ymcidence/DeepSketchHashing/edb063a8375131b94dd1144cceb05fea577bb492/DSH.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DeepSketchHashing 2 | ![alt tag](https://github.com/ymcidence/DeepSketchHashing/blob/master/DSH.jpg) 3 | ----------------------------------------------------------------------------- 4 | This is the repository for reproducing some key results for our paper 5 | 6 | - [**Deep Sketch Hashing: Fast Free-hand Sketch-Based Image Retrieval**](https://arxiv.org/abs/1703.05605.pdf) 7 | - by Li Liu, Fumin Shen, Yuming Shen, Xianglong Liu and Ling Shao 8 | 9 | to be presented on [CVPR 2017](http://cvpr2017.thecvf.com/) spotlight section. This work focuses on fast sketch-based image retrieval (SBIR) using binary codes. 10 | 11 | ## Prerequisites 12 | To produce the binary codes described in the paper, one needs to install [Caffe](http://caffe.berkeleyvision.org/) beforehand. 13 | 14 | The mid-level Sketch-Token representation is required for training the model. The codes can be found [here](https://github.com/gitlim/SketchTokens). Please refer to the following papers for more details. 15 | - [J. M. Saavedra, J. M. Barrios, and S. Orand. Sketch based image retrieval using learned keyshapes (lks). in BMVC 2015.](http://www.bmva.org/bmvc/2015/papers/paper164/paper164.pdf) 16 | - [Lim, Joseph J., C. Lawrence Zitnick, and Piotr Dollár. Sketch tokens: A learned mid-level representation for contour and object detection. in CVPR. 2013.](http://people.csail.mit.edu/lim/paper/SketchTokens_cvpr13.pdf) 17 | 18 | ## Models 19 | We provide several pretrained models on two datasets with their respective deploy files. You may try to use any of these models to produce hash code for image-sketch matching. 20 | 21 | ### [Sketchy Dataset](http://sketchy.eye.gatech.edu/) (Extended) 22 | - [64 bits](https://drive.google.com/file/d/0B2U-hnwRkpRrWkhiZEExNi1Hd1U/view?usp=sharing) 23 | - [128 bits](https://drive.google.com/file/d/0B2U-hnwRkpRrLTh2YnlvcnVORDA/view?usp=sharing) 24 | - (UPDATED 4 AUG 2017!)The extra image data mentioned in the paper can be found [here](https://drive.google.com/file/d/0B2U-hnwRkpRrdGZKTzkwbkEwVkk/view?usp=sharing) (NEW). The previous uploaded image data are wrong (apologize for this). 25 | 26 | ### [TU Berlin Sketch Dataset](http://cybertron.cg.tu-berlin.de/eitz/projects/classifysketch/) 27 | - [64 bits](https://drive.google.com/file/d/0B2U-hnwRkpRraVlzRl9Qd2M2emM/view?usp=sharing) 28 | - [128 bits](https://drive.google.com/file/d/0B2U-hnwRkpRrNi1YN1dPTXJDaW8/view?usp=sharing) 29 | - (UPDATED 21 AUG 2017!)The images of TU for our experiments can be found [here](https://drive.google.com/file/d/0B2U-hnwRkpRrMFVvTmFQa3dmSUk/view?usp=sharing). 30 | -------------------------------------------------------------------------------- /Sketchy/Image/deploy_it_128.prototxt: -------------------------------------------------------------------------------- 1 | name: "CaffeNet" 2 | 3 | input: "ST" 4 | input: "image" 5 | input_dim: 10 6 | input_dim: 3 7 | input_dim: 200 8 | input_dim: 200 9 | input_dim: 10 10 | input_dim: 3 11 | input_dim: 227 12 | input_dim: 227 13 | 14 | ################################################################################################# 15 | 16 | layer { 17 | name: "conv1-S_p" 18 | type: "Convolution" 19 | bottom: "ST" 20 | top: "conv1-S_p" 21 | param { 22 | lr_mult: 1 23 | decay_mult: 1 24 | name:"conv1-S_w" 25 | } 26 | param { 27 | lr_mult: 2 28 | name:"conv1-S_b" 29 | decay_mult: 0 30 | } 31 | convolution_param { 32 | num_output: 64 33 | kernel_size: 14 34 | stride: 3 35 | weight_filler { 36 | type: "gaussian" 37 | std: 0.01 38 | } 39 | bias_filler { 40 | type: "constant" 41 | value: 0 42 | } 43 | } 44 | } 45 | 46 | layer { 47 | name: "BN1-S_p" 48 | type: "BatchNorm" 49 | bottom: "conv1-S_p" 50 | top: "conv1bn-S_p" 51 | } 52 | 53 | layer { 54 | name: "SC1-S_p" 55 | type: "Scale" 56 | bottom: "conv1bn-S_p" 57 | top: "conv1sc-S_p" 58 | scale_param{ 59 | bias_term: true 60 | } 61 | } 62 | 63 | 64 | layer { 65 | name: "relu1-S_p" 66 | type: "ReLU" 67 | bottom: "conv1sc-S_p" 68 | top: "conv1sc-S_p" 69 | } 70 | 71 | layer { 72 | name: "pool1-S_p" 73 | type: "Pooling" 74 | bottom: "conv1sc-S_p" 75 | top: "pool1-S_p" 76 | pooling_param { 77 | pool: MAX 78 | kernel_size: 3 79 | stride: 2 80 | } 81 | } 82 | 83 | 84 | 85 | layer { 86 | name: "conv2_1-S_p" 87 | type: "Convolution" 88 | bottom: "pool1-S_p" 89 | top: "conv2_1-S_p" 90 | param { 91 | lr_mult: 1 92 | name:"conv2_1-S_w" 93 | decay_mult: 1 94 | } 95 | param { 96 | lr_mult: 2 97 | decay_mult: 0 98 | name:"conv2_1-S_b" 99 | } 100 | convolution_param { 101 | num_output: 128 102 | pad: 1 103 | kernel_size: 3 104 | stride: 1 105 | weight_filler { 106 | type: "gaussian" 107 | std: 0.01 108 | } 109 | bias_filler { 110 | type: "constant" 111 | value: 1 112 | } 113 | } 114 | } 115 | 116 | layer { 117 | name: "BN2_1-S_p" 118 | type: "BatchNorm" 119 | bottom: "conv2_1-S_p" 120 | top: "conv2_1bn-S_p" 121 | } 122 | 123 | layer { 124 | name: "SC2_1-S_p" 125 | type: "Scale" 126 | bottom: "conv2_1bn-S_p" 127 | top: "conv2_1sc-S_p" 128 | scale_param{ 129 | bias_term: true 130 | } 131 | } 132 | 133 | 134 | layer { 135 | name: "relu2_1-S_p" 136 | type: "ReLU" 137 | bottom: "conv2_1sc-S_p" 138 | top: "conv2_1sc-S_p" 139 | } 140 | 141 | 142 | 143 | 144 | 145 | 146 | layer { 147 | name: "conv2_2-S_p" 148 | type: "Convolution" 149 | bottom: "conv2_1sc-S_p" 150 | top: "conv2_2-S_p" 151 | param { 152 | lr_mult: 1 153 | decay_mult: 1 154 | name:"conv2_2-S_w" 155 | } 156 | param { 157 | lr_mult: 2 158 | decay_mult: 0 159 | name:"conv2_2-S_b" 160 | } 161 | convolution_param { 162 | num_output: 128 163 | pad: 1 164 | kernel_size: 3 165 | stride: 1 166 | weight_filler { 167 | type: "gaussian" 168 | std: 0.01 169 | } 170 | bias_filler { 171 | type: "constant" 172 | value: 1 173 | } 174 | } 175 | } 176 | 177 | layer { 178 | name: "BN2_2-S_p" 179 | type: "BatchNorm" 180 | bottom: "conv2_2-S_p" 181 | top: "conv2_2bn-S_p" 182 | } 183 | 184 | layer { 185 | name: "SC2_2-S_p" 186 | type: "Scale" 187 | bottom: "conv2_2bn-S_p" 188 | top: "conv2_2sc-S_p" 189 | scale_param{ 190 | bias_term: true 191 | } 192 | } 193 | 194 | 195 | layer { 196 | name: "relu2_2-S_p" 197 | type: "ReLU" 198 | bottom: "conv2_2sc-S_p" 199 | top: "conv2_2sc-S_p" 200 | } 201 | 202 | 203 | 204 | layer { 205 | name: "pool2-S_p" 206 | type: "Pooling" 207 | bottom: "conv2_2sc-S_p" 208 | top: "pool2-S_p" 209 | pooling_param { 210 | pool: MAX 211 | kernel_size: 3 212 | stride: 2 213 | } 214 | } 215 | 216 | 217 | 218 | 219 | 220 | layer { 221 | name: "conv3_1-S_p" 222 | type: "Convolution" 223 | bottom: "pool2-S_p" 224 | top: "conv3_1-S_p" 225 | param { 226 | lr_mult: 1 227 | decay_mult: 1 228 | name:"conv3_1-S_w" 229 | } 230 | param { 231 | lr_mult: 2 232 | decay_mult: 0 233 | name:"conv3_1-S_b" 234 | } 235 | convolution_param { 236 | num_output: 256 237 | pad: 1 238 | kernel_size: 3 239 | stride: 1 240 | weight_filler { 241 | type: "gaussian" 242 | std: 0.01 243 | } 244 | bias_filler { 245 | type: "constant" 246 | value: 1 247 | } 248 | } 249 | } 250 | 251 | layer { 252 | name: "BN3_1-S_p" 253 | type: "BatchNorm" 254 | bottom: "conv3_1-S_p" 255 | top: "conv3_1bn-S_p" 256 | } 257 | 258 | layer { 259 | name: "SC3_1-S_p" 260 | type: "Scale" 261 | bottom: "conv3_1bn-S_p" 262 | top: "conv3_1sc-S_p" 263 | scale_param{ 264 | bias_term: true 265 | } 266 | } 267 | 268 | 269 | layer { 270 | name: "relu3_1-S_p" 271 | type: "ReLU" 272 | bottom: "conv3_1sc-S_p" 273 | top: "conv3_1sc-S_p" 274 | } 275 | 276 | 277 | 278 | layer { 279 | name: "conv3_2-S_p" 280 | type: "Convolution" 281 | bottom: "conv3_1sc-S_p" 282 | top: "conv3_2-S_p" 283 | param { 284 | lr_mult: 1 285 | name:"conv3_2-S_w" 286 | decay_mult: 1 287 | } 288 | param { 289 | lr_mult: 2 290 | decay_mult: 0 291 | name:"conv3_2-S_b" 292 | } 293 | convolution_param { 294 | num_output: 256 295 | pad: 1 296 | kernel_size: 3 297 | stride: 1 298 | weight_filler { 299 | type: "gaussian" 300 | std: 0.01 301 | } 302 | bias_filler { 303 | type: "constant" 304 | value: 1 305 | } 306 | } 307 | } 308 | 309 | layer { 310 | name: "BN3_2-S_p" 311 | type: "BatchNorm" 312 | bottom: "conv3_2-S_p" 313 | top: "conv3_2bn-S_p" 314 | } 315 | 316 | layer { 317 | name: "SC3_2-S_p" 318 | type: "Scale" 319 | bottom: "conv3_2bn-S_p" 320 | top: "conv3_2sc-S_p" 321 | scale_param{ 322 | bias_term: true 323 | } 324 | } 325 | 326 | 327 | layer { 328 | name: "relu3_2-S_p" 329 | type: "ReLU" 330 | bottom: "conv3_2sc-S_p" 331 | top: "conv3_2sc-S_p" 332 | } 333 | 334 | 335 | 336 | 337 | layer { 338 | name: "pool3-S_p" 339 | type: "Pooling" 340 | bottom: "conv3_2sc-S_p" 341 | top: "pool3-S_p" 342 | pooling_param { 343 | pool: MAX 344 | kernel_size: 3 345 | stride: 2 346 | } 347 | } 348 | 349 | 350 | 351 | 352 | 353 | 354 | ############################################################################################# 355 | 356 | layer { 357 | name: "conv1" 358 | type: "Convolution" 359 | bottom: "image" 360 | top: "conv1" 361 | param { 362 | lr_mult: 1 363 | decay_mult: 1 364 | } 365 | param { 366 | lr_mult: 2 367 | decay_mult: 0 368 | } 369 | convolution_param { 370 | num_output: 96 371 | kernel_size: 11 372 | stride: 4 373 | weight_filler { 374 | type: "gaussian" 375 | std: 0.01 376 | } 377 | bias_filler { 378 | type: "constant" 379 | value: 0 380 | } 381 | } 382 | } 383 | layer { 384 | name: "relu1" 385 | type: "ReLU" 386 | bottom: "conv1" 387 | top: "conv1" 388 | } 389 | layer { 390 | name: "pool1" 391 | type: "Pooling" 392 | bottom: "conv1" 393 | top: "pool1" 394 | pooling_param { 395 | pool: MAX 396 | kernel_size: 3 397 | stride: 2 398 | } 399 | } 400 | layer { 401 | name: "norm1" 402 | type: "LRN" 403 | bottom: "pool1" 404 | top: "norm1" 405 | lrn_param { 406 | local_size: 5 407 | alpha: 0.0001 408 | beta: 0.75 409 | } 410 | } 411 | layer { 412 | name: "conv2" 413 | type: "Convolution" 414 | bottom: "norm1" 415 | top: "conv2" 416 | param { 417 | lr_mult: 1 418 | decay_mult: 1 419 | } 420 | param { 421 | lr_mult: 2 422 | decay_mult: 0 423 | } 424 | convolution_param { 425 | num_output: 256 426 | pad: 2 427 | kernel_size: 5 428 | group: 2 429 | weight_filler { 430 | type: "gaussian" 431 | std: 0.01 432 | } 433 | bias_filler { 434 | type: "constant" 435 | value: 1 436 | } 437 | } 438 | } 439 | layer { 440 | name: "relu2" 441 | type: "ReLU" 442 | bottom: "conv2" 443 | top: "conv2" 444 | } 445 | layer { 446 | name: "pool2" 447 | type: "Pooling" 448 | bottom: "conv2" 449 | top: "pool2" 450 | pooling_param { 451 | pool: MAX 452 | kernel_size: 3 453 | stride: 2 454 | } 455 | } 456 | layer { 457 | name: "norm2" 458 | type: "LRN" 459 | bottom: "pool2" 460 | top: "norm2" 461 | lrn_param { 462 | local_size: 5 463 | alpha: 0.0001 464 | beta: 0.75 465 | } 466 | } 467 | layer { 468 | name: "conv3" 469 | type: "Convolution" 470 | bottom: "norm2" 471 | top: "conv3" 472 | param { 473 | lr_mult: 1 474 | decay_mult: 1 475 | } 476 | param { 477 | lr_mult: 2 478 | decay_mult: 0 479 | } 480 | convolution_param { 481 | num_output: 384 482 | pad: 1 483 | kernel_size: 3 484 | weight_filler { 485 | type: "gaussian" 486 | std: 0.01 487 | } 488 | bias_filler { 489 | type: "constant" 490 | value: 0 491 | } 492 | } 493 | } 494 | layer { 495 | name: "relu3" 496 | type: "ReLU" 497 | bottom: "conv3" 498 | top: "conv3" 499 | } 500 | layer { 501 | name: "conv4" 502 | type: "Convolution" 503 | bottom: "conv3" 504 | top: "conv4" 505 | param { 506 | lr_mult: 1 507 | decay_mult: 1 508 | } 509 | param { 510 | lr_mult: 2 511 | decay_mult: 0 512 | } 513 | convolution_param { 514 | num_output: 384 515 | pad: 1 516 | kernel_size: 3 517 | group: 2 518 | weight_filler { 519 | type: "gaussian" 520 | std: 0.01 521 | } 522 | bias_filler { 523 | type: "constant" 524 | value: 1 525 | } 526 | } 527 | } 528 | layer { 529 | name: "relu4" 530 | type: "ReLU" 531 | bottom: "conv4" 532 | top: "conv4" 533 | } 534 | layer { 535 | name: "conv5" 536 | type: "Convolution" 537 | bottom: "conv4" 538 | top: "conv5" 539 | param { 540 | lr_mult: 1 541 | decay_mult: 1 542 | } 543 | param { 544 | lr_mult: 2 545 | decay_mult: 0 546 | } 547 | convolution_param { 548 | num_output: 256 549 | pad: 1 550 | kernel_size: 3 551 | group: 2 552 | weight_filler { 553 | type: "gaussian" 554 | std: 0.01 555 | } 556 | bias_filler { 557 | type: "constant" 558 | value: 1 559 | } 560 | } 561 | } 562 | layer { 563 | name: "relu5" 564 | type: "ReLU" 565 | bottom: "conv5" 566 | top: "conv5" 567 | } 568 | layer { 569 | name: "pool5_new" 570 | type: "Pooling" 571 | bottom: "conv5" 572 | top: "pool5_new" 573 | pooling_param { 574 | pool: MAX 575 | kernel_size: 3 576 | stride: 2 577 | pad: 1 578 | } 579 | } 580 | 581 | 582 | ###################################################################################### 583 | layer { 584 | name:"concat1" 585 | bottom:"pool3-S_p" 586 | bottom:"pool5_new" 587 | type: "Concat" 588 | top: "concat1" 589 | concat_param { 590 | axis: 1 591 | } 592 | } 593 | 594 | ###################################################################################### 595 | layer { 596 | name: "fc_a-S_new" 597 | type: "InnerProduct" 598 | bottom: "concat1" 599 | top: "fc_a-S_new" 600 | param { 601 | lr_mult: 1 602 | decay_mult: 1 603 | } 604 | param { 605 | lr_mult: 2 606 | decay_mult: 0 607 | } 608 | inner_product_param { 609 | num_output: 4096 610 | weight_filler { 611 | type: "gaussian" 612 | std: 0.005 613 | } 614 | bias_filler { 615 | type: "constant" 616 | value: 1 617 | } 618 | } 619 | } 620 | 621 | layer { 622 | name: "relu4-S_new" 623 | type: "ReLU" 624 | bottom: "fc_a-S_new" 625 | top: "fc_a-S_new" 626 | } 627 | 628 | layer { 629 | name: "drop4-S_new" 630 | type: "Dropout" 631 | bottom: "fc_a-S_new" 632 | top: "fc_a-S_new" 633 | dropout_param { 634 | dropout_ratio: 0.3 635 | } 636 | } 637 | 638 | ########################################### 639 | layer { 640 | name: "fc6_new_new" 641 | type: "InnerProduct" 642 | bottom: "concat1" 643 | top: "fc6_new_new" 644 | param { 645 | lr_mult: 1 646 | decay_mult: 1 647 | } 648 | param { 649 | lr_mult: 2 650 | decay_mult: 0 651 | } 652 | inner_product_param { 653 | num_output: 4096 654 | weight_filler { 655 | type: "gaussian" 656 | std: 0.005 657 | } 658 | bias_filler { 659 | type: "constant" 660 | value: 1 661 | } 662 | } 663 | } 664 | 665 | layer { 666 | name: "relu6_new_new" 667 | type: "ReLU" 668 | bottom: "fc6_new_new" 669 | top: "fc6_new_new" 670 | } 671 | layer { 672 | name: "drop6_new_new" 673 | type: "Dropout" 674 | bottom: "fc6_new_new" 675 | top: "fc6_new_new" 676 | dropout_param { 677 | dropout_ratio: 0.4 678 | } 679 | } 680 | 681 | ######################################################################### 682 | layer { 683 | name:"concat2" 684 | bottom:"fc_a-S_new" 685 | bottom:"fc6_new_new" 686 | type: "Concat" 687 | top: "concat2" 688 | concat_param { 689 | axis: 1 690 | } 691 | } 692 | 693 | ########################################################################## 694 | 695 | layer { 696 | name: "fc_b-S_new" 697 | type: "InnerProduct" 698 | bottom: "concat2" 699 | top: "fc_b-S_new" 700 | param { 701 | lr_mult: 1 702 | decay_mult: 1 703 | } 704 | param { 705 | lr_mult: 2 706 | decay_mult: 0 707 | } 708 | inner_product_param { 709 | num_output: 1024 710 | weight_filler { 711 | type: "gaussian" 712 | std: 0.005 713 | } 714 | bias_filler { 715 | type: "constant" 716 | value: 1 717 | } 718 | } 719 | } 720 | 721 | 722 | layer { 723 | name: "relu5-S_new" 724 | type: "ReLU" 725 | bottom: "fc_b-S_new" 726 | top: "fc_b-S_new" 727 | } 728 | 729 | layer { 730 | name: "drop5-S_new" 731 | type: "Dropout" 732 | bottom: "fc_b-S_new" 733 | top: "fc_b-S_new" 734 | dropout_param { 735 | dropout_ratio: 0.3 736 | } 737 | } 738 | 739 | ############################################################################################### 740 | 741 | layer { 742 | name: "fc7_new_new" 743 | type: "InnerProduct" 744 | bottom: "concat2" 745 | top: "fc7_new_new" 746 | param { 747 | lr_mult: 1 748 | decay_mult: 1 749 | } 750 | param { 751 | lr_mult: 2 752 | decay_mult: 0 753 | } 754 | inner_product_param { 755 | num_output: 1024 756 | weight_filler { 757 | type: "gaussian" 758 | std: 0.005 759 | } 760 | bias_filler { 761 | type: "constant" 762 | value: 1 763 | } 764 | } 765 | } 766 | layer { 767 | name: "relu7_new_new" 768 | type: "ReLU" 769 | bottom: "fc7_new_new" 770 | top: "fc7_new_new" 771 | } 772 | layer { 773 | name: "drop7_new_new" 774 | type: "Dropout" 775 | bottom: "fc7_new_new" 776 | top: "fc7_new_new" 777 | dropout_param { 778 | dropout_ratio: 0.4 779 | } 780 | } 781 | 782 | ####################################################################################################### 783 | 784 | layer { 785 | name:"concat3" 786 | bottom:"fc_b-S_new" 787 | bottom:"fc7_new_new" 788 | type: "Concat" 789 | top: "concat3" 790 | concat_param { 791 | axis: 1 792 | } 793 | } 794 | 795 | ######################################################################################################### 796 | 797 | layer { 798 | name: "fc_fuse_128" 799 | type: "InnerProduct" 800 | bottom: "concat3" 801 | top: "fc_fuse" 802 | param { 803 | lr_mult: 1 804 | decay_mult: 1 805 | } 806 | param { 807 | lr_mult: 2 808 | decay_mult: 0 809 | } 810 | inner_product_param { 811 | num_output: 128 812 | weight_filler { 813 | type: "gaussian" 814 | std: 0.01 815 | } 816 | bias_filler { 817 | type: "constant" 818 | value: 0 819 | } 820 | } 821 | } 822 | 823 | 824 | 825 | 826 | -------------------------------------------------------------------------------- /Sketchy/Image/deploy_it_256.prototxt: -------------------------------------------------------------------------------- 1 | name: "CaffeNet" 2 | 3 | input: "ST" 4 | input: "image" 5 | input_dim: 10 6 | input_dim: 3 7 | input_dim: 200 8 | input_dim: 200 9 | input_dim: 10 10 | input_dim: 3 11 | input_dim: 227 12 | input_dim: 227 13 | 14 | ################################################################################################# 15 | 16 | layer { 17 | name: "conv1-S_p" 18 | type: "Convolution" 19 | bottom: "ST" 20 | top: "conv1-S_p" 21 | param { 22 | lr_mult: 1 23 | decay_mult: 1 24 | name:"conv1-S_w" 25 | } 26 | param { 27 | lr_mult: 2 28 | name:"conv1-S_b" 29 | decay_mult: 0 30 | } 31 | convolution_param { 32 | num_output: 64 33 | kernel_size: 14 34 | stride: 3 35 | weight_filler { 36 | type: "gaussian" 37 | std: 0.01 38 | } 39 | bias_filler { 40 | type: "constant" 41 | value: 0 42 | } 43 | } 44 | } 45 | 46 | layer { 47 | name: "BN1-S_p" 48 | type: "BatchNorm" 49 | bottom: "conv1-S_p" 50 | top: "conv1bn-S_p" 51 | } 52 | 53 | layer { 54 | name: "SC1-S_p" 55 | type: "Scale" 56 | bottom: "conv1bn-S_p" 57 | top: "conv1sc-S_p" 58 | scale_param{ 59 | bias_term: true 60 | } 61 | } 62 | 63 | 64 | layer { 65 | name: "relu1-S_p" 66 | type: "ReLU" 67 | bottom: "conv1sc-S_p" 68 | top: "conv1sc-S_p" 69 | } 70 | 71 | layer { 72 | name: "pool1-S_p" 73 | type: "Pooling" 74 | bottom: "conv1sc-S_p" 75 | top: "pool1-S_p" 76 | pooling_param { 77 | pool: MAX 78 | kernel_size: 3 79 | stride: 2 80 | } 81 | } 82 | 83 | 84 | 85 | layer { 86 | name: "conv2_1-S_p" 87 | type: "Convolution" 88 | bottom: "pool1-S_p" 89 | top: "conv2_1-S_p" 90 | param { 91 | lr_mult: 1 92 | name:"conv2_1-S_w" 93 | decay_mult: 1 94 | } 95 | param { 96 | lr_mult: 2 97 | decay_mult: 0 98 | name:"conv2_1-S_b" 99 | } 100 | convolution_param { 101 | num_output: 128 102 | pad: 1 103 | kernel_size: 3 104 | stride: 1 105 | weight_filler { 106 | type: "gaussian" 107 | std: 0.01 108 | } 109 | bias_filler { 110 | type: "constant" 111 | value: 1 112 | } 113 | } 114 | } 115 | 116 | layer { 117 | name: "BN2_1-S_p" 118 | type: "BatchNorm" 119 | bottom: "conv2_1-S_p" 120 | top: "conv2_1bn-S_p" 121 | } 122 | 123 | layer { 124 | name: "SC2_1-S_p" 125 | type: "Scale" 126 | bottom: "conv2_1bn-S_p" 127 | top: "conv2_1sc-S_p" 128 | scale_param{ 129 | bias_term: true 130 | } 131 | } 132 | 133 | 134 | layer { 135 | name: "relu2_1-S_p" 136 | type: "ReLU" 137 | bottom: "conv2_1sc-S_p" 138 | top: "conv2_1sc-S_p" 139 | } 140 | 141 | 142 | 143 | 144 | 145 | 146 | layer { 147 | name: "conv2_2-S_p" 148 | type: "Convolution" 149 | bottom: "conv2_1sc-S_p" 150 | top: "conv2_2-S_p" 151 | param { 152 | lr_mult: 1 153 | decay_mult: 1 154 | name:"conv2_2-S_w" 155 | } 156 | param { 157 | lr_mult: 2 158 | decay_mult: 0 159 | name:"conv2_2-S_b" 160 | } 161 | convolution_param { 162 | num_output: 128 163 | pad: 1 164 | kernel_size: 3 165 | stride: 1 166 | weight_filler { 167 | type: "gaussian" 168 | std: 0.01 169 | } 170 | bias_filler { 171 | type: "constant" 172 | value: 1 173 | } 174 | } 175 | } 176 | 177 | layer { 178 | name: "BN2_2-S_p" 179 | type: "BatchNorm" 180 | bottom: "conv2_2-S_p" 181 | top: "conv2_2bn-S_p" 182 | } 183 | 184 | layer { 185 | name: "SC2_2-S_p" 186 | type: "Scale" 187 | bottom: "conv2_2bn-S_p" 188 | top: "conv2_2sc-S_p" 189 | scale_param{ 190 | bias_term: true 191 | } 192 | } 193 | 194 | 195 | layer { 196 | name: "relu2_2-S_p" 197 | type: "ReLU" 198 | bottom: "conv2_2sc-S_p" 199 | top: "conv2_2sc-S_p" 200 | } 201 | 202 | 203 | 204 | layer { 205 | name: "pool2-S_p" 206 | type: "Pooling" 207 | bottom: "conv2_2sc-S_p" 208 | top: "pool2-S_p" 209 | pooling_param { 210 | pool: MAX 211 | kernel_size: 3 212 | stride: 2 213 | } 214 | } 215 | 216 | 217 | 218 | 219 | 220 | layer { 221 | name: "conv3_1-S_p" 222 | type: "Convolution" 223 | bottom: "pool2-S_p" 224 | top: "conv3_1-S_p" 225 | param { 226 | lr_mult: 1 227 | decay_mult: 1 228 | name:"conv3_1-S_w" 229 | } 230 | param { 231 | lr_mult: 2 232 | decay_mult: 0 233 | name:"conv3_1-S_b" 234 | } 235 | convolution_param { 236 | num_output: 256 237 | pad: 1 238 | kernel_size: 3 239 | stride: 1 240 | weight_filler { 241 | type: "gaussian" 242 | std: 0.01 243 | } 244 | bias_filler { 245 | type: "constant" 246 | value: 1 247 | } 248 | } 249 | } 250 | 251 | layer { 252 | name: "BN3_1-S_p" 253 | type: "BatchNorm" 254 | bottom: "conv3_1-S_p" 255 | top: "conv3_1bn-S_p" 256 | } 257 | 258 | layer { 259 | name: "SC3_1-S_p" 260 | type: "Scale" 261 | bottom: "conv3_1bn-S_p" 262 | top: "conv3_1sc-S_p" 263 | scale_param{ 264 | bias_term: true 265 | } 266 | } 267 | 268 | 269 | layer { 270 | name: "relu3_1-S_p" 271 | type: "ReLU" 272 | bottom: "conv3_1sc-S_p" 273 | top: "conv3_1sc-S_p" 274 | } 275 | 276 | 277 | 278 | layer { 279 | name: "conv3_2-S_p" 280 | type: "Convolution" 281 | bottom: "conv3_1sc-S_p" 282 | top: "conv3_2-S_p" 283 | param { 284 | lr_mult: 1 285 | name:"conv3_2-S_w" 286 | decay_mult: 1 287 | } 288 | param { 289 | lr_mult: 2 290 | decay_mult: 0 291 | name:"conv3_2-S_b" 292 | } 293 | convolution_param { 294 | num_output: 256 295 | pad: 1 296 | kernel_size: 3 297 | stride: 1 298 | weight_filler { 299 | type: "gaussian" 300 | std: 0.01 301 | } 302 | bias_filler { 303 | type: "constant" 304 | value: 1 305 | } 306 | } 307 | } 308 | 309 | layer { 310 | name: "BN3_2-S_p" 311 | type: "BatchNorm" 312 | bottom: "conv3_2-S_p" 313 | top: "conv3_2bn-S_p" 314 | } 315 | 316 | layer { 317 | name: "SC3_2-S_p" 318 | type: "Scale" 319 | bottom: "conv3_2bn-S_p" 320 | top: "conv3_2sc-S_p" 321 | scale_param{ 322 | bias_term: true 323 | } 324 | } 325 | 326 | 327 | layer { 328 | name: "relu3_2-S_p" 329 | type: "ReLU" 330 | bottom: "conv3_2sc-S_p" 331 | top: "conv3_2sc-S_p" 332 | } 333 | 334 | 335 | 336 | 337 | layer { 338 | name: "pool3-S_p" 339 | type: "Pooling" 340 | bottom: "conv3_2sc-S_p" 341 | top: "pool3-S_p" 342 | pooling_param { 343 | pool: MAX 344 | kernel_size: 3 345 | stride: 2 346 | } 347 | } 348 | 349 | 350 | 351 | 352 | 353 | 354 | ############################################################################################# 355 | 356 | layer { 357 | name: "conv1" 358 | type: "Convolution" 359 | bottom: "image" 360 | top: "conv1" 361 | param { 362 | lr_mult: 1 363 | decay_mult: 1 364 | } 365 | param { 366 | lr_mult: 2 367 | decay_mult: 0 368 | } 369 | convolution_param { 370 | num_output: 96 371 | kernel_size: 11 372 | stride: 4 373 | weight_filler { 374 | type: "gaussian" 375 | std: 0.01 376 | } 377 | bias_filler { 378 | type: "constant" 379 | value: 0 380 | } 381 | } 382 | } 383 | layer { 384 | name: "relu1" 385 | type: "ReLU" 386 | bottom: "conv1" 387 | top: "conv1" 388 | } 389 | layer { 390 | name: "pool1" 391 | type: "Pooling" 392 | bottom: "conv1" 393 | top: "pool1" 394 | pooling_param { 395 | pool: MAX 396 | kernel_size: 3 397 | stride: 2 398 | } 399 | } 400 | layer { 401 | name: "norm1" 402 | type: "LRN" 403 | bottom: "pool1" 404 | top: "norm1" 405 | lrn_param { 406 | local_size: 5 407 | alpha: 0.0001 408 | beta: 0.75 409 | } 410 | } 411 | layer { 412 | name: "conv2" 413 | type: "Convolution" 414 | bottom: "norm1" 415 | top: "conv2" 416 | param { 417 | lr_mult: 1 418 | decay_mult: 1 419 | } 420 | param { 421 | lr_mult: 2 422 | decay_mult: 0 423 | } 424 | convolution_param { 425 | num_output: 256 426 | pad: 2 427 | kernel_size: 5 428 | group: 2 429 | weight_filler { 430 | type: "gaussian" 431 | std: 0.01 432 | } 433 | bias_filler { 434 | type: "constant" 435 | value: 1 436 | } 437 | } 438 | } 439 | layer { 440 | name: "relu2" 441 | type: "ReLU" 442 | bottom: "conv2" 443 | top: "conv2" 444 | } 445 | layer { 446 | name: "pool2" 447 | type: "Pooling" 448 | bottom: "conv2" 449 | top: "pool2" 450 | pooling_param { 451 | pool: MAX 452 | kernel_size: 3 453 | stride: 2 454 | } 455 | } 456 | layer { 457 | name: "norm2" 458 | type: "LRN" 459 | bottom: "pool2" 460 | top: "norm2" 461 | lrn_param { 462 | local_size: 5 463 | alpha: 0.0001 464 | beta: 0.75 465 | } 466 | } 467 | layer { 468 | name: "conv3" 469 | type: "Convolution" 470 | bottom: "norm2" 471 | top: "conv3" 472 | param { 473 | lr_mult: 1 474 | decay_mult: 1 475 | } 476 | param { 477 | lr_mult: 2 478 | decay_mult: 0 479 | } 480 | convolution_param { 481 | num_output: 384 482 | pad: 1 483 | kernel_size: 3 484 | weight_filler { 485 | type: "gaussian" 486 | std: 0.01 487 | } 488 | bias_filler { 489 | type: "constant" 490 | value: 0 491 | } 492 | } 493 | } 494 | layer { 495 | name: "relu3" 496 | type: "ReLU" 497 | bottom: "conv3" 498 | top: "conv3" 499 | } 500 | layer { 501 | name: "conv4" 502 | type: "Convolution" 503 | bottom: "conv3" 504 | top: "conv4" 505 | param { 506 | lr_mult: 1 507 | decay_mult: 1 508 | } 509 | param { 510 | lr_mult: 2 511 | decay_mult: 0 512 | } 513 | convolution_param { 514 | num_output: 384 515 | pad: 1 516 | kernel_size: 3 517 | group: 2 518 | weight_filler { 519 | type: "gaussian" 520 | std: 0.01 521 | } 522 | bias_filler { 523 | type: "constant" 524 | value: 1 525 | } 526 | } 527 | } 528 | layer { 529 | name: "relu4" 530 | type: "ReLU" 531 | bottom: "conv4" 532 | top: "conv4" 533 | } 534 | layer { 535 | name: "conv5" 536 | type: "Convolution" 537 | bottom: "conv4" 538 | top: "conv5" 539 | param { 540 | lr_mult: 1 541 | decay_mult: 1 542 | } 543 | param { 544 | lr_mult: 2 545 | decay_mult: 0 546 | } 547 | convolution_param { 548 | num_output: 256 549 | pad: 1 550 | kernel_size: 3 551 | group: 2 552 | weight_filler { 553 | type: "gaussian" 554 | std: 0.01 555 | } 556 | bias_filler { 557 | type: "constant" 558 | value: 1 559 | } 560 | } 561 | } 562 | layer { 563 | name: "relu5" 564 | type: "ReLU" 565 | bottom: "conv5" 566 | top: "conv5" 567 | } 568 | layer { 569 | name: "pool5_new" 570 | type: "Pooling" 571 | bottom: "conv5" 572 | top: "pool5_new" 573 | pooling_param { 574 | pool: MAX 575 | kernel_size: 3 576 | stride: 2 577 | pad: 1 578 | } 579 | } 580 | 581 | 582 | ###################################################################################### 583 | layer { 584 | name:"concat1" 585 | bottom:"pool3-S_p" 586 | bottom:"pool5_new" 587 | type: "Concat" 588 | top: "concat1" 589 | concat_param { 590 | axis: 1 591 | } 592 | } 593 | 594 | ###################################################################################### 595 | layer { 596 | name: "fc_a-S_new" 597 | type: "InnerProduct" 598 | bottom: "concat1" 599 | top: "fc_a-S_new" 600 | param { 601 | lr_mult: 1 602 | decay_mult: 1 603 | } 604 | param { 605 | lr_mult: 2 606 | decay_mult: 0 607 | } 608 | inner_product_param { 609 | num_output: 4096 610 | weight_filler { 611 | type: "gaussian" 612 | std: 0.005 613 | } 614 | bias_filler { 615 | type: "constant" 616 | value: 1 617 | } 618 | } 619 | } 620 | 621 | layer { 622 | name: "relu4-S_new" 623 | type: "ReLU" 624 | bottom: "fc_a-S_new" 625 | top: "fc_a-S_new" 626 | } 627 | 628 | layer { 629 | name: "drop4-S_new" 630 | type: "Dropout" 631 | bottom: "fc_a-S_new" 632 | top: "fc_a-S_new" 633 | dropout_param { 634 | dropout_ratio: 0.3 635 | } 636 | } 637 | 638 | ########################################### 639 | layer { 640 | name: "fc6_new_new" 641 | type: "InnerProduct" 642 | bottom: "concat1" 643 | top: "fc6_new_new" 644 | param { 645 | lr_mult: 1 646 | decay_mult: 1 647 | } 648 | param { 649 | lr_mult: 2 650 | decay_mult: 0 651 | } 652 | inner_product_param { 653 | num_output: 4096 654 | weight_filler { 655 | type: "gaussian" 656 | std: 0.005 657 | } 658 | bias_filler { 659 | type: "constant" 660 | value: 1 661 | } 662 | } 663 | } 664 | 665 | layer { 666 | name: "relu6_new_new" 667 | type: "ReLU" 668 | bottom: "fc6_new_new" 669 | top: "fc6_new_new" 670 | } 671 | layer { 672 | name: "drop6_new_new" 673 | type: "Dropout" 674 | bottom: "fc6_new_new" 675 | top: "fc6_new_new" 676 | dropout_param { 677 | dropout_ratio: 0.4 678 | } 679 | } 680 | 681 | ######################################################################### 682 | layer { 683 | name:"concat2" 684 | bottom:"fc_a-S_new" 685 | bottom:"fc6_new_new" 686 | type: "Concat" 687 | top: "concat2" 688 | concat_param { 689 | axis: 1 690 | } 691 | } 692 | 693 | ########################################################################## 694 | 695 | layer { 696 | name: "fc_b-S_new" 697 | type: "InnerProduct" 698 | bottom: "concat2" 699 | top: "fc_b-S_new" 700 | param { 701 | lr_mult: 1 702 | decay_mult: 1 703 | } 704 | param { 705 | lr_mult: 2 706 | decay_mult: 0 707 | } 708 | inner_product_param { 709 | num_output: 1024 710 | weight_filler { 711 | type: "gaussian" 712 | std: 0.005 713 | } 714 | bias_filler { 715 | type: "constant" 716 | value: 1 717 | } 718 | } 719 | } 720 | 721 | 722 | layer { 723 | name: "relu5-S_new" 724 | type: "ReLU" 725 | bottom: "fc_b-S_new" 726 | top: "fc_b-S_new" 727 | } 728 | 729 | layer { 730 | name: "drop5-S_new" 731 | type: "Dropout" 732 | bottom: "fc_b-S_new" 733 | top: "fc_b-S_new" 734 | dropout_param { 735 | dropout_ratio: 0.3 736 | } 737 | } 738 | 739 | ############################################################################################### 740 | 741 | layer { 742 | name: "fc7_new_new" 743 | type: "InnerProduct" 744 | bottom: "concat2" 745 | top: "fc7_new_new" 746 | param { 747 | lr_mult: 1 748 | decay_mult: 1 749 | } 750 | param { 751 | lr_mult: 2 752 | decay_mult: 0 753 | } 754 | inner_product_param { 755 | num_output: 1024 756 | weight_filler { 757 | type: "gaussian" 758 | std: 0.005 759 | } 760 | bias_filler { 761 | type: "constant" 762 | value: 1 763 | } 764 | } 765 | } 766 | layer { 767 | name: "relu7_new_new" 768 | type: "ReLU" 769 | bottom: "fc7_new_new" 770 | top: "fc7_new_new" 771 | } 772 | layer { 773 | name: "drop7_new_new" 774 | type: "Dropout" 775 | bottom: "fc7_new_new" 776 | top: "fc7_new_new" 777 | dropout_param { 778 | dropout_ratio: 0.4 779 | } 780 | } 781 | 782 | ####################################################################################################### 783 | 784 | layer { 785 | name:"concat3" 786 | bottom:"fc_b-S_new" 787 | bottom:"fc7_new_new" 788 | type: "Concat" 789 | top: "concat3" 790 | concat_param { 791 | axis: 1 792 | } 793 | } 794 | 795 | ######################################################################################################### 796 | 797 | layer { 798 | name: "fc_fuse_256" 799 | type: "InnerProduct" 800 | bottom: "concat3" 801 | top: "fc_fuse" 802 | param { 803 | lr_mult: 1 804 | decay_mult: 1 805 | } 806 | param { 807 | lr_mult: 2 808 | decay_mult: 0 809 | } 810 | inner_product_param { 811 | num_output: 256 812 | weight_filler { 813 | type: "gaussian" 814 | std: 0.01 815 | } 816 | bias_filler { 817 | type: "constant" 818 | value: 0 819 | } 820 | } 821 | } 822 | 823 | 824 | 825 | 826 | -------------------------------------------------------------------------------- /Sketchy/Image/deploy_it_32.prototxt: -------------------------------------------------------------------------------- 1 | name: "CaffeNet" 2 | 3 | input: "ST" 4 | input: "image" 5 | input_dim: 10 6 | input_dim: 3 7 | input_dim: 200 8 | input_dim: 200 9 | input_dim: 10 10 | input_dim: 3 11 | input_dim: 227 12 | input_dim: 227 13 | 14 | ################################################################################################# 15 | 16 | layer { 17 | name: "conv1-S_p" 18 | type: "Convolution" 19 | bottom: "ST" 20 | top: "conv1-S_p" 21 | param { 22 | lr_mult: 1 23 | decay_mult: 1 24 | name:"conv1-S_w" 25 | } 26 | param { 27 | lr_mult: 2 28 | name:"conv1-S_b" 29 | decay_mult: 0 30 | } 31 | convolution_param { 32 | num_output: 64 33 | kernel_size: 14 34 | stride: 3 35 | weight_filler { 36 | type: "gaussian" 37 | std: 0.01 38 | } 39 | bias_filler { 40 | type: "constant" 41 | value: 0 42 | } 43 | } 44 | } 45 | 46 | layer { 47 | name: "BN1-S_p" 48 | type: "BatchNorm" 49 | bottom: "conv1-S_p" 50 | top: "conv1bn-S_p" 51 | } 52 | 53 | layer { 54 | name: "SC1-S_p" 55 | type: "Scale" 56 | bottom: "conv1bn-S_p" 57 | top: "conv1sc-S_p" 58 | scale_param{ 59 | bias_term: true 60 | } 61 | } 62 | 63 | 64 | layer { 65 | name: "relu1-S_p" 66 | type: "ReLU" 67 | bottom: "conv1sc-S_p" 68 | top: "conv1sc-S_p" 69 | } 70 | 71 | layer { 72 | name: "pool1-S_p" 73 | type: "Pooling" 74 | bottom: "conv1sc-S_p" 75 | top: "pool1-S_p" 76 | pooling_param { 77 | pool: MAX 78 | kernel_size: 3 79 | stride: 2 80 | } 81 | } 82 | 83 | 84 | 85 | layer { 86 | name: "conv2_1-S_p" 87 | type: "Convolution" 88 | bottom: "pool1-S_p" 89 | top: "conv2_1-S_p" 90 | param { 91 | lr_mult: 1 92 | name:"conv2_1-S_w" 93 | decay_mult: 1 94 | } 95 | param { 96 | lr_mult: 2 97 | decay_mult: 0 98 | name:"conv2_1-S_b" 99 | } 100 | convolution_param { 101 | num_output: 128 102 | pad: 1 103 | kernel_size: 3 104 | stride: 1 105 | weight_filler { 106 | type: "gaussian" 107 | std: 0.01 108 | } 109 | bias_filler { 110 | type: "constant" 111 | value: 1 112 | } 113 | } 114 | } 115 | 116 | layer { 117 | name: "BN2_1-S_p" 118 | type: "BatchNorm" 119 | bottom: "conv2_1-S_p" 120 | top: "conv2_1bn-S_p" 121 | } 122 | 123 | layer { 124 | name: "SC2_1-S_p" 125 | type: "Scale" 126 | bottom: "conv2_1bn-S_p" 127 | top: "conv2_1sc-S_p" 128 | scale_param{ 129 | bias_term: true 130 | } 131 | } 132 | 133 | 134 | layer { 135 | name: "relu2_1-S_p" 136 | type: "ReLU" 137 | bottom: "conv2_1sc-S_p" 138 | top: "conv2_1sc-S_p" 139 | } 140 | 141 | 142 | 143 | 144 | 145 | 146 | layer { 147 | name: "conv2_2-S_p" 148 | type: "Convolution" 149 | bottom: "conv2_1sc-S_p" 150 | top: "conv2_2-S_p" 151 | param { 152 | lr_mult: 1 153 | decay_mult: 1 154 | name:"conv2_2-S_w" 155 | } 156 | param { 157 | lr_mult: 2 158 | decay_mult: 0 159 | name:"conv2_2-S_b" 160 | } 161 | convolution_param { 162 | num_output: 128 163 | pad: 1 164 | kernel_size: 3 165 | stride: 1 166 | weight_filler { 167 | type: "gaussian" 168 | std: 0.01 169 | } 170 | bias_filler { 171 | type: "constant" 172 | value: 1 173 | } 174 | } 175 | } 176 | 177 | layer { 178 | name: "BN2_2-S_p" 179 | type: "BatchNorm" 180 | bottom: "conv2_2-S_p" 181 | top: "conv2_2bn-S_p" 182 | } 183 | 184 | layer { 185 | name: "SC2_2-S_p" 186 | type: "Scale" 187 | bottom: "conv2_2bn-S_p" 188 | top: "conv2_2sc-S_p" 189 | scale_param{ 190 | bias_term: true 191 | } 192 | } 193 | 194 | 195 | layer { 196 | name: "relu2_2-S_p" 197 | type: "ReLU" 198 | bottom: "conv2_2sc-S_p" 199 | top: "conv2_2sc-S_p" 200 | } 201 | 202 | 203 | 204 | layer { 205 | name: "pool2-S_p" 206 | type: "Pooling" 207 | bottom: "conv2_2sc-S_p" 208 | top: "pool2-S_p" 209 | pooling_param { 210 | pool: MAX 211 | kernel_size: 3 212 | stride: 2 213 | } 214 | } 215 | 216 | 217 | 218 | 219 | 220 | layer { 221 | name: "conv3_1-S_p" 222 | type: "Convolution" 223 | bottom: "pool2-S_p" 224 | top: "conv3_1-S_p" 225 | param { 226 | lr_mult: 1 227 | decay_mult: 1 228 | name:"conv3_1-S_w" 229 | } 230 | param { 231 | lr_mult: 2 232 | decay_mult: 0 233 | name:"conv3_1-S_b" 234 | } 235 | convolution_param { 236 | num_output: 256 237 | pad: 1 238 | kernel_size: 3 239 | stride: 1 240 | weight_filler { 241 | type: "gaussian" 242 | std: 0.01 243 | } 244 | bias_filler { 245 | type: "constant" 246 | value: 1 247 | } 248 | } 249 | } 250 | 251 | layer { 252 | name: "BN3_1-S_p" 253 | type: "BatchNorm" 254 | bottom: "conv3_1-S_p" 255 | top: "conv3_1bn-S_p" 256 | } 257 | 258 | layer { 259 | name: "SC3_1-S_p" 260 | type: "Scale" 261 | bottom: "conv3_1bn-S_p" 262 | top: "conv3_1sc-S_p" 263 | scale_param{ 264 | bias_term: true 265 | } 266 | } 267 | 268 | 269 | layer { 270 | name: "relu3_1-S_p" 271 | type: "ReLU" 272 | bottom: "conv3_1sc-S_p" 273 | top: "conv3_1sc-S_p" 274 | } 275 | 276 | 277 | 278 | layer { 279 | name: "conv3_2-S_p" 280 | type: "Convolution" 281 | bottom: "conv3_1sc-S_p" 282 | top: "conv3_2-S_p" 283 | param { 284 | lr_mult: 1 285 | name:"conv3_2-S_w" 286 | decay_mult: 1 287 | } 288 | param { 289 | lr_mult: 2 290 | decay_mult: 0 291 | name:"conv3_2-S_b" 292 | } 293 | convolution_param { 294 | num_output: 256 295 | pad: 1 296 | kernel_size: 3 297 | stride: 1 298 | weight_filler { 299 | type: "gaussian" 300 | std: 0.01 301 | } 302 | bias_filler { 303 | type: "constant" 304 | value: 1 305 | } 306 | } 307 | } 308 | 309 | layer { 310 | name: "BN3_2-S_p" 311 | type: "BatchNorm" 312 | bottom: "conv3_2-S_p" 313 | top: "conv3_2bn-S_p" 314 | } 315 | 316 | layer { 317 | name: "SC3_2-S_p" 318 | type: "Scale" 319 | bottom: "conv3_2bn-S_p" 320 | top: "conv3_2sc-S_p" 321 | scale_param{ 322 | bias_term: true 323 | } 324 | } 325 | 326 | 327 | layer { 328 | name: "relu3_2-S_p" 329 | type: "ReLU" 330 | bottom: "conv3_2sc-S_p" 331 | top: "conv3_2sc-S_p" 332 | } 333 | 334 | 335 | 336 | 337 | layer { 338 | name: "pool3-S_p" 339 | type: "Pooling" 340 | bottom: "conv3_2sc-S_p" 341 | top: "pool3-S_p" 342 | pooling_param { 343 | pool: MAX 344 | kernel_size: 3 345 | stride: 2 346 | } 347 | } 348 | 349 | 350 | 351 | 352 | 353 | 354 | ############################################################################################# 355 | 356 | layer { 357 | name: "conv1" 358 | type: "Convolution" 359 | bottom: "image" 360 | top: "conv1" 361 | param { 362 | lr_mult: 1 363 | decay_mult: 1 364 | } 365 | param { 366 | lr_mult: 2 367 | decay_mult: 0 368 | } 369 | convolution_param { 370 | num_output: 96 371 | kernel_size: 11 372 | stride: 4 373 | weight_filler { 374 | type: "gaussian" 375 | std: 0.01 376 | } 377 | bias_filler { 378 | type: "constant" 379 | value: 0 380 | } 381 | } 382 | } 383 | layer { 384 | name: "relu1" 385 | type: "ReLU" 386 | bottom: "conv1" 387 | top: "conv1" 388 | } 389 | layer { 390 | name: "pool1" 391 | type: "Pooling" 392 | bottom: "conv1" 393 | top: "pool1" 394 | pooling_param { 395 | pool: MAX 396 | kernel_size: 3 397 | stride: 2 398 | } 399 | } 400 | layer { 401 | name: "norm1" 402 | type: "LRN" 403 | bottom: "pool1" 404 | top: "norm1" 405 | lrn_param { 406 | local_size: 5 407 | alpha: 0.0001 408 | beta: 0.75 409 | } 410 | } 411 | layer { 412 | name: "conv2" 413 | type: "Convolution" 414 | bottom: "norm1" 415 | top: "conv2" 416 | param { 417 | lr_mult: 1 418 | decay_mult: 1 419 | } 420 | param { 421 | lr_mult: 2 422 | decay_mult: 0 423 | } 424 | convolution_param { 425 | num_output: 256 426 | pad: 2 427 | kernel_size: 5 428 | group: 2 429 | weight_filler { 430 | type: "gaussian" 431 | std: 0.01 432 | } 433 | bias_filler { 434 | type: "constant" 435 | value: 1 436 | } 437 | } 438 | } 439 | layer { 440 | name: "relu2" 441 | type: "ReLU" 442 | bottom: "conv2" 443 | top: "conv2" 444 | } 445 | layer { 446 | name: "pool2" 447 | type: "Pooling" 448 | bottom: "conv2" 449 | top: "pool2" 450 | pooling_param { 451 | pool: MAX 452 | kernel_size: 3 453 | stride: 2 454 | } 455 | } 456 | layer { 457 | name: "norm2" 458 | type: "LRN" 459 | bottom: "pool2" 460 | top: "norm2" 461 | lrn_param { 462 | local_size: 5 463 | alpha: 0.0001 464 | beta: 0.75 465 | } 466 | } 467 | layer { 468 | name: "conv3" 469 | type: "Convolution" 470 | bottom: "norm2" 471 | top: "conv3" 472 | param { 473 | lr_mult: 1 474 | decay_mult: 1 475 | } 476 | param { 477 | lr_mult: 2 478 | decay_mult: 0 479 | } 480 | convolution_param { 481 | num_output: 384 482 | pad: 1 483 | kernel_size: 3 484 | weight_filler { 485 | type: "gaussian" 486 | std: 0.01 487 | } 488 | bias_filler { 489 | type: "constant" 490 | value: 0 491 | } 492 | } 493 | } 494 | layer { 495 | name: "relu3" 496 | type: "ReLU" 497 | bottom: "conv3" 498 | top: "conv3" 499 | } 500 | layer { 501 | name: "conv4" 502 | type: "Convolution" 503 | bottom: "conv3" 504 | top: "conv4" 505 | param { 506 | lr_mult: 1 507 | decay_mult: 1 508 | } 509 | param { 510 | lr_mult: 2 511 | decay_mult: 0 512 | } 513 | convolution_param { 514 | num_output: 384 515 | pad: 1 516 | kernel_size: 3 517 | group: 2 518 | weight_filler { 519 | type: "gaussian" 520 | std: 0.01 521 | } 522 | bias_filler { 523 | type: "constant" 524 | value: 1 525 | } 526 | } 527 | } 528 | layer { 529 | name: "relu4" 530 | type: "ReLU" 531 | bottom: "conv4" 532 | top: "conv4" 533 | } 534 | layer { 535 | name: "conv5" 536 | type: "Convolution" 537 | bottom: "conv4" 538 | top: "conv5" 539 | param { 540 | lr_mult: 1 541 | decay_mult: 1 542 | } 543 | param { 544 | lr_mult: 2 545 | decay_mult: 0 546 | } 547 | convolution_param { 548 | num_output: 256 549 | pad: 1 550 | kernel_size: 3 551 | group: 2 552 | weight_filler { 553 | type: "gaussian" 554 | std: 0.01 555 | } 556 | bias_filler { 557 | type: "constant" 558 | value: 1 559 | } 560 | } 561 | } 562 | layer { 563 | name: "relu5" 564 | type: "ReLU" 565 | bottom: "conv5" 566 | top: "conv5" 567 | } 568 | layer { 569 | name: "pool5_new" 570 | type: "Pooling" 571 | bottom: "conv5" 572 | top: "pool5_new" 573 | pooling_param { 574 | pool: MAX 575 | kernel_size: 3 576 | stride: 2 577 | pad: 1 578 | } 579 | } 580 | 581 | 582 | ###################################################################################### 583 | layer { 584 | name:"concat1" 585 | bottom:"pool3-S_p" 586 | bottom:"pool5_new" 587 | type: "Concat" 588 | top: "concat1" 589 | concat_param { 590 | axis: 1 591 | } 592 | } 593 | 594 | ###################################################################################### 595 | layer { 596 | name: "fc_a-S_new" 597 | type: "InnerProduct" 598 | bottom: "concat1" 599 | top: "fc_a-S_new" 600 | param { 601 | lr_mult: 1 602 | decay_mult: 1 603 | } 604 | param { 605 | lr_mult: 2 606 | decay_mult: 0 607 | } 608 | inner_product_param { 609 | num_output: 4096 610 | weight_filler { 611 | type: "gaussian" 612 | std: 0.005 613 | } 614 | bias_filler { 615 | type: "constant" 616 | value: 1 617 | } 618 | } 619 | } 620 | 621 | layer { 622 | name: "relu4-S_new" 623 | type: "ReLU" 624 | bottom: "fc_a-S_new" 625 | top: "fc_a-S_new" 626 | } 627 | 628 | layer { 629 | name: "drop4-S_new" 630 | type: "Dropout" 631 | bottom: "fc_a-S_new" 632 | top: "fc_a-S_new" 633 | dropout_param { 634 | dropout_ratio: 0.3 635 | } 636 | } 637 | 638 | ########################################### 639 | layer { 640 | name: "fc6_new_new" 641 | type: "InnerProduct" 642 | bottom: "concat1" 643 | top: "fc6_new_new" 644 | param { 645 | lr_mult: 1 646 | decay_mult: 1 647 | } 648 | param { 649 | lr_mult: 2 650 | decay_mult: 0 651 | } 652 | inner_product_param { 653 | num_output: 4096 654 | weight_filler { 655 | type: "gaussian" 656 | std: 0.005 657 | } 658 | bias_filler { 659 | type: "constant" 660 | value: 1 661 | } 662 | } 663 | } 664 | 665 | layer { 666 | name: "relu6_new_new" 667 | type: "ReLU" 668 | bottom: "fc6_new_new" 669 | top: "fc6_new_new" 670 | } 671 | layer { 672 | name: "drop6_new_new" 673 | type: "Dropout" 674 | bottom: "fc6_new_new" 675 | top: "fc6_new_new" 676 | dropout_param { 677 | dropout_ratio: 0.4 678 | } 679 | } 680 | 681 | ######################################################################### 682 | layer { 683 | name:"concat2" 684 | bottom:"fc_a-S_new" 685 | bottom:"fc6_new_new" 686 | type: "Concat" 687 | top: "concat2" 688 | concat_param { 689 | axis: 1 690 | } 691 | } 692 | 693 | ########################################################################## 694 | 695 | layer { 696 | name: "fc_b-S_new" 697 | type: "InnerProduct" 698 | bottom: "concat2" 699 | top: "fc_b-S_new" 700 | param { 701 | lr_mult: 1 702 | decay_mult: 1 703 | } 704 | param { 705 | lr_mult: 2 706 | decay_mult: 0 707 | } 708 | inner_product_param { 709 | num_output: 1024 710 | weight_filler { 711 | type: "gaussian" 712 | std: 0.005 713 | } 714 | bias_filler { 715 | type: "constant" 716 | value: 1 717 | } 718 | } 719 | } 720 | 721 | 722 | layer { 723 | name: "relu5-S_new" 724 | type: "ReLU" 725 | bottom: "fc_b-S_new" 726 | top: "fc_b-S_new" 727 | } 728 | 729 | layer { 730 | name: "drop5-S_new" 731 | type: "Dropout" 732 | bottom: "fc_b-S_new" 733 | top: "fc_b-S_new" 734 | dropout_param { 735 | dropout_ratio: 0.3 736 | } 737 | } 738 | 739 | ############################################################################################### 740 | 741 | layer { 742 | name: "fc7_new_new" 743 | type: "InnerProduct" 744 | bottom: "concat2" 745 | top: "fc7_new_new" 746 | param { 747 | lr_mult: 1 748 | decay_mult: 1 749 | } 750 | param { 751 | lr_mult: 2 752 | decay_mult: 0 753 | } 754 | inner_product_param { 755 | num_output: 1024 756 | weight_filler { 757 | type: "gaussian" 758 | std: 0.005 759 | } 760 | bias_filler { 761 | type: "constant" 762 | value: 1 763 | } 764 | } 765 | } 766 | layer { 767 | name: "relu7_new_new" 768 | type: "ReLU" 769 | bottom: "fc7_new_new" 770 | top: "fc7_new_new" 771 | } 772 | layer { 773 | name: "drop7_new_new" 774 | type: "Dropout" 775 | bottom: "fc7_new_new" 776 | top: "fc7_new_new" 777 | dropout_param { 778 | dropout_ratio: 0.4 779 | } 780 | } 781 | 782 | ####################################################################################################### 783 | 784 | layer { 785 | name:"concat3" 786 | bottom:"fc_b-S_new" 787 | bottom:"fc7_new_new" 788 | type: "Concat" 789 | top: "concat3" 790 | concat_param { 791 | axis: 1 792 | } 793 | } 794 | 795 | ######################################################################################################### 796 | 797 | layer { 798 | name: "fc_fuse_32" 799 | type: "InnerProduct" 800 | bottom: "concat3" 801 | top: "fc_fuse" 802 | param { 803 | lr_mult: 1 804 | decay_mult: 1 805 | } 806 | param { 807 | lr_mult: 2 808 | decay_mult: 0 809 | } 810 | inner_product_param { 811 | num_output: 32 812 | weight_filler { 813 | type: "gaussian" 814 | std: 0.01 815 | } 816 | bias_filler { 817 | type: "constant" 818 | value: 0 819 | } 820 | } 821 | } 822 | 823 | 824 | 825 | 826 | -------------------------------------------------------------------------------- /Sketchy/Image/deploy_it_64.prototxt: -------------------------------------------------------------------------------- 1 | name: "CaffeNet" 2 | 3 | input: "ST" 4 | input: "image" 5 | input_dim: 10 6 | input_dim: 3 7 | input_dim: 200 8 | input_dim: 200 9 | input_dim: 10 10 | input_dim: 3 11 | input_dim: 227 12 | input_dim: 227 13 | 14 | ################################################################################################# 15 | 16 | layer { 17 | name: "conv1-S_p" 18 | type: "Convolution" 19 | bottom: "ST" 20 | top: "conv1-S_p" 21 | param { 22 | lr_mult: 1 23 | decay_mult: 1 24 | name:"conv1-S_w" 25 | } 26 | param { 27 | lr_mult: 2 28 | name:"conv1-S_b" 29 | decay_mult: 0 30 | } 31 | convolution_param { 32 | num_output: 64 33 | kernel_size: 14 34 | stride: 3 35 | weight_filler { 36 | type: "gaussian" 37 | std: 0.01 38 | } 39 | bias_filler { 40 | type: "constant" 41 | value: 0 42 | } 43 | } 44 | } 45 | 46 | layer { 47 | name: "BN1-S_p" 48 | type: "BatchNorm" 49 | bottom: "conv1-S_p" 50 | top: "conv1bn-S_p" 51 | } 52 | 53 | layer { 54 | name: "SC1-S_p" 55 | type: "Scale" 56 | bottom: "conv1bn-S_p" 57 | top: "conv1sc-S_p" 58 | scale_param{ 59 | bias_term: true 60 | } 61 | } 62 | 63 | 64 | layer { 65 | name: "relu1-S_p" 66 | type: "ReLU" 67 | bottom: "conv1sc-S_p" 68 | top: "conv1sc-S_p" 69 | } 70 | 71 | layer { 72 | name: "pool1-S_p" 73 | type: "Pooling" 74 | bottom: "conv1sc-S_p" 75 | top: "pool1-S_p" 76 | pooling_param { 77 | pool: MAX 78 | kernel_size: 3 79 | stride: 2 80 | } 81 | } 82 | 83 | 84 | 85 | layer { 86 | name: "conv2_1-S_p" 87 | type: "Convolution" 88 | bottom: "pool1-S_p" 89 | top: "conv2_1-S_p" 90 | param { 91 | lr_mult: 1 92 | name:"conv2_1-S_w" 93 | decay_mult: 1 94 | } 95 | param { 96 | lr_mult: 2 97 | decay_mult: 0 98 | name:"conv2_1-S_b" 99 | } 100 | convolution_param { 101 | num_output: 128 102 | pad: 1 103 | kernel_size: 3 104 | stride: 1 105 | weight_filler { 106 | type: "gaussian" 107 | std: 0.01 108 | } 109 | bias_filler { 110 | type: "constant" 111 | value: 1 112 | } 113 | } 114 | } 115 | 116 | layer { 117 | name: "BN2_1-S_p" 118 | type: "BatchNorm" 119 | bottom: "conv2_1-S_p" 120 | top: "conv2_1bn-S_p" 121 | } 122 | 123 | layer { 124 | name: "SC2_1-S_p" 125 | type: "Scale" 126 | bottom: "conv2_1bn-S_p" 127 | top: "conv2_1sc-S_p" 128 | scale_param{ 129 | bias_term: true 130 | } 131 | } 132 | 133 | 134 | layer { 135 | name: "relu2_1-S_p" 136 | type: "ReLU" 137 | bottom: "conv2_1sc-S_p" 138 | top: "conv2_1sc-S_p" 139 | } 140 | 141 | 142 | 143 | 144 | 145 | 146 | layer { 147 | name: "conv2_2-S_p" 148 | type: "Convolution" 149 | bottom: "conv2_1sc-S_p" 150 | top: "conv2_2-S_p" 151 | param { 152 | lr_mult: 1 153 | decay_mult: 1 154 | name:"conv2_2-S_w" 155 | } 156 | param { 157 | lr_mult: 2 158 | decay_mult: 0 159 | name:"conv2_2-S_b" 160 | } 161 | convolution_param { 162 | num_output: 128 163 | pad: 1 164 | kernel_size: 3 165 | stride: 1 166 | weight_filler { 167 | type: "gaussian" 168 | std: 0.01 169 | } 170 | bias_filler { 171 | type: "constant" 172 | value: 1 173 | } 174 | } 175 | } 176 | 177 | layer { 178 | name: "BN2_2-S_p" 179 | type: "BatchNorm" 180 | bottom: "conv2_2-S_p" 181 | top: "conv2_2bn-S_p" 182 | } 183 | 184 | layer { 185 | name: "SC2_2-S_p" 186 | type: "Scale" 187 | bottom: "conv2_2bn-S_p" 188 | top: "conv2_2sc-S_p" 189 | scale_param{ 190 | bias_term: true 191 | } 192 | } 193 | 194 | 195 | layer { 196 | name: "relu2_2-S_p" 197 | type: "ReLU" 198 | bottom: "conv2_2sc-S_p" 199 | top: "conv2_2sc-S_p" 200 | } 201 | 202 | 203 | 204 | layer { 205 | name: "pool2-S_p" 206 | type: "Pooling" 207 | bottom: "conv2_2sc-S_p" 208 | top: "pool2-S_p" 209 | pooling_param { 210 | pool: MAX 211 | kernel_size: 3 212 | stride: 2 213 | } 214 | } 215 | 216 | 217 | 218 | 219 | 220 | layer { 221 | name: "conv3_1-S_p" 222 | type: "Convolution" 223 | bottom: "pool2-S_p" 224 | top: "conv3_1-S_p" 225 | param { 226 | lr_mult: 1 227 | decay_mult: 1 228 | name:"conv3_1-S_w" 229 | } 230 | param { 231 | lr_mult: 2 232 | decay_mult: 0 233 | name:"conv3_1-S_b" 234 | } 235 | convolution_param { 236 | num_output: 256 237 | pad: 1 238 | kernel_size: 3 239 | stride: 1 240 | weight_filler { 241 | type: "gaussian" 242 | std: 0.01 243 | } 244 | bias_filler { 245 | type: "constant" 246 | value: 1 247 | } 248 | } 249 | } 250 | 251 | layer { 252 | name: "BN3_1-S_p" 253 | type: "BatchNorm" 254 | bottom: "conv3_1-S_p" 255 | top: "conv3_1bn-S_p" 256 | } 257 | 258 | layer { 259 | name: "SC3_1-S_p" 260 | type: "Scale" 261 | bottom: "conv3_1bn-S_p" 262 | top: "conv3_1sc-S_p" 263 | scale_param{ 264 | bias_term: true 265 | } 266 | } 267 | 268 | 269 | layer { 270 | name: "relu3_1-S_p" 271 | type: "ReLU" 272 | bottom: "conv3_1sc-S_p" 273 | top: "conv3_1sc-S_p" 274 | } 275 | 276 | 277 | 278 | layer { 279 | name: "conv3_2-S_p" 280 | type: "Convolution" 281 | bottom: "conv3_1sc-S_p" 282 | top: "conv3_2-S_p" 283 | param { 284 | lr_mult: 1 285 | name:"conv3_2-S_w" 286 | decay_mult: 1 287 | } 288 | param { 289 | lr_mult: 2 290 | decay_mult: 0 291 | name:"conv3_2-S_b" 292 | } 293 | convolution_param { 294 | num_output: 256 295 | pad: 1 296 | kernel_size: 3 297 | stride: 1 298 | weight_filler { 299 | type: "gaussian" 300 | std: 0.01 301 | } 302 | bias_filler { 303 | type: "constant" 304 | value: 1 305 | } 306 | } 307 | } 308 | 309 | layer { 310 | name: "BN3_2-S_p" 311 | type: "BatchNorm" 312 | bottom: "conv3_2-S_p" 313 | top: "conv3_2bn-S_p" 314 | } 315 | 316 | layer { 317 | name: "SC3_2-S_p" 318 | type: "Scale" 319 | bottom: "conv3_2bn-S_p" 320 | top: "conv3_2sc-S_p" 321 | scale_param{ 322 | bias_term: true 323 | } 324 | } 325 | 326 | 327 | layer { 328 | name: "relu3_2-S_p" 329 | type: "ReLU" 330 | bottom: "conv3_2sc-S_p" 331 | top: "conv3_2sc-S_p" 332 | } 333 | 334 | 335 | 336 | 337 | layer { 338 | name: "pool3-S_p" 339 | type: "Pooling" 340 | bottom: "conv3_2sc-S_p" 341 | top: "pool3-S_p" 342 | pooling_param { 343 | pool: MAX 344 | kernel_size: 3 345 | stride: 2 346 | } 347 | } 348 | 349 | 350 | 351 | 352 | 353 | 354 | ############################################################################################# 355 | 356 | layer { 357 | name: "conv1" 358 | type: "Convolution" 359 | bottom: "image" 360 | top: "conv1" 361 | param { 362 | lr_mult: 1 363 | decay_mult: 1 364 | } 365 | param { 366 | lr_mult: 2 367 | decay_mult: 0 368 | } 369 | convolution_param { 370 | num_output: 96 371 | kernel_size: 11 372 | stride: 4 373 | weight_filler { 374 | type: "gaussian" 375 | std: 0.01 376 | } 377 | bias_filler { 378 | type: "constant" 379 | value: 0 380 | } 381 | } 382 | } 383 | layer { 384 | name: "relu1" 385 | type: "ReLU" 386 | bottom: "conv1" 387 | top: "conv1" 388 | } 389 | layer { 390 | name: "pool1" 391 | type: "Pooling" 392 | bottom: "conv1" 393 | top: "pool1" 394 | pooling_param { 395 | pool: MAX 396 | kernel_size: 3 397 | stride: 2 398 | } 399 | } 400 | layer { 401 | name: "norm1" 402 | type: "LRN" 403 | bottom: "pool1" 404 | top: "norm1" 405 | lrn_param { 406 | local_size: 5 407 | alpha: 0.0001 408 | beta: 0.75 409 | } 410 | } 411 | layer { 412 | name: "conv2" 413 | type: "Convolution" 414 | bottom: "norm1" 415 | top: "conv2" 416 | param { 417 | lr_mult: 1 418 | decay_mult: 1 419 | } 420 | param { 421 | lr_mult: 2 422 | decay_mult: 0 423 | } 424 | convolution_param { 425 | num_output: 256 426 | pad: 2 427 | kernel_size: 5 428 | group: 2 429 | weight_filler { 430 | type: "gaussian" 431 | std: 0.01 432 | } 433 | bias_filler { 434 | type: "constant" 435 | value: 1 436 | } 437 | } 438 | } 439 | layer { 440 | name: "relu2" 441 | type: "ReLU" 442 | bottom: "conv2" 443 | top: "conv2" 444 | } 445 | layer { 446 | name: "pool2" 447 | type: "Pooling" 448 | bottom: "conv2" 449 | top: "pool2" 450 | pooling_param { 451 | pool: MAX 452 | kernel_size: 3 453 | stride: 2 454 | } 455 | } 456 | layer { 457 | name: "norm2" 458 | type: "LRN" 459 | bottom: "pool2" 460 | top: "norm2" 461 | lrn_param { 462 | local_size: 5 463 | alpha: 0.0001 464 | beta: 0.75 465 | } 466 | } 467 | layer { 468 | name: "conv3" 469 | type: "Convolution" 470 | bottom: "norm2" 471 | top: "conv3" 472 | param { 473 | lr_mult: 1 474 | decay_mult: 1 475 | } 476 | param { 477 | lr_mult: 2 478 | decay_mult: 0 479 | } 480 | convolution_param { 481 | num_output: 384 482 | pad: 1 483 | kernel_size: 3 484 | weight_filler { 485 | type: "gaussian" 486 | std: 0.01 487 | } 488 | bias_filler { 489 | type: "constant" 490 | value: 0 491 | } 492 | } 493 | } 494 | layer { 495 | name: "relu3" 496 | type: "ReLU" 497 | bottom: "conv3" 498 | top: "conv3" 499 | } 500 | layer { 501 | name: "conv4" 502 | type: "Convolution" 503 | bottom: "conv3" 504 | top: "conv4" 505 | param { 506 | lr_mult: 1 507 | decay_mult: 1 508 | } 509 | param { 510 | lr_mult: 2 511 | decay_mult: 0 512 | } 513 | convolution_param { 514 | num_output: 384 515 | pad: 1 516 | kernel_size: 3 517 | group: 2 518 | weight_filler { 519 | type: "gaussian" 520 | std: 0.01 521 | } 522 | bias_filler { 523 | type: "constant" 524 | value: 1 525 | } 526 | } 527 | } 528 | layer { 529 | name: "relu4" 530 | type: "ReLU" 531 | bottom: "conv4" 532 | top: "conv4" 533 | } 534 | layer { 535 | name: "conv5" 536 | type: "Convolution" 537 | bottom: "conv4" 538 | top: "conv5" 539 | param { 540 | lr_mult: 1 541 | decay_mult: 1 542 | } 543 | param { 544 | lr_mult: 2 545 | decay_mult: 0 546 | } 547 | convolution_param { 548 | num_output: 256 549 | pad: 1 550 | kernel_size: 3 551 | group: 2 552 | weight_filler { 553 | type: "gaussian" 554 | std: 0.01 555 | } 556 | bias_filler { 557 | type: "constant" 558 | value: 1 559 | } 560 | } 561 | } 562 | layer { 563 | name: "relu5" 564 | type: "ReLU" 565 | bottom: "conv5" 566 | top: "conv5" 567 | } 568 | layer { 569 | name: "pool5_new" 570 | type: "Pooling" 571 | bottom: "conv5" 572 | top: "pool5_new" 573 | pooling_param { 574 | pool: MAX 575 | kernel_size: 3 576 | stride: 2 577 | pad: 1 578 | } 579 | } 580 | 581 | 582 | ###################################################################################### 583 | layer { 584 | name:"concat1" 585 | bottom:"pool3-S_p" 586 | bottom:"pool5_new" 587 | type: "Concat" 588 | top: "concat1" 589 | concat_param { 590 | axis: 1 591 | } 592 | } 593 | 594 | ###################################################################################### 595 | layer { 596 | name: "fc_a-S_new" 597 | type: "InnerProduct" 598 | bottom: "concat1" 599 | top: "fc_a-S_new" 600 | param { 601 | lr_mult: 1 602 | decay_mult: 1 603 | } 604 | param { 605 | lr_mult: 2 606 | decay_mult: 0 607 | } 608 | inner_product_param { 609 | num_output: 4096 610 | weight_filler { 611 | type: "gaussian" 612 | std: 0.005 613 | } 614 | bias_filler { 615 | type: "constant" 616 | value: 1 617 | } 618 | } 619 | } 620 | 621 | layer { 622 | name: "relu4-S_new" 623 | type: "ReLU" 624 | bottom: "fc_a-S_new" 625 | top: "fc_a-S_new" 626 | } 627 | 628 | layer { 629 | name: "drop4-S_new" 630 | type: "Dropout" 631 | bottom: "fc_a-S_new" 632 | top: "fc_a-S_new" 633 | dropout_param { 634 | dropout_ratio: 0.3 635 | } 636 | } 637 | 638 | ########################################### 639 | layer { 640 | name: "fc6_new_new" 641 | type: "InnerProduct" 642 | bottom: "concat1" 643 | top: "fc6_new_new" 644 | param { 645 | lr_mult: 1 646 | decay_mult: 1 647 | } 648 | param { 649 | lr_mult: 2 650 | decay_mult: 0 651 | } 652 | inner_product_param { 653 | num_output: 4096 654 | weight_filler { 655 | type: "gaussian" 656 | std: 0.005 657 | } 658 | bias_filler { 659 | type: "constant" 660 | value: 1 661 | } 662 | } 663 | } 664 | 665 | layer { 666 | name: "relu6_new_new" 667 | type: "ReLU" 668 | bottom: "fc6_new_new" 669 | top: "fc6_new_new" 670 | } 671 | layer { 672 | name: "drop6_new_new" 673 | type: "Dropout" 674 | bottom: "fc6_new_new" 675 | top: "fc6_new_new" 676 | dropout_param { 677 | dropout_ratio: 0.4 678 | } 679 | } 680 | 681 | ######################################################################### 682 | layer { 683 | name:"concat2" 684 | bottom:"fc_a-S_new" 685 | bottom:"fc6_new_new" 686 | type: "Concat" 687 | top: "concat2" 688 | concat_param { 689 | axis: 1 690 | } 691 | } 692 | 693 | ########################################################################## 694 | 695 | layer { 696 | name: "fc_b-S_new" 697 | type: "InnerProduct" 698 | bottom: "concat2" 699 | top: "fc_b-S_new" 700 | param { 701 | lr_mult: 1 702 | decay_mult: 1 703 | } 704 | param { 705 | lr_mult: 2 706 | decay_mult: 0 707 | } 708 | inner_product_param { 709 | num_output: 1024 710 | weight_filler { 711 | type: "gaussian" 712 | std: 0.005 713 | } 714 | bias_filler { 715 | type: "constant" 716 | value: 1 717 | } 718 | } 719 | } 720 | 721 | 722 | layer { 723 | name: "relu5-S_new" 724 | type: "ReLU" 725 | bottom: "fc_b-S_new" 726 | top: "fc_b-S_new" 727 | } 728 | 729 | layer { 730 | name: "drop5-S_new" 731 | type: "Dropout" 732 | bottom: "fc_b-S_new" 733 | top: "fc_b-S_new" 734 | dropout_param { 735 | dropout_ratio: 0.3 736 | } 737 | } 738 | 739 | ############################################################################################### 740 | 741 | layer { 742 | name: "fc7_new_new" 743 | type: "InnerProduct" 744 | bottom: "concat2" 745 | top: "fc7_new_new" 746 | param { 747 | lr_mult: 1 748 | decay_mult: 1 749 | } 750 | param { 751 | lr_mult: 2 752 | decay_mult: 0 753 | } 754 | inner_product_param { 755 | num_output: 1024 756 | weight_filler { 757 | type: "gaussian" 758 | std: 0.005 759 | } 760 | bias_filler { 761 | type: "constant" 762 | value: 1 763 | } 764 | } 765 | } 766 | layer { 767 | name: "relu7_new_new" 768 | type: "ReLU" 769 | bottom: "fc7_new_new" 770 | top: "fc7_new_new" 771 | } 772 | layer { 773 | name: "drop7_new_new" 774 | type: "Dropout" 775 | bottom: "fc7_new_new" 776 | top: "fc7_new_new" 777 | dropout_param { 778 | dropout_ratio: 0.4 779 | } 780 | } 781 | 782 | ####################################################################################################### 783 | 784 | layer { 785 | name:"concat3" 786 | bottom:"fc_b-S_new" 787 | bottom:"fc7_new_new" 788 | type: "Concat" 789 | top: "concat3" 790 | concat_param { 791 | axis: 1 792 | } 793 | } 794 | 795 | ######################################################################################################### 796 | 797 | layer { 798 | name: "fc_fuse_64" 799 | type: "InnerProduct" 800 | bottom: "concat3" 801 | top: "fc_fuse" 802 | param { 803 | lr_mult: 1 804 | decay_mult: 1 805 | } 806 | param { 807 | lr_mult: 2 808 | decay_mult: 0 809 | } 810 | inner_product_param { 811 | num_output: 64 812 | weight_filler { 813 | type: "gaussian" 814 | std: 0.01 815 | } 816 | bias_filler { 817 | type: "constant" 818 | value: 0 819 | } 820 | } 821 | } 822 | 823 | 824 | 825 | 826 | -------------------------------------------------------------------------------- /Sketchy/README.md: -------------------------------------------------------------------------------- 1 | Deploy files for Sketchy dataset. 2 | -------------------------------------------------------------------------------- /Sketchy/Sketch/deploy_sk_128.prototxt: -------------------------------------------------------------------------------- 1 | name: "CaffeNet" 2 | 3 | input: "sketch" 4 | input_dim: 10 5 | input_dim: 3 6 | input_dim: 200 7 | input_dim: 200 8 | 9 | #############################################fixed############################################################ 10 | layer { 11 | name: "conv1-S" 12 | type: "Convolution" 13 | bottom: "sketch" 14 | top: "conv1-S" 15 | param { 16 | lr_mult: 1 17 | decay_mult: 1 18 | name:"conv1-S_w" 19 | } 20 | param { 21 | lr_mult: 2 22 | name:"conv1-S_b" 23 | decay_mult: 0 24 | } 25 | convolution_param { 26 | num_output: 64 27 | kernel_size: 14 28 | stride: 3 29 | weight_filler { 30 | type: "gaussian" 31 | std: 0.01 32 | } 33 | bias_filler { 34 | type: "constant" 35 | value: 0 36 | } 37 | } 38 | } 39 | 40 | layer { 41 | name: "BN1-S" 42 | type: "BatchNorm" 43 | bottom: "conv1-S" 44 | top: "conv1bn-S" 45 | } 46 | 47 | layer { 48 | name: "SC1-S" 49 | type: "Scale" 50 | bottom: "conv1bn-S" 51 | top: "conv1sc-S" 52 | scale_param{ 53 | bias_term: true 54 | } 55 | } 56 | 57 | 58 | layer { 59 | name: "relu1-S" 60 | type: "ReLU" 61 | bottom: "conv1sc-S" 62 | top: "conv1sc-S" 63 | } 64 | 65 | layer { 66 | name: "pool1-S" 67 | type: "Pooling" 68 | bottom: "conv1sc-S" 69 | top: "pool1-S" 70 | pooling_param { 71 | pool: MAX 72 | kernel_size: 3 73 | stride: 2 74 | } 75 | } 76 | 77 | 78 | 79 | layer { 80 | name: "conv2_1-S" 81 | type: "Convolution" 82 | bottom: "pool1-S" 83 | top: "conv2_1-S" 84 | param { 85 | lr_mult: 1 86 | decay_mult: 1 87 | name:"conv2_1-S_w" 88 | } 89 | param { 90 | lr_mult: 2 91 | decay_mult: 0 92 | name:"conv2_1-S_b" 93 | } 94 | convolution_param { 95 | num_output: 128 96 | pad: 1 97 | kernel_size: 3 98 | stride: 1 99 | weight_filler { 100 | type: "gaussian" 101 | std: 0.01 102 | } 103 | bias_filler { 104 | type: "constant" 105 | value: 1 106 | } 107 | } 108 | } 109 | 110 | layer { 111 | name: "BN2_1-S" 112 | type: "BatchNorm" 113 | bottom: "conv2_1-S" 114 | top: "conv2_1bn-S" 115 | } 116 | 117 | layer { 118 | name: "SC2_1-S" 119 | type: "Scale" 120 | bottom: "conv2_1bn-S" 121 | top: "conv2_1sc-S" 122 | scale_param{ 123 | bias_term: true 124 | } 125 | } 126 | 127 | 128 | layer { 129 | name: "relu2_1-S" 130 | type: "ReLU" 131 | bottom: "conv2_1sc-S" 132 | top: "conv2_1sc-S" 133 | } 134 | 135 | 136 | 137 | 138 | 139 | 140 | layer { 141 | name: "conv2_2-S" 142 | type: "Convolution" 143 | bottom: "conv2_1sc-S" 144 | top: "conv2_2-S" 145 | param { 146 | lr_mult: 1 147 | decay_mult: 1 148 | name:"conv2_2-S_w" 149 | } 150 | param { 151 | lr_mult: 2 152 | decay_mult: 0 153 | name:"conv2_2-S_b" 154 | } 155 | convolution_param { 156 | num_output: 128 157 | pad: 1 158 | kernel_size: 3 159 | stride: 1 160 | weight_filler { 161 | type: "gaussian" 162 | std: 0.01 163 | } 164 | bias_filler { 165 | type: "constant" 166 | value: 1 167 | } 168 | } 169 | } 170 | 171 | layer { 172 | name: "BN2_2-S" 173 | type: "BatchNorm" 174 | bottom: "conv2_2-S" 175 | top: "conv2_2bn-S" 176 | } 177 | 178 | layer { 179 | name: "SC2_2-S" 180 | type: "Scale" 181 | bottom: "conv2_2bn-S" 182 | top: "conv2_2sc-S" 183 | scale_param{ 184 | bias_term: true 185 | } 186 | } 187 | 188 | 189 | layer { 190 | name: "relu2_2-S" 191 | type: "ReLU" 192 | bottom: "conv2_2sc-S" 193 | top: "conv2_2sc-S" 194 | } 195 | 196 | 197 | 198 | layer { 199 | name: "pool2-S" 200 | type: "Pooling" 201 | bottom: "conv2_2sc-S" 202 | top: "pool2-S" 203 | pooling_param { 204 | pool: MAX 205 | kernel_size: 3 206 | stride: 2 207 | } 208 | } 209 | 210 | 211 | 212 | 213 | 214 | layer { 215 | name: "conv3_1-S" 216 | type: "Convolution" 217 | bottom: "pool2-S" 218 | top: "conv3_1-S" 219 | param { 220 | lr_mult: 1 221 | decay_mult: 1 222 | name:"conv3_1-S_w" 223 | } 224 | param { 225 | lr_mult: 2 226 | decay_mult: 0 227 | name:"conv3_1-S_b" 228 | } 229 | convolution_param { 230 | num_output: 256 231 | pad: 1 232 | kernel_size: 3 233 | stride: 1 234 | weight_filler { 235 | type: "gaussian" 236 | std: 0.01 237 | } 238 | bias_filler { 239 | type: "constant" 240 | value: 1 241 | } 242 | } 243 | } 244 | 245 | layer { 246 | name: "BN3_1-S" 247 | type: "BatchNorm" 248 | bottom: "conv3_1-S" 249 | top: "conv3_1bn-S" 250 | } 251 | 252 | layer { 253 | name: "SC3_1-S" 254 | type: "Scale" 255 | bottom: "conv3_1bn-S" 256 | top: "conv3_1sc-S" 257 | scale_param{ 258 | bias_term: true 259 | } 260 | } 261 | 262 | 263 | layer { 264 | name: "relu3_1-S" 265 | type: "ReLU" 266 | bottom: "conv3_1sc-S" 267 | top: "conv3_1sc-S" 268 | } 269 | 270 | 271 | 272 | layer { 273 | name: "conv3_2-S" 274 | type: "Convolution" 275 | bottom: "conv3_1sc-S" 276 | top: "conv3_2-S" 277 | param { 278 | lr_mult: 1 279 | decay_mult: 1 280 | name:"conv3_2-S_w" 281 | } 282 | param { 283 | lr_mult: 2 284 | decay_mult: 0 285 | name:"conv3_2-S_b" 286 | } 287 | convolution_param { 288 | num_output: 256 289 | pad: 1 290 | kernel_size: 3 291 | stride: 1 292 | weight_filler { 293 | type: "gaussian" 294 | std: 0.01 295 | } 296 | bias_filler { 297 | type: "constant" 298 | value: 1 299 | } 300 | } 301 | } 302 | 303 | layer { 304 | name: "BN3_2-S" 305 | type: "BatchNorm" 306 | bottom: "conv3_2-S" 307 | top: "conv3_2bn-S" 308 | } 309 | 310 | layer { 311 | name: "SC3_2-S" 312 | type: "Scale" 313 | bottom: "conv3_2bn-S" 314 | top: "conv3_2sc-S" 315 | scale_param{ 316 | bias_term: true 317 | } 318 | } 319 | 320 | 321 | layer { 322 | name: "relu3_2-S" 323 | type: "ReLU" 324 | bottom: "conv3_2sc-S" 325 | top: "conv3_2sc-S" 326 | } 327 | 328 | 329 | 330 | 331 | layer { 332 | name: "pool3-S" 333 | type: "Pooling" 334 | bottom: "conv3_2sc-S" 335 | top: "pool3-S" 336 | pooling_param { 337 | pool: MAX 338 | kernel_size: 3 339 | stride: 2 340 | } 341 | } 342 | 343 | 344 | layer { 345 | name: "fc_a-S" 346 | type: "InnerProduct" 347 | bottom: "pool3-S" 348 | top: "fc_a-S" 349 | param { 350 | lr_mult: 1 351 | decay_mult: 1 352 | name:"fc_a-S_w" 353 | } 354 | param { 355 | lr_mult: 2 356 | decay_mult: 0 357 | name:"fc_a-S_b" 358 | } 359 | inner_product_param { 360 | num_output: 4096 361 | weight_filler { 362 | type: "gaussian" 363 | std: 0.005 364 | } 365 | bias_filler { 366 | type: "constant" 367 | value: 1 368 | } 369 | } 370 | } 371 | 372 | 373 | 374 | layer { 375 | name: "relu4-S" 376 | type: "ReLU" 377 | bottom: "fc_a-S" 378 | top: "fc_a-S" 379 | } 380 | 381 | layer { 382 | name: "drop4-S" 383 | type: "Dropout" 384 | bottom: "fc_a-S" 385 | top: "fc_a-S" 386 | dropout_param { 387 | dropout_ratio: 0.25 388 | } 389 | } 390 | 391 | layer { 392 | name: "fc_b-S" 393 | type: "InnerProduct" 394 | bottom: "fc_a-S" 395 | top: "fc_b-S" 396 | param { 397 | lr_mult: 1 398 | decay_mult: 1 399 | name:"fc_b-S_w" 400 | } 401 | param { 402 | lr_mult: 2 403 | decay_mult: 0 404 | name:"fc_b-S_b" 405 | } 406 | inner_product_param { 407 | num_output: 1024 408 | weight_filler { 409 | type: "gaussian" 410 | std: 0.005 411 | } 412 | bias_filler { 413 | type: "constant" 414 | value: 1 415 | } 416 | } 417 | } 418 | 419 | 420 | layer { 421 | name: "relu5-S" 422 | type: "ReLU" 423 | bottom: "fc_b-S" 424 | top: "fc_b-S" 425 | } 426 | 427 | layer { 428 | name: "drop5-S" 429 | type: "Dropout" 430 | bottom: "fc_b-S" 431 | top: "fc_b-S" 432 | dropout_param { 433 | dropout_ratio: 0.25 434 | } 435 | } 436 | 437 | 438 | 439 | layer { 440 | name: "fc_p-S_128" 441 | type: "InnerProduct" 442 | bottom: "fc_b-S" 443 | top: "fc_p-S" 444 | param { 445 | lr_mult: 1 446 | name:"fc_p-S_w" 447 | decay_mult: 1 448 | } 449 | param { 450 | lr_mult: 2 451 | decay_mult: 0 452 | name:"fc_p-S_b" 453 | } 454 | inner_product_param { 455 | num_output: 128 456 | weight_filler { 457 | type: "gaussian" 458 | std: 0.01 459 | } 460 | bias_filler { 461 | type: "constant" 462 | value: 0 463 | } 464 | } 465 | } 466 | #################################################################################################### 467 | 468 | -------------------------------------------------------------------------------- /Sketchy/Sketch/deploy_sk_256.prototxt: -------------------------------------------------------------------------------- 1 | name: "CaffeNet" 2 | 3 | input: "sketch" 4 | input_dim: 10 5 | input_dim: 3 6 | input_dim: 200 7 | input_dim: 200 8 | 9 | #############################################fixed############################################################ 10 | layer { 11 | name: "conv1-S" 12 | type: "Convolution" 13 | bottom: "sketch" 14 | top: "conv1-S" 15 | param { 16 | lr_mult: 1 17 | decay_mult: 1 18 | name:"conv1-S_w" 19 | } 20 | param { 21 | lr_mult: 2 22 | name:"conv1-S_b" 23 | decay_mult: 0 24 | } 25 | convolution_param { 26 | num_output: 64 27 | kernel_size: 14 28 | stride: 3 29 | weight_filler { 30 | type: "gaussian" 31 | std: 0.01 32 | } 33 | bias_filler { 34 | type: "constant" 35 | value: 0 36 | } 37 | } 38 | } 39 | 40 | layer { 41 | name: "BN1-S" 42 | type: "BatchNorm" 43 | bottom: "conv1-S" 44 | top: "conv1bn-S" 45 | } 46 | 47 | layer { 48 | name: "SC1-S" 49 | type: "Scale" 50 | bottom: "conv1bn-S" 51 | top: "conv1sc-S" 52 | scale_param{ 53 | bias_term: true 54 | } 55 | } 56 | 57 | 58 | layer { 59 | name: "relu1-S" 60 | type: "ReLU" 61 | bottom: "conv1sc-S" 62 | top: "conv1sc-S" 63 | } 64 | 65 | layer { 66 | name: "pool1-S" 67 | type: "Pooling" 68 | bottom: "conv1sc-S" 69 | top: "pool1-S" 70 | pooling_param { 71 | pool: MAX 72 | kernel_size: 3 73 | stride: 2 74 | } 75 | } 76 | 77 | 78 | 79 | layer { 80 | name: "conv2_1-S" 81 | type: "Convolution" 82 | bottom: "pool1-S" 83 | top: "conv2_1-S" 84 | param { 85 | lr_mult: 1 86 | decay_mult: 1 87 | name:"conv2_1-S_w" 88 | } 89 | param { 90 | lr_mult: 2 91 | decay_mult: 0 92 | name:"conv2_1-S_b" 93 | } 94 | convolution_param { 95 | num_output: 128 96 | pad: 1 97 | kernel_size: 3 98 | stride: 1 99 | weight_filler { 100 | type: "gaussian" 101 | std: 0.01 102 | } 103 | bias_filler { 104 | type: "constant" 105 | value: 1 106 | } 107 | } 108 | } 109 | 110 | layer { 111 | name: "BN2_1-S" 112 | type: "BatchNorm" 113 | bottom: "conv2_1-S" 114 | top: "conv2_1bn-S" 115 | } 116 | 117 | layer { 118 | name: "SC2_1-S" 119 | type: "Scale" 120 | bottom: "conv2_1bn-S" 121 | top: "conv2_1sc-S" 122 | scale_param{ 123 | bias_term: true 124 | } 125 | } 126 | 127 | 128 | layer { 129 | name: "relu2_1-S" 130 | type: "ReLU" 131 | bottom: "conv2_1sc-S" 132 | top: "conv2_1sc-S" 133 | } 134 | 135 | 136 | 137 | 138 | 139 | 140 | layer { 141 | name: "conv2_2-S" 142 | type: "Convolution" 143 | bottom: "conv2_1sc-S" 144 | top: "conv2_2-S" 145 | param { 146 | lr_mult: 1 147 | decay_mult: 1 148 | name:"conv2_2-S_w" 149 | } 150 | param { 151 | lr_mult: 2 152 | decay_mult: 0 153 | name:"conv2_2-S_b" 154 | } 155 | convolution_param { 156 | num_output: 128 157 | pad: 1 158 | kernel_size: 3 159 | stride: 1 160 | weight_filler { 161 | type: "gaussian" 162 | std: 0.01 163 | } 164 | bias_filler { 165 | type: "constant" 166 | value: 1 167 | } 168 | } 169 | } 170 | 171 | layer { 172 | name: "BN2_2-S" 173 | type: "BatchNorm" 174 | bottom: "conv2_2-S" 175 | top: "conv2_2bn-S" 176 | } 177 | 178 | layer { 179 | name: "SC2_2-S" 180 | type: "Scale" 181 | bottom: "conv2_2bn-S" 182 | top: "conv2_2sc-S" 183 | scale_param{ 184 | bias_term: true 185 | } 186 | } 187 | 188 | 189 | layer { 190 | name: "relu2_2-S" 191 | type: "ReLU" 192 | bottom: "conv2_2sc-S" 193 | top: "conv2_2sc-S" 194 | } 195 | 196 | 197 | 198 | layer { 199 | name: "pool2-S" 200 | type: "Pooling" 201 | bottom: "conv2_2sc-S" 202 | top: "pool2-S" 203 | pooling_param { 204 | pool: MAX 205 | kernel_size: 3 206 | stride: 2 207 | } 208 | } 209 | 210 | 211 | 212 | 213 | 214 | layer { 215 | name: "conv3_1-S" 216 | type: "Convolution" 217 | bottom: "pool2-S" 218 | top: "conv3_1-S" 219 | param { 220 | lr_mult: 1 221 | decay_mult: 1 222 | name:"conv3_1-S_w" 223 | } 224 | param { 225 | lr_mult: 2 226 | decay_mult: 0 227 | name:"conv3_1-S_b" 228 | } 229 | convolution_param { 230 | num_output: 256 231 | pad: 1 232 | kernel_size: 3 233 | stride: 1 234 | weight_filler { 235 | type: "gaussian" 236 | std: 0.01 237 | } 238 | bias_filler { 239 | type: "constant" 240 | value: 1 241 | } 242 | } 243 | } 244 | 245 | layer { 246 | name: "BN3_1-S" 247 | type: "BatchNorm" 248 | bottom: "conv3_1-S" 249 | top: "conv3_1bn-S" 250 | } 251 | 252 | layer { 253 | name: "SC3_1-S" 254 | type: "Scale" 255 | bottom: "conv3_1bn-S" 256 | top: "conv3_1sc-S" 257 | scale_param{ 258 | bias_term: true 259 | } 260 | } 261 | 262 | 263 | layer { 264 | name: "relu3_1-S" 265 | type: "ReLU" 266 | bottom: "conv3_1sc-S" 267 | top: "conv3_1sc-S" 268 | } 269 | 270 | 271 | 272 | layer { 273 | name: "conv3_2-S" 274 | type: "Convolution" 275 | bottom: "conv3_1sc-S" 276 | top: "conv3_2-S" 277 | param { 278 | lr_mult: 1 279 | decay_mult: 1 280 | name:"conv3_2-S_w" 281 | } 282 | param { 283 | lr_mult: 2 284 | decay_mult: 0 285 | name:"conv3_2-S_b" 286 | } 287 | convolution_param { 288 | num_output: 256 289 | pad: 1 290 | kernel_size: 3 291 | stride: 1 292 | weight_filler { 293 | type: "gaussian" 294 | std: 0.01 295 | } 296 | bias_filler { 297 | type: "constant" 298 | value: 1 299 | } 300 | } 301 | } 302 | 303 | layer { 304 | name: "BN3_2-S" 305 | type: "BatchNorm" 306 | bottom: "conv3_2-S" 307 | top: "conv3_2bn-S" 308 | } 309 | 310 | layer { 311 | name: "SC3_2-S" 312 | type: "Scale" 313 | bottom: "conv3_2bn-S" 314 | top: "conv3_2sc-S" 315 | scale_param{ 316 | bias_term: true 317 | } 318 | } 319 | 320 | 321 | layer { 322 | name: "relu3_2-S" 323 | type: "ReLU" 324 | bottom: "conv3_2sc-S" 325 | top: "conv3_2sc-S" 326 | } 327 | 328 | 329 | 330 | 331 | layer { 332 | name: "pool3-S" 333 | type: "Pooling" 334 | bottom: "conv3_2sc-S" 335 | top: "pool3-S" 336 | pooling_param { 337 | pool: MAX 338 | kernel_size: 3 339 | stride: 2 340 | } 341 | } 342 | 343 | 344 | layer { 345 | name: "fc_a-S" 346 | type: "InnerProduct" 347 | bottom: "pool3-S" 348 | top: "fc_a-S" 349 | param { 350 | lr_mult: 1 351 | decay_mult: 1 352 | name:"fc_a-S_w" 353 | } 354 | param { 355 | lr_mult: 2 356 | decay_mult: 0 357 | name:"fc_a-S_b" 358 | } 359 | inner_product_param { 360 | num_output: 4096 361 | weight_filler { 362 | type: "gaussian" 363 | std: 0.005 364 | } 365 | bias_filler { 366 | type: "constant" 367 | value: 1 368 | } 369 | } 370 | } 371 | 372 | 373 | 374 | layer { 375 | name: "relu4-S" 376 | type: "ReLU" 377 | bottom: "fc_a-S" 378 | top: "fc_a-S" 379 | } 380 | 381 | layer { 382 | name: "drop4-S" 383 | type: "Dropout" 384 | bottom: "fc_a-S" 385 | top: "fc_a-S" 386 | dropout_param { 387 | dropout_ratio: 0.25 388 | } 389 | } 390 | 391 | layer { 392 | name: "fc_b-S" 393 | type: "InnerProduct" 394 | bottom: "fc_a-S" 395 | top: "fc_b-S" 396 | param { 397 | lr_mult: 1 398 | decay_mult: 1 399 | name:"fc_b-S_w" 400 | } 401 | param { 402 | lr_mult: 2 403 | decay_mult: 0 404 | name:"fc_b-S_b" 405 | } 406 | inner_product_param { 407 | num_output: 1024 408 | weight_filler { 409 | type: "gaussian" 410 | std: 0.005 411 | } 412 | bias_filler { 413 | type: "constant" 414 | value: 1 415 | } 416 | } 417 | } 418 | 419 | 420 | layer { 421 | name: "relu5-S" 422 | type: "ReLU" 423 | bottom: "fc_b-S" 424 | top: "fc_b-S" 425 | } 426 | 427 | layer { 428 | name: "drop5-S" 429 | type: "Dropout" 430 | bottom: "fc_b-S" 431 | top: "fc_b-S" 432 | dropout_param { 433 | dropout_ratio: 0.25 434 | } 435 | } 436 | 437 | 438 | 439 | layer { 440 | name: "fc_p-S_256" 441 | type: "InnerProduct" 442 | bottom: "fc_b-S" 443 | top: "fc_p-S" 444 | param { 445 | lr_mult: 1 446 | name:"fc_p-S_w" 447 | decay_mult: 1 448 | } 449 | param { 450 | lr_mult: 2 451 | decay_mult: 0 452 | name:"fc_p-S_b" 453 | } 454 | inner_product_param { 455 | num_output: 256 456 | weight_filler { 457 | type: "gaussian" 458 | std: 0.01 459 | } 460 | bias_filler { 461 | type: "constant" 462 | value: 0 463 | } 464 | } 465 | } 466 | #################################################################################################### 467 | 468 | -------------------------------------------------------------------------------- /Sketchy/Sketch/deploy_sk_32.prototxt: -------------------------------------------------------------------------------- 1 | name: "CaffeNet" 2 | 3 | input: "sketch" 4 | input_dim: 10 5 | input_dim: 3 6 | input_dim: 200 7 | input_dim: 200 8 | 9 | #############################################fixed############################################################ 10 | layer { 11 | name: "conv1-S" 12 | type: "Convolution" 13 | bottom: "sketch" 14 | top: "conv1-S" 15 | param { 16 | lr_mult: 1 17 | decay_mult: 1 18 | name:"conv1-S_w" 19 | } 20 | param { 21 | lr_mult: 2 22 | name:"conv1-S_b" 23 | decay_mult: 0 24 | } 25 | convolution_param { 26 | num_output: 64 27 | kernel_size: 14 28 | stride: 3 29 | weight_filler { 30 | type: "gaussian" 31 | std: 0.01 32 | } 33 | bias_filler { 34 | type: "constant" 35 | value: 0 36 | } 37 | } 38 | } 39 | 40 | layer { 41 | name: "BN1-S" 42 | type: "BatchNorm" 43 | bottom: "conv1-S" 44 | top: "conv1bn-S" 45 | } 46 | 47 | layer { 48 | name: "SC1-S" 49 | type: "Scale" 50 | bottom: "conv1bn-S" 51 | top: "conv1sc-S" 52 | scale_param{ 53 | bias_term: true 54 | } 55 | } 56 | 57 | 58 | layer { 59 | name: "relu1-S" 60 | type: "ReLU" 61 | bottom: "conv1sc-S" 62 | top: "conv1sc-S" 63 | } 64 | 65 | layer { 66 | name: "pool1-S" 67 | type: "Pooling" 68 | bottom: "conv1sc-S" 69 | top: "pool1-S" 70 | pooling_param { 71 | pool: MAX 72 | kernel_size: 3 73 | stride: 2 74 | } 75 | } 76 | 77 | 78 | 79 | layer { 80 | name: "conv2_1-S" 81 | type: "Convolution" 82 | bottom: "pool1-S" 83 | top: "conv2_1-S" 84 | param { 85 | lr_mult: 1 86 | decay_mult: 1 87 | name:"conv2_1-S_w" 88 | } 89 | param { 90 | lr_mult: 2 91 | decay_mult: 0 92 | name:"conv2_1-S_b" 93 | } 94 | convolution_param { 95 | num_output: 128 96 | pad: 1 97 | kernel_size: 3 98 | stride: 1 99 | weight_filler { 100 | type: "gaussian" 101 | std: 0.01 102 | } 103 | bias_filler { 104 | type: "constant" 105 | value: 1 106 | } 107 | } 108 | } 109 | 110 | layer { 111 | name: "BN2_1-S" 112 | type: "BatchNorm" 113 | bottom: "conv2_1-S" 114 | top: "conv2_1bn-S" 115 | } 116 | 117 | layer { 118 | name: "SC2_1-S" 119 | type: "Scale" 120 | bottom: "conv2_1bn-S" 121 | top: "conv2_1sc-S" 122 | scale_param{ 123 | bias_term: true 124 | } 125 | } 126 | 127 | 128 | layer { 129 | name: "relu2_1-S" 130 | type: "ReLU" 131 | bottom: "conv2_1sc-S" 132 | top: "conv2_1sc-S" 133 | } 134 | 135 | 136 | 137 | 138 | 139 | 140 | layer { 141 | name: "conv2_2-S" 142 | type: "Convolution" 143 | bottom: "conv2_1sc-S" 144 | top: "conv2_2-S" 145 | param { 146 | lr_mult: 1 147 | decay_mult: 1 148 | name:"conv2_2-S_w" 149 | } 150 | param { 151 | lr_mult: 2 152 | decay_mult: 0 153 | name:"conv2_2-S_b" 154 | } 155 | convolution_param { 156 | num_output: 128 157 | pad: 1 158 | kernel_size: 3 159 | stride: 1 160 | weight_filler { 161 | type: "gaussian" 162 | std: 0.01 163 | } 164 | bias_filler { 165 | type: "constant" 166 | value: 1 167 | } 168 | } 169 | } 170 | 171 | layer { 172 | name: "BN2_2-S" 173 | type: "BatchNorm" 174 | bottom: "conv2_2-S" 175 | top: "conv2_2bn-S" 176 | } 177 | 178 | layer { 179 | name: "SC2_2-S" 180 | type: "Scale" 181 | bottom: "conv2_2bn-S" 182 | top: "conv2_2sc-S" 183 | scale_param{ 184 | bias_term: true 185 | } 186 | } 187 | 188 | 189 | layer { 190 | name: "relu2_2-S" 191 | type: "ReLU" 192 | bottom: "conv2_2sc-S" 193 | top: "conv2_2sc-S" 194 | } 195 | 196 | 197 | 198 | layer { 199 | name: "pool2-S" 200 | type: "Pooling" 201 | bottom: "conv2_2sc-S" 202 | top: "pool2-S" 203 | pooling_param { 204 | pool: MAX 205 | kernel_size: 3 206 | stride: 2 207 | } 208 | } 209 | 210 | 211 | 212 | 213 | 214 | layer { 215 | name: "conv3_1-S" 216 | type: "Convolution" 217 | bottom: "pool2-S" 218 | top: "conv3_1-S" 219 | param { 220 | lr_mult: 1 221 | decay_mult: 1 222 | name:"conv3_1-S_w" 223 | } 224 | param { 225 | lr_mult: 2 226 | decay_mult: 0 227 | name:"conv3_1-S_b" 228 | } 229 | convolution_param { 230 | num_output: 256 231 | pad: 1 232 | kernel_size: 3 233 | stride: 1 234 | weight_filler { 235 | type: "gaussian" 236 | std: 0.01 237 | } 238 | bias_filler { 239 | type: "constant" 240 | value: 1 241 | } 242 | } 243 | } 244 | 245 | layer { 246 | name: "BN3_1-S" 247 | type: "BatchNorm" 248 | bottom: "conv3_1-S" 249 | top: "conv3_1bn-S" 250 | } 251 | 252 | layer { 253 | name: "SC3_1-S" 254 | type: "Scale" 255 | bottom: "conv3_1bn-S" 256 | top: "conv3_1sc-S" 257 | scale_param{ 258 | bias_term: true 259 | } 260 | } 261 | 262 | 263 | layer { 264 | name: "relu3_1-S" 265 | type: "ReLU" 266 | bottom: "conv3_1sc-S" 267 | top: "conv3_1sc-S" 268 | } 269 | 270 | 271 | 272 | layer { 273 | name: "conv3_2-S" 274 | type: "Convolution" 275 | bottom: "conv3_1sc-S" 276 | top: "conv3_2-S" 277 | param { 278 | lr_mult: 1 279 | decay_mult: 1 280 | name:"conv3_2-S_w" 281 | } 282 | param { 283 | lr_mult: 2 284 | decay_mult: 0 285 | name:"conv3_2-S_b" 286 | } 287 | convolution_param { 288 | num_output: 256 289 | pad: 1 290 | kernel_size: 3 291 | stride: 1 292 | weight_filler { 293 | type: "gaussian" 294 | std: 0.01 295 | } 296 | bias_filler { 297 | type: "constant" 298 | value: 1 299 | } 300 | } 301 | } 302 | 303 | layer { 304 | name: "BN3_2-S" 305 | type: "BatchNorm" 306 | bottom: "conv3_2-S" 307 | top: "conv3_2bn-S" 308 | } 309 | 310 | layer { 311 | name: "SC3_2-S" 312 | type: "Scale" 313 | bottom: "conv3_2bn-S" 314 | top: "conv3_2sc-S" 315 | scale_param{ 316 | bias_term: true 317 | } 318 | } 319 | 320 | 321 | layer { 322 | name: "relu3_2-S" 323 | type: "ReLU" 324 | bottom: "conv3_2sc-S" 325 | top: "conv3_2sc-S" 326 | } 327 | 328 | 329 | 330 | 331 | layer { 332 | name: "pool3-S" 333 | type: "Pooling" 334 | bottom: "conv3_2sc-S" 335 | top: "pool3-S" 336 | pooling_param { 337 | pool: MAX 338 | kernel_size: 3 339 | stride: 2 340 | } 341 | } 342 | 343 | 344 | layer { 345 | name: "fc_a-S" 346 | type: "InnerProduct" 347 | bottom: "pool3-S" 348 | top: "fc_a-S" 349 | param { 350 | lr_mult: 1 351 | decay_mult: 1 352 | name:"fc_a-S_w" 353 | } 354 | param { 355 | lr_mult: 2 356 | decay_mult: 0 357 | name:"fc_a-S_b" 358 | } 359 | inner_product_param { 360 | num_output: 4096 361 | weight_filler { 362 | type: "gaussian" 363 | std: 0.005 364 | } 365 | bias_filler { 366 | type: "constant" 367 | value: 1 368 | } 369 | } 370 | } 371 | 372 | 373 | 374 | layer { 375 | name: "relu4-S" 376 | type: "ReLU" 377 | bottom: "fc_a-S" 378 | top: "fc_a-S" 379 | } 380 | 381 | layer { 382 | name: "drop4-S" 383 | type: "Dropout" 384 | bottom: "fc_a-S" 385 | top: "fc_a-S" 386 | dropout_param { 387 | dropout_ratio: 0.25 388 | } 389 | } 390 | 391 | layer { 392 | name: "fc_b-S" 393 | type: "InnerProduct" 394 | bottom: "fc_a-S" 395 | top: "fc_b-S" 396 | param { 397 | lr_mult: 1 398 | decay_mult: 1 399 | name:"fc_b-S_w" 400 | } 401 | param { 402 | lr_mult: 2 403 | decay_mult: 0 404 | name:"fc_b-S_b" 405 | } 406 | inner_product_param { 407 | num_output: 1024 408 | weight_filler { 409 | type: "gaussian" 410 | std: 0.005 411 | } 412 | bias_filler { 413 | type: "constant" 414 | value: 1 415 | } 416 | } 417 | } 418 | 419 | 420 | layer { 421 | name: "relu5-S" 422 | type: "ReLU" 423 | bottom: "fc_b-S" 424 | top: "fc_b-S" 425 | } 426 | 427 | layer { 428 | name: "drop5-S" 429 | type: "Dropout" 430 | bottom: "fc_b-S" 431 | top: "fc_b-S" 432 | dropout_param { 433 | dropout_ratio: 0.25 434 | } 435 | } 436 | 437 | 438 | 439 | layer { 440 | name: "fc_p-S_32" 441 | type: "InnerProduct" 442 | bottom: "fc_b-S" 443 | top: "fc_p-S" 444 | param { 445 | lr_mult: 1 446 | name:"fc_p-S_w" 447 | decay_mult: 1 448 | } 449 | param { 450 | lr_mult: 2 451 | decay_mult: 0 452 | name:"fc_p-S_b" 453 | } 454 | inner_product_param { 455 | num_output: 32 456 | weight_filler { 457 | type: "gaussian" 458 | std: 0.01 459 | } 460 | bias_filler { 461 | type: "constant" 462 | value: 0 463 | } 464 | } 465 | } 466 | #################################################################################################### 467 | 468 | -------------------------------------------------------------------------------- /Sketchy/Sketch/deploy_sk_64.prototxt: -------------------------------------------------------------------------------- 1 | name: "CaffeNet" 2 | 3 | input: "sketch" 4 | input_dim: 10 5 | input_dim: 3 6 | input_dim: 200 7 | input_dim: 200 8 | 9 | #############################################fixed############################################################ 10 | layer { 11 | name: "conv1-S" 12 | type: "Convolution" 13 | bottom: "sketch" 14 | top: "conv1-S" 15 | param { 16 | lr_mult: 1 17 | decay_mult: 1 18 | name:"conv1-S_w" 19 | } 20 | param { 21 | lr_mult: 2 22 | name:"conv1-S_b" 23 | decay_mult: 0 24 | } 25 | convolution_param { 26 | num_output: 64 27 | kernel_size: 14 28 | stride: 3 29 | weight_filler { 30 | type: "gaussian" 31 | std: 0.01 32 | } 33 | bias_filler { 34 | type: "constant" 35 | value: 0 36 | } 37 | } 38 | } 39 | 40 | layer { 41 | name: "BN1-S" 42 | type: "BatchNorm" 43 | bottom: "conv1-S" 44 | top: "conv1bn-S" 45 | } 46 | 47 | layer { 48 | name: "SC1-S" 49 | type: "Scale" 50 | bottom: "conv1bn-S" 51 | top: "conv1sc-S" 52 | scale_param{ 53 | bias_term: true 54 | } 55 | } 56 | 57 | 58 | layer { 59 | name: "relu1-S" 60 | type: "ReLU" 61 | bottom: "conv1sc-S" 62 | top: "conv1sc-S" 63 | } 64 | 65 | layer { 66 | name: "pool1-S" 67 | type: "Pooling" 68 | bottom: "conv1sc-S" 69 | top: "pool1-S" 70 | pooling_param { 71 | pool: MAX 72 | kernel_size: 3 73 | stride: 2 74 | } 75 | } 76 | 77 | 78 | 79 | layer { 80 | name: "conv2_1-S" 81 | type: "Convolution" 82 | bottom: "pool1-S" 83 | top: "conv2_1-S" 84 | param { 85 | lr_mult: 1 86 | decay_mult: 1 87 | name:"conv2_1-S_w" 88 | } 89 | param { 90 | lr_mult: 2 91 | decay_mult: 0 92 | name:"conv2_1-S_b" 93 | } 94 | convolution_param { 95 | num_output: 128 96 | pad: 1 97 | kernel_size: 3 98 | stride: 1 99 | weight_filler { 100 | type: "gaussian" 101 | std: 0.01 102 | } 103 | bias_filler { 104 | type: "constant" 105 | value: 1 106 | } 107 | } 108 | } 109 | 110 | layer { 111 | name: "BN2_1-S" 112 | type: "BatchNorm" 113 | bottom: "conv2_1-S" 114 | top: "conv2_1bn-S" 115 | } 116 | 117 | layer { 118 | name: "SC2_1-S" 119 | type: "Scale" 120 | bottom: "conv2_1bn-S" 121 | top: "conv2_1sc-S" 122 | scale_param{ 123 | bias_term: true 124 | } 125 | } 126 | 127 | 128 | layer { 129 | name: "relu2_1-S" 130 | type: "ReLU" 131 | bottom: "conv2_1sc-S" 132 | top: "conv2_1sc-S" 133 | } 134 | 135 | 136 | 137 | 138 | 139 | 140 | layer { 141 | name: "conv2_2-S" 142 | type: "Convolution" 143 | bottom: "conv2_1sc-S" 144 | top: "conv2_2-S" 145 | param { 146 | lr_mult: 1 147 | decay_mult: 1 148 | name:"conv2_2-S_w" 149 | } 150 | param { 151 | lr_mult: 2 152 | decay_mult: 0 153 | name:"conv2_2-S_b" 154 | } 155 | convolution_param { 156 | num_output: 128 157 | pad: 1 158 | kernel_size: 3 159 | stride: 1 160 | weight_filler { 161 | type: "gaussian" 162 | std: 0.01 163 | } 164 | bias_filler { 165 | type: "constant" 166 | value: 1 167 | } 168 | } 169 | } 170 | 171 | layer { 172 | name: "BN2_2-S" 173 | type: "BatchNorm" 174 | bottom: "conv2_2-S" 175 | top: "conv2_2bn-S" 176 | } 177 | 178 | layer { 179 | name: "SC2_2-S" 180 | type: "Scale" 181 | bottom: "conv2_2bn-S" 182 | top: "conv2_2sc-S" 183 | scale_param{ 184 | bias_term: true 185 | } 186 | } 187 | 188 | 189 | layer { 190 | name: "relu2_2-S" 191 | type: "ReLU" 192 | bottom: "conv2_2sc-S" 193 | top: "conv2_2sc-S" 194 | } 195 | 196 | 197 | 198 | layer { 199 | name: "pool2-S" 200 | type: "Pooling" 201 | bottom: "conv2_2sc-S" 202 | top: "pool2-S" 203 | pooling_param { 204 | pool: MAX 205 | kernel_size: 3 206 | stride: 2 207 | } 208 | } 209 | 210 | 211 | 212 | 213 | 214 | layer { 215 | name: "conv3_1-S" 216 | type: "Convolution" 217 | bottom: "pool2-S" 218 | top: "conv3_1-S" 219 | param { 220 | lr_mult: 1 221 | decay_mult: 1 222 | name:"conv3_1-S_w" 223 | } 224 | param { 225 | lr_mult: 2 226 | decay_mult: 0 227 | name:"conv3_1-S_b" 228 | } 229 | convolution_param { 230 | num_output: 256 231 | pad: 1 232 | kernel_size: 3 233 | stride: 1 234 | weight_filler { 235 | type: "gaussian" 236 | std: 0.01 237 | } 238 | bias_filler { 239 | type: "constant" 240 | value: 1 241 | } 242 | } 243 | } 244 | 245 | layer { 246 | name: "BN3_1-S" 247 | type: "BatchNorm" 248 | bottom: "conv3_1-S" 249 | top: "conv3_1bn-S" 250 | } 251 | 252 | layer { 253 | name: "SC3_1-S" 254 | type: "Scale" 255 | bottom: "conv3_1bn-S" 256 | top: "conv3_1sc-S" 257 | scale_param{ 258 | bias_term: true 259 | } 260 | } 261 | 262 | 263 | layer { 264 | name: "relu3_1-S" 265 | type: "ReLU" 266 | bottom: "conv3_1sc-S" 267 | top: "conv3_1sc-S" 268 | } 269 | 270 | 271 | 272 | layer { 273 | name: "conv3_2-S" 274 | type: "Convolution" 275 | bottom: "conv3_1sc-S" 276 | top: "conv3_2-S" 277 | param { 278 | lr_mult: 1 279 | decay_mult: 1 280 | name:"conv3_2-S_w" 281 | } 282 | param { 283 | lr_mult: 2 284 | decay_mult: 0 285 | name:"conv3_2-S_b" 286 | } 287 | convolution_param { 288 | num_output: 256 289 | pad: 1 290 | kernel_size: 3 291 | stride: 1 292 | weight_filler { 293 | type: "gaussian" 294 | std: 0.01 295 | } 296 | bias_filler { 297 | type: "constant" 298 | value: 1 299 | } 300 | } 301 | } 302 | 303 | layer { 304 | name: "BN3_2-S" 305 | type: "BatchNorm" 306 | bottom: "conv3_2-S" 307 | top: "conv3_2bn-S" 308 | } 309 | 310 | layer { 311 | name: "SC3_2-S" 312 | type: "Scale" 313 | bottom: "conv3_2bn-S" 314 | top: "conv3_2sc-S" 315 | scale_param{ 316 | bias_term: true 317 | } 318 | } 319 | 320 | 321 | layer { 322 | name: "relu3_2-S" 323 | type: "ReLU" 324 | bottom: "conv3_2sc-S" 325 | top: "conv3_2sc-S" 326 | } 327 | 328 | 329 | 330 | 331 | layer { 332 | name: "pool3-S" 333 | type: "Pooling" 334 | bottom: "conv3_2sc-S" 335 | top: "pool3-S" 336 | pooling_param { 337 | pool: MAX 338 | kernel_size: 3 339 | stride: 2 340 | } 341 | } 342 | 343 | 344 | layer { 345 | name: "fc_a-S" 346 | type: "InnerProduct" 347 | bottom: "pool3-S" 348 | top: "fc_a-S" 349 | param { 350 | lr_mult: 1 351 | decay_mult: 1 352 | name:"fc_a-S_w" 353 | } 354 | param { 355 | lr_mult: 2 356 | decay_mult: 0 357 | name:"fc_a-S_b" 358 | } 359 | inner_product_param { 360 | num_output: 4096 361 | weight_filler { 362 | type: "gaussian" 363 | std: 0.005 364 | } 365 | bias_filler { 366 | type: "constant" 367 | value: 1 368 | } 369 | } 370 | } 371 | 372 | 373 | 374 | layer { 375 | name: "relu4-S" 376 | type: "ReLU" 377 | bottom: "fc_a-S" 378 | top: "fc_a-S" 379 | } 380 | 381 | layer { 382 | name: "drop4-S" 383 | type: "Dropout" 384 | bottom: "fc_a-S" 385 | top: "fc_a-S" 386 | dropout_param { 387 | dropout_ratio: 0.25 388 | } 389 | } 390 | 391 | layer { 392 | name: "fc_b-S" 393 | type: "InnerProduct" 394 | bottom: "fc_a-S" 395 | top: "fc_b-S" 396 | param { 397 | lr_mult: 1 398 | decay_mult: 1 399 | name:"fc_b-S_w" 400 | } 401 | param { 402 | lr_mult: 2 403 | decay_mult: 0 404 | name:"fc_b-S_b" 405 | } 406 | inner_product_param { 407 | num_output: 1024 408 | weight_filler { 409 | type: "gaussian" 410 | std: 0.005 411 | } 412 | bias_filler { 413 | type: "constant" 414 | value: 1 415 | } 416 | } 417 | } 418 | 419 | 420 | layer { 421 | name: "relu5-S" 422 | type: "ReLU" 423 | bottom: "fc_b-S" 424 | top: "fc_b-S" 425 | } 426 | 427 | layer { 428 | name: "drop5-S" 429 | type: "Dropout" 430 | bottom: "fc_b-S" 431 | top: "fc_b-S" 432 | dropout_param { 433 | dropout_ratio: 0.25 434 | } 435 | } 436 | 437 | 438 | 439 | layer { 440 | name: "fc_p-S_64" 441 | type: "InnerProduct" 442 | bottom: "fc_b-S" 443 | top: "fc_p-S" 444 | param { 445 | lr_mult: 1 446 | name:"fc_p-S_w" 447 | decay_mult: 1 448 | } 449 | param { 450 | lr_mult: 2 451 | decay_mult: 0 452 | name:"fc_p-S_b" 453 | } 454 | inner_product_param { 455 | num_output: 64 456 | weight_filler { 457 | type: "gaussian" 458 | std: 0.01 459 | } 460 | bias_filler { 461 | type: "constant" 462 | value: 0 463 | } 464 | } 465 | } 466 | #################################################################################################### 467 | 468 | -------------------------------------------------------------------------------- /TU/Image/deploy_it_128.prototxt: -------------------------------------------------------------------------------- 1 | name: "CaffeNet" 2 | 3 | input: "st" 4 | input: "image" 5 | input_dim: 10 6 | input_dim: 3 7 | input_dim: 200 8 | input_dim: 200 9 | input_dim: 10 10 | input_dim: 3 11 | input_dim: 227 12 | input_dim: 227 13 | 14 | ################################################################################################# 15 | 16 | layer { 17 | name: "conv1" 18 | type: "Convolution" 19 | bottom: "image" 20 | top: "conv1" 21 | param { 22 | lr_mult: 1 23 | decay_mult: 1 24 | } 25 | param { 26 | lr_mult: 2 27 | decay_mult: 0 28 | } 29 | convolution_param { 30 | num_output: 96 31 | kernel_size: 11 32 | stride: 4 33 | weight_filler { 34 | type: "gaussian" 35 | std: 0.01 36 | } 37 | bias_filler { 38 | type: "constant" 39 | value: 0 40 | } 41 | } 42 | } 43 | layer { 44 | name: "conv1-S_p" 45 | type: "Convolution" 46 | bottom: "st" 47 | top: "conv1-S_p" 48 | param { 49 | lr_mult: 1 50 | decay_mult: 1 51 | name:"conv1-S_w" 52 | } 53 | param { 54 | lr_mult: 2 55 | name:"conv1-S_b" 56 | decay_mult: 0 57 | } 58 | convolution_param { 59 | num_output: 64 60 | kernel_size: 14 61 | stride: 3 62 | weight_filler { 63 | type: "gaussian" 64 | std: 0.01 65 | } 66 | bias_filler { 67 | type: "constant" 68 | value: 0 69 | } 70 | } 71 | } 72 | 73 | layer { 74 | name: "BN1-S_p" 75 | type: "BatchNorm" 76 | bottom: "conv1-S_p" 77 | top: "conv1bn-S_p" 78 | } 79 | 80 | layer { 81 | name: "SC1-S_p" 82 | type: "Scale" 83 | bottom: "conv1bn-S_p" 84 | top: "conv1sc-S_p" 85 | scale_param{ 86 | bias_term: true 87 | } 88 | } 89 | 90 | 91 | layer { 92 | name: "relu1-S_p" 93 | type: "ReLU" 94 | bottom: "conv1sc-S_p" 95 | top: "conv1sc-S_p" 96 | } 97 | 98 | layer { 99 | name: "pool1-S_p" 100 | type: "Pooling" 101 | bottom: "conv1sc-S_p" 102 | top: "pool1-S_p" 103 | pooling_param { 104 | pool: MAX 105 | kernel_size: 3 106 | stride: 2 107 | } 108 | } 109 | 110 | 111 | 112 | layer { 113 | name: "conv2_1-S_p" 114 | type: "Convolution" 115 | bottom: "pool1-S_p" 116 | top: "conv2_1-S_p" 117 | param { 118 | lr_mult: 1 119 | name:"conv2_1-S_w" 120 | decay_mult: 1 121 | } 122 | param { 123 | lr_mult: 2 124 | decay_mult: 0 125 | name:"conv2_1-S_b" 126 | } 127 | convolution_param { 128 | num_output: 128 129 | pad: 1 130 | kernel_size: 3 131 | stride: 1 132 | weight_filler { 133 | type: "gaussian" 134 | std: 0.01 135 | } 136 | bias_filler { 137 | type: "constant" 138 | value: 1 139 | } 140 | } 141 | } 142 | 143 | layer { 144 | name: "BN2_1-S_p" 145 | type: "BatchNorm" 146 | bottom: "conv2_1-S_p" 147 | top: "conv2_1bn-S_p" 148 | } 149 | 150 | layer { 151 | name: "SC2_1-S_p" 152 | type: "Scale" 153 | bottom: "conv2_1bn-S_p" 154 | top: "conv2_1sc-S_p" 155 | scale_param{ 156 | bias_term: true 157 | } 158 | } 159 | 160 | 161 | layer { 162 | name: "relu2_1-S_p" 163 | type: "ReLU" 164 | bottom: "conv2_1sc-S_p" 165 | top: "conv2_1sc-S_p" 166 | } 167 | 168 | 169 | 170 | 171 | 172 | 173 | layer { 174 | name: "conv2_2-S_p" 175 | type: "Convolution" 176 | bottom: "conv2_1sc-S_p" 177 | top: "conv2_2-S_p" 178 | param { 179 | lr_mult: 1 180 | decay_mult: 1 181 | name:"conv2_2-S_w" 182 | } 183 | param { 184 | lr_mult: 2 185 | decay_mult: 0 186 | name:"conv2_2-S_b" 187 | } 188 | convolution_param { 189 | num_output: 128 190 | pad: 1 191 | kernel_size: 3 192 | stride: 1 193 | weight_filler { 194 | type: "gaussian" 195 | std: 0.01 196 | } 197 | bias_filler { 198 | type: "constant" 199 | value: 1 200 | } 201 | } 202 | } 203 | 204 | layer { 205 | name: "BN2_2-S_p" 206 | type: "BatchNorm" 207 | bottom: "conv2_2-S_p" 208 | top: "conv2_2bn-S_p" 209 | } 210 | 211 | layer { 212 | name: "SC2_2-S_p" 213 | type: "Scale" 214 | bottom: "conv2_2bn-S_p" 215 | top: "conv2_2sc-S_p" 216 | scale_param{ 217 | bias_term: true 218 | } 219 | } 220 | 221 | 222 | layer { 223 | name: "relu2_2-S_p" 224 | type: "ReLU" 225 | bottom: "conv2_2sc-S_p" 226 | top: "conv2_2sc-S_p" 227 | } 228 | 229 | 230 | 231 | layer { 232 | name: "pool2-S_p" 233 | type: "Pooling" 234 | bottom: "conv2_2sc-S_p" 235 | top: "pool2-S_p" 236 | pooling_param { 237 | pool: MAX 238 | kernel_size: 3 239 | stride: 2 240 | } 241 | } 242 | 243 | 244 | 245 | 246 | 247 | layer { 248 | name: "conv3_1-S_p" 249 | type: "Convolution" 250 | bottom: "pool2-S_p" 251 | top: "conv3_1-S_p" 252 | param { 253 | lr_mult: 1 254 | decay_mult: 1 255 | name:"conv3_1-S_w" 256 | } 257 | param { 258 | lr_mult: 2 259 | decay_mult: 0 260 | name:"conv3_1-S_b" 261 | } 262 | convolution_param { 263 | num_output: 256 264 | pad: 1 265 | kernel_size: 3 266 | stride: 1 267 | weight_filler { 268 | type: "gaussian" 269 | std: 0.01 270 | } 271 | bias_filler { 272 | type: "constant" 273 | value: 1 274 | } 275 | } 276 | } 277 | 278 | layer { 279 | name: "BN3_1-S_p" 280 | type: "BatchNorm" 281 | bottom: "conv3_1-S_p" 282 | top: "conv3_1bn-S_p" 283 | } 284 | 285 | layer { 286 | name: "SC3_1-S_p" 287 | type: "Scale" 288 | bottom: "conv3_1bn-S_p" 289 | top: "conv3_1sc-S_p" 290 | scale_param{ 291 | bias_term: true 292 | } 293 | } 294 | 295 | 296 | layer { 297 | name: "relu3_1-S_p" 298 | type: "ReLU" 299 | bottom: "conv3_1sc-S_p" 300 | top: "conv3_1sc-S_p" 301 | } 302 | 303 | 304 | 305 | layer { 306 | name: "conv3_2-S_p" 307 | type: "Convolution" 308 | bottom: "conv3_1sc-S_p" 309 | top: "conv3_2-S_p" 310 | param { 311 | lr_mult: 1 312 | name:"conv3_2-S_w" 313 | decay_mult: 1 314 | } 315 | param { 316 | lr_mult: 2 317 | decay_mult: 0 318 | name:"conv3_2-S_b" 319 | } 320 | convolution_param { 321 | num_output: 256 322 | pad: 1 323 | kernel_size: 3 324 | stride: 1 325 | weight_filler { 326 | type: "gaussian" 327 | std: 0.01 328 | } 329 | bias_filler { 330 | type: "constant" 331 | value: 1 332 | } 333 | } 334 | } 335 | 336 | layer { 337 | name: "BN3_2-S_p" 338 | type: "BatchNorm" 339 | bottom: "conv3_2-S_p" 340 | top: "conv3_2bn-S_p" 341 | } 342 | 343 | layer { 344 | name: "SC3_2-S_p" 345 | type: "Scale" 346 | bottom: "conv3_2bn-S_p" 347 | top: "conv3_2sc-S_p" 348 | scale_param{ 349 | bias_term: true 350 | } 351 | } 352 | 353 | 354 | layer { 355 | name: "relu3_2-S_p" 356 | type: "ReLU" 357 | bottom: "conv3_2sc-S_p" 358 | top: "conv3_2sc-S_p" 359 | } 360 | 361 | 362 | 363 | 364 | layer { 365 | name: "pool3-S_p" 366 | type: "Pooling" 367 | bottom: "conv3_2sc-S_p" 368 | top: "pool3-S_p" 369 | pooling_param { 370 | pool: MAX 371 | kernel_size: 3 372 | stride: 2 373 | } 374 | } 375 | 376 | 377 | 378 | 379 | 380 | 381 | ############################################################################################# 382 | 383 | 384 | layer { 385 | name: "relu1" 386 | type: "ReLU" 387 | bottom: "conv1" 388 | top: "conv1" 389 | } 390 | layer { 391 | name: "pool1" 392 | type: "Pooling" 393 | bottom: "conv1" 394 | top: "pool1" 395 | pooling_param { 396 | pool: MAX 397 | kernel_size: 3 398 | stride: 2 399 | } 400 | } 401 | layer { 402 | name: "norm1" 403 | type: "LRN" 404 | bottom: "pool1" 405 | top: "norm1" 406 | lrn_param { 407 | local_size: 5 408 | alpha: 0.0001 409 | beta: 0.75 410 | } 411 | } 412 | layer { 413 | name: "conv2" 414 | type: "Convolution" 415 | bottom: "norm1" 416 | top: "conv2" 417 | param { 418 | lr_mult: 1 419 | decay_mult: 1 420 | } 421 | param { 422 | lr_mult: 2 423 | decay_mult: 0 424 | } 425 | convolution_param { 426 | num_output: 256 427 | pad: 2 428 | kernel_size: 5 429 | group: 2 430 | weight_filler { 431 | type: "gaussian" 432 | std: 0.01 433 | } 434 | bias_filler { 435 | type: "constant" 436 | value: 1 437 | } 438 | } 439 | } 440 | layer { 441 | name: "relu2" 442 | type: "ReLU" 443 | bottom: "conv2" 444 | top: "conv2" 445 | } 446 | layer { 447 | name: "pool2" 448 | type: "Pooling" 449 | bottom: "conv2" 450 | top: "pool2" 451 | pooling_param { 452 | pool: MAX 453 | kernel_size: 3 454 | stride: 2 455 | } 456 | } 457 | layer { 458 | name: "norm2" 459 | type: "LRN" 460 | bottom: "pool2" 461 | top: "norm2" 462 | lrn_param { 463 | local_size: 5 464 | alpha: 0.0001 465 | beta: 0.75 466 | } 467 | } 468 | layer { 469 | name: "conv3" 470 | type: "Convolution" 471 | bottom: "norm2" 472 | top: "conv3" 473 | param { 474 | lr_mult: 1 475 | decay_mult: 1 476 | } 477 | param { 478 | lr_mult: 2 479 | decay_mult: 0 480 | } 481 | convolution_param { 482 | num_output: 384 483 | pad: 1 484 | kernel_size: 3 485 | weight_filler { 486 | type: "gaussian" 487 | std: 0.01 488 | } 489 | bias_filler { 490 | type: "constant" 491 | value: 0 492 | } 493 | } 494 | } 495 | layer { 496 | name: "relu3" 497 | type: "ReLU" 498 | bottom: "conv3" 499 | top: "conv3" 500 | } 501 | layer { 502 | name: "conv4" 503 | type: "Convolution" 504 | bottom: "conv3" 505 | top: "conv4" 506 | param { 507 | lr_mult: 1 508 | decay_mult: 1 509 | } 510 | param { 511 | lr_mult: 2 512 | decay_mult: 0 513 | } 514 | convolution_param { 515 | num_output: 384 516 | pad: 1 517 | kernel_size: 3 518 | group: 2 519 | weight_filler { 520 | type: "gaussian" 521 | std: 0.01 522 | } 523 | bias_filler { 524 | type: "constant" 525 | value: 1 526 | } 527 | } 528 | } 529 | layer { 530 | name: "relu4" 531 | type: "ReLU" 532 | bottom: "conv4" 533 | top: "conv4" 534 | } 535 | layer { 536 | name: "conv5" 537 | type: "Convolution" 538 | bottom: "conv4" 539 | top: "conv5" 540 | param { 541 | lr_mult: 1 542 | decay_mult: 1 543 | } 544 | param { 545 | lr_mult: 2 546 | decay_mult: 0 547 | } 548 | convolution_param { 549 | num_output: 256 550 | pad: 1 551 | kernel_size: 3 552 | group: 2 553 | weight_filler { 554 | type: "gaussian" 555 | std: 0.01 556 | } 557 | bias_filler { 558 | type: "constant" 559 | value: 1 560 | } 561 | } 562 | } 563 | layer { 564 | name: "relu5" 565 | type: "ReLU" 566 | bottom: "conv5" 567 | top: "conv5" 568 | } 569 | layer { 570 | name: "pool5_new" 571 | type: "Pooling" 572 | bottom: "conv5" 573 | top: "pool5_new" 574 | pooling_param { 575 | pool: MAX 576 | kernel_size: 3 577 | stride: 2 578 | pad: 1 579 | } 580 | } 581 | 582 | 583 | ###################################################################################### 584 | layer { 585 | name:"concat1" 586 | bottom:"pool3-S_p" 587 | bottom:"pool5_new" 588 | type: "Concat" 589 | top: "concat1" 590 | concat_param { 591 | axis: 1 592 | } 593 | } 594 | 595 | ###################################################################################### 596 | layer { 597 | name: "fc_a-S_new" 598 | type: "InnerProduct" 599 | bottom: "concat1" 600 | top: "fc_a-S_new" 601 | param { 602 | lr_mult: 1 603 | decay_mult: 1 604 | } 605 | param { 606 | lr_mult: 2 607 | decay_mult: 0 608 | } 609 | inner_product_param { 610 | num_output: 4096 611 | weight_filler { 612 | type: "gaussian" 613 | std: 0.005 614 | } 615 | bias_filler { 616 | type: "constant" 617 | value: 1 618 | } 619 | } 620 | } 621 | 622 | layer { 623 | name: "relu4-S_new" 624 | type: "ReLU" 625 | bottom: "fc_a-S_new" 626 | top: "fc_a-S_new" 627 | } 628 | 629 | layer { 630 | name: "drop4-S_new" 631 | type: "Dropout" 632 | bottom: "fc_a-S_new" 633 | top: "fc_a-S_new" 634 | dropout_param { 635 | dropout_ratio: 0.1 636 | } 637 | } 638 | 639 | ########################################### 640 | layer { 641 | name: "fc6_new_new" 642 | type: "InnerProduct" 643 | bottom: "concat1" 644 | top: "fc6_new_new" 645 | param { 646 | lr_mult: 1 647 | decay_mult: 1 648 | } 649 | param { 650 | lr_mult: 2 651 | decay_mult: 0 652 | } 653 | inner_product_param { 654 | num_output: 4096 655 | weight_filler { 656 | type: "gaussian" 657 | std: 0.005 658 | } 659 | bias_filler { 660 | type: "constant" 661 | value: 1 662 | } 663 | } 664 | } 665 | 666 | layer { 667 | name: "relu6_new_new" 668 | type: "ReLU" 669 | bottom: "fc6_new_new" 670 | top: "fc6_new_new" 671 | } 672 | layer { 673 | name: "drop6_new_new" 674 | type: "Dropout" 675 | bottom: "fc6_new_new" 676 | top: "fc6_new_new" 677 | dropout_param { 678 | dropout_ratio: 0.3 679 | } 680 | } 681 | 682 | ######################################################################### 683 | layer { 684 | name:"concat2" 685 | bottom:"fc_a-S_new" 686 | bottom:"fc6_new_new" 687 | type: "Concat" 688 | top: "concat2" 689 | concat_param { 690 | axis: 1 691 | } 692 | } 693 | 694 | ########################################################################## 695 | 696 | layer { 697 | name: "fc_b-S_new" 698 | type: "InnerProduct" 699 | bottom: "concat2" 700 | top: "fc_b-S_new" 701 | param { 702 | lr_mult: 1 703 | decay_mult: 1 704 | } 705 | param { 706 | lr_mult: 2 707 | decay_mult: 0 708 | } 709 | inner_product_param { 710 | num_output: 1024 711 | weight_filler { 712 | type: "gaussian" 713 | std: 0.005 714 | } 715 | bias_filler { 716 | type: "constant" 717 | value: 1 718 | } 719 | } 720 | } 721 | 722 | 723 | layer { 724 | name: "relu5-S_new" 725 | type: "ReLU" 726 | bottom: "fc_b-S_new" 727 | top: "fc_b-S_new" 728 | } 729 | 730 | layer { 731 | name: "drop5-S_new" 732 | type: "Dropout" 733 | bottom: "fc_b-S_new" 734 | top: "fc_b-S_new" 735 | dropout_param { 736 | dropout_ratio: 0.2 737 | } 738 | } 739 | 740 | ############################################################################################### 741 | 742 | layer { 743 | name: "fc7_new_new" 744 | type: "InnerProduct" 745 | bottom: "concat2" 746 | top: "fc7_new_new" 747 | param { 748 | lr_mult: 1 749 | decay_mult: 1 750 | } 751 | param { 752 | lr_mult: 2 753 | decay_mult: 0 754 | } 755 | inner_product_param { 756 | num_output: 1024 757 | weight_filler { 758 | type: "gaussian" 759 | std: 0.005 760 | } 761 | bias_filler { 762 | type: "constant" 763 | value: 1 764 | } 765 | } 766 | } 767 | layer { 768 | name: "relu7_new_new" 769 | type: "ReLU" 770 | bottom: "fc7_new_new" 771 | top: "fc7_new_new" 772 | } 773 | layer { 774 | name: "drop7_new_new" 775 | type: "Dropout" 776 | bottom: "fc7_new_new" 777 | top: "fc7_new_new" 778 | dropout_param { 779 | dropout_ratio: 0.3 780 | } 781 | } 782 | 783 | ####################################################################################################### 784 | 785 | layer { 786 | name:"concat3" 787 | bottom:"fc_b-S_new" 788 | bottom:"fc7_new_new" 789 | type: "Concat" 790 | top: "concat3" 791 | concat_param { 792 | axis: 1 793 | } 794 | } 795 | 796 | ######################################################################################################### 797 | 798 | layer { 799 | name: "fc_fuse_TU_final" 800 | type: "InnerProduct" 801 | bottom: "concat3" 802 | top: "fc_fuse" 803 | param { 804 | lr_mult: 1 805 | decay_mult: 1 806 | } 807 | param { 808 | lr_mult: 2 809 | decay_mult: 0 810 | } 811 | inner_product_param { 812 | num_output: 128 813 | weight_filler { 814 | type: "gaussian" 815 | std: 0.01 816 | } 817 | bias_filler { 818 | type: "constant" 819 | value: 0 820 | } 821 | } 822 | } 823 | 824 | ###################################################################################### 825 | 826 | ################################################################################################# 827 | ################################################################################################# 828 | ################################################################################################# 829 | ################################################################################################# 830 | ################################################################################################# 831 | ################################################################################################# 832 | 833 | 834 | 835 | -------------------------------------------------------------------------------- /TU/Image/deploy_it_256.prototxt: -------------------------------------------------------------------------------- 1 | name: "CaffeNet" 2 | 3 | input: "st" 4 | input: "image" 5 | input_dim: 10 6 | input_dim: 3 7 | input_dim: 200 8 | input_dim: 200 9 | input_dim: 10 10 | input_dim: 3 11 | input_dim: 227 12 | input_dim: 227 13 | 14 | ################################################################################################# 15 | 16 | layer { 17 | name: "conv1" 18 | type: "Convolution" 19 | bottom: "image" 20 | top: "conv1" 21 | param { 22 | lr_mult: 1 23 | decay_mult: 1 24 | } 25 | param { 26 | lr_mult: 2 27 | decay_mult: 0 28 | } 29 | convolution_param { 30 | num_output: 96 31 | kernel_size: 11 32 | stride: 4 33 | weight_filler { 34 | type: "gaussian" 35 | std: 0.01 36 | } 37 | bias_filler { 38 | type: "constant" 39 | value: 0 40 | } 41 | } 42 | } 43 | layer { 44 | name: "conv1-S_p" 45 | type: "Convolution" 46 | bottom: "st" 47 | top: "conv1-S_p" 48 | param { 49 | lr_mult: 1 50 | decay_mult: 1 51 | name:"conv1-S_w" 52 | } 53 | param { 54 | lr_mult: 2 55 | name:"conv1-S_b" 56 | decay_mult: 0 57 | } 58 | convolution_param { 59 | num_output: 64 60 | kernel_size: 14 61 | stride: 3 62 | weight_filler { 63 | type: "gaussian" 64 | std: 0.01 65 | } 66 | bias_filler { 67 | type: "constant" 68 | value: 0 69 | } 70 | } 71 | } 72 | 73 | layer { 74 | name: "BN1-S_p" 75 | type: "BatchNorm" 76 | bottom: "conv1-S_p" 77 | top: "conv1bn-S_p" 78 | } 79 | 80 | layer { 81 | name: "SC1-S_p" 82 | type: "Scale" 83 | bottom: "conv1bn-S_p" 84 | top: "conv1sc-S_p" 85 | scale_param{ 86 | bias_term: true 87 | } 88 | } 89 | 90 | 91 | layer { 92 | name: "relu1-S_p" 93 | type: "ReLU" 94 | bottom: "conv1sc-S_p" 95 | top: "conv1sc-S_p" 96 | } 97 | 98 | layer { 99 | name: "pool1-S_p" 100 | type: "Pooling" 101 | bottom: "conv1sc-S_p" 102 | top: "pool1-S_p" 103 | pooling_param { 104 | pool: MAX 105 | kernel_size: 3 106 | stride: 2 107 | } 108 | } 109 | 110 | 111 | 112 | layer { 113 | name: "conv2_1-S_p" 114 | type: "Convolution" 115 | bottom: "pool1-S_p" 116 | top: "conv2_1-S_p" 117 | param { 118 | lr_mult: 1 119 | name:"conv2_1-S_w" 120 | decay_mult: 1 121 | } 122 | param { 123 | lr_mult: 2 124 | decay_mult: 0 125 | name:"conv2_1-S_b" 126 | } 127 | convolution_param { 128 | num_output: 128 129 | pad: 1 130 | kernel_size: 3 131 | stride: 1 132 | weight_filler { 133 | type: "gaussian" 134 | std: 0.01 135 | } 136 | bias_filler { 137 | type: "constant" 138 | value: 1 139 | } 140 | } 141 | } 142 | 143 | layer { 144 | name: "BN2_1-S_p" 145 | type: "BatchNorm" 146 | bottom: "conv2_1-S_p" 147 | top: "conv2_1bn-S_p" 148 | } 149 | 150 | layer { 151 | name: "SC2_1-S_p" 152 | type: "Scale" 153 | bottom: "conv2_1bn-S_p" 154 | top: "conv2_1sc-S_p" 155 | scale_param{ 156 | bias_term: true 157 | } 158 | } 159 | 160 | 161 | layer { 162 | name: "relu2_1-S_p" 163 | type: "ReLU" 164 | bottom: "conv2_1sc-S_p" 165 | top: "conv2_1sc-S_p" 166 | } 167 | 168 | 169 | 170 | 171 | 172 | 173 | layer { 174 | name: "conv2_2-S_p" 175 | type: "Convolution" 176 | bottom: "conv2_1sc-S_p" 177 | top: "conv2_2-S_p" 178 | param { 179 | lr_mult: 1 180 | decay_mult: 1 181 | name:"conv2_2-S_w" 182 | } 183 | param { 184 | lr_mult: 2 185 | decay_mult: 0 186 | name:"conv2_2-S_b" 187 | } 188 | convolution_param { 189 | num_output: 128 190 | pad: 1 191 | kernel_size: 3 192 | stride: 1 193 | weight_filler { 194 | type: "gaussian" 195 | std: 0.01 196 | } 197 | bias_filler { 198 | type: "constant" 199 | value: 1 200 | } 201 | } 202 | } 203 | 204 | layer { 205 | name: "BN2_2-S_p" 206 | type: "BatchNorm" 207 | bottom: "conv2_2-S_p" 208 | top: "conv2_2bn-S_p" 209 | } 210 | 211 | layer { 212 | name: "SC2_2-S_p" 213 | type: "Scale" 214 | bottom: "conv2_2bn-S_p" 215 | top: "conv2_2sc-S_p" 216 | scale_param{ 217 | bias_term: true 218 | } 219 | } 220 | 221 | 222 | layer { 223 | name: "relu2_2-S_p" 224 | type: "ReLU" 225 | bottom: "conv2_2sc-S_p" 226 | top: "conv2_2sc-S_p" 227 | } 228 | 229 | 230 | 231 | layer { 232 | name: "pool2-S_p" 233 | type: "Pooling" 234 | bottom: "conv2_2sc-S_p" 235 | top: "pool2-S_p" 236 | pooling_param { 237 | pool: MAX 238 | kernel_size: 3 239 | stride: 2 240 | } 241 | } 242 | 243 | 244 | 245 | 246 | 247 | layer { 248 | name: "conv3_1-S_p" 249 | type: "Convolution" 250 | bottom: "pool2-S_p" 251 | top: "conv3_1-S_p" 252 | param { 253 | lr_mult: 1 254 | decay_mult: 1 255 | name:"conv3_1-S_w" 256 | } 257 | param { 258 | lr_mult: 2 259 | decay_mult: 0 260 | name:"conv3_1-S_b" 261 | } 262 | convolution_param { 263 | num_output: 256 264 | pad: 1 265 | kernel_size: 3 266 | stride: 1 267 | weight_filler { 268 | type: "gaussian" 269 | std: 0.01 270 | } 271 | bias_filler { 272 | type: "constant" 273 | value: 1 274 | } 275 | } 276 | } 277 | 278 | layer { 279 | name: "BN3_1-S_p" 280 | type: "BatchNorm" 281 | bottom: "conv3_1-S_p" 282 | top: "conv3_1bn-S_p" 283 | } 284 | 285 | layer { 286 | name: "SC3_1-S_p" 287 | type: "Scale" 288 | bottom: "conv3_1bn-S_p" 289 | top: "conv3_1sc-S_p" 290 | scale_param{ 291 | bias_term: true 292 | } 293 | } 294 | 295 | 296 | layer { 297 | name: "relu3_1-S_p" 298 | type: "ReLU" 299 | bottom: "conv3_1sc-S_p" 300 | top: "conv3_1sc-S_p" 301 | } 302 | 303 | 304 | 305 | layer { 306 | name: "conv3_2-S_p" 307 | type: "Convolution" 308 | bottom: "conv3_1sc-S_p" 309 | top: "conv3_2-S_p" 310 | param { 311 | lr_mult: 1 312 | name:"conv3_2-S_w" 313 | decay_mult: 1 314 | } 315 | param { 316 | lr_mult: 2 317 | decay_mult: 0 318 | name:"conv3_2-S_b" 319 | } 320 | convolution_param { 321 | num_output: 256 322 | pad: 1 323 | kernel_size: 3 324 | stride: 1 325 | weight_filler { 326 | type: "gaussian" 327 | std: 0.01 328 | } 329 | bias_filler { 330 | type: "constant" 331 | value: 1 332 | } 333 | } 334 | } 335 | 336 | layer { 337 | name: "BN3_2-S_p" 338 | type: "BatchNorm" 339 | bottom: "conv3_2-S_p" 340 | top: "conv3_2bn-S_p" 341 | } 342 | 343 | layer { 344 | name: "SC3_2-S_p" 345 | type: "Scale" 346 | bottom: "conv3_2bn-S_p" 347 | top: "conv3_2sc-S_p" 348 | scale_param{ 349 | bias_term: true 350 | } 351 | } 352 | 353 | 354 | layer { 355 | name: "relu3_2-S_p" 356 | type: "ReLU" 357 | bottom: "conv3_2sc-S_p" 358 | top: "conv3_2sc-S_p" 359 | } 360 | 361 | 362 | 363 | 364 | layer { 365 | name: "pool3-S_p" 366 | type: "Pooling" 367 | bottom: "conv3_2sc-S_p" 368 | top: "pool3-S_p" 369 | pooling_param { 370 | pool: MAX 371 | kernel_size: 3 372 | stride: 2 373 | } 374 | } 375 | 376 | 377 | 378 | 379 | 380 | 381 | ############################################################################################# 382 | 383 | 384 | layer { 385 | name: "relu1" 386 | type: "ReLU" 387 | bottom: "conv1" 388 | top: "conv1" 389 | } 390 | layer { 391 | name: "pool1" 392 | type: "Pooling" 393 | bottom: "conv1" 394 | top: "pool1" 395 | pooling_param { 396 | pool: MAX 397 | kernel_size: 3 398 | stride: 2 399 | } 400 | } 401 | layer { 402 | name: "norm1" 403 | type: "LRN" 404 | bottom: "pool1" 405 | top: "norm1" 406 | lrn_param { 407 | local_size: 5 408 | alpha: 0.0001 409 | beta: 0.75 410 | } 411 | } 412 | layer { 413 | name: "conv2" 414 | type: "Convolution" 415 | bottom: "norm1" 416 | top: "conv2" 417 | param { 418 | lr_mult: 1 419 | decay_mult: 1 420 | } 421 | param { 422 | lr_mult: 2 423 | decay_mult: 0 424 | } 425 | convolution_param { 426 | num_output: 256 427 | pad: 2 428 | kernel_size: 5 429 | group: 2 430 | weight_filler { 431 | type: "gaussian" 432 | std: 0.01 433 | } 434 | bias_filler { 435 | type: "constant" 436 | value: 1 437 | } 438 | } 439 | } 440 | layer { 441 | name: "relu2" 442 | type: "ReLU" 443 | bottom: "conv2" 444 | top: "conv2" 445 | } 446 | layer { 447 | name: "pool2" 448 | type: "Pooling" 449 | bottom: "conv2" 450 | top: "pool2" 451 | pooling_param { 452 | pool: MAX 453 | kernel_size: 3 454 | stride: 2 455 | } 456 | } 457 | layer { 458 | name: "norm2" 459 | type: "LRN" 460 | bottom: "pool2" 461 | top: "norm2" 462 | lrn_param { 463 | local_size: 5 464 | alpha: 0.0001 465 | beta: 0.75 466 | } 467 | } 468 | layer { 469 | name: "conv3" 470 | type: "Convolution" 471 | bottom: "norm2" 472 | top: "conv3" 473 | param { 474 | lr_mult: 1 475 | decay_mult: 1 476 | } 477 | param { 478 | lr_mult: 2 479 | decay_mult: 0 480 | } 481 | convolution_param { 482 | num_output: 384 483 | pad: 1 484 | kernel_size: 3 485 | weight_filler { 486 | type: "gaussian" 487 | std: 0.01 488 | } 489 | bias_filler { 490 | type: "constant" 491 | value: 0 492 | } 493 | } 494 | } 495 | layer { 496 | name: "relu3" 497 | type: "ReLU" 498 | bottom: "conv3" 499 | top: "conv3" 500 | } 501 | layer { 502 | name: "conv4" 503 | type: "Convolution" 504 | bottom: "conv3" 505 | top: "conv4" 506 | param { 507 | lr_mult: 1 508 | decay_mult: 1 509 | } 510 | param { 511 | lr_mult: 2 512 | decay_mult: 0 513 | } 514 | convolution_param { 515 | num_output: 384 516 | pad: 1 517 | kernel_size: 3 518 | group: 2 519 | weight_filler { 520 | type: "gaussian" 521 | std: 0.01 522 | } 523 | bias_filler { 524 | type: "constant" 525 | value: 1 526 | } 527 | } 528 | } 529 | layer { 530 | name: "relu4" 531 | type: "ReLU" 532 | bottom: "conv4" 533 | top: "conv4" 534 | } 535 | layer { 536 | name: "conv5" 537 | type: "Convolution" 538 | bottom: "conv4" 539 | top: "conv5" 540 | param { 541 | lr_mult: 1 542 | decay_mult: 1 543 | } 544 | param { 545 | lr_mult: 2 546 | decay_mult: 0 547 | } 548 | convolution_param { 549 | num_output: 256 550 | pad: 1 551 | kernel_size: 3 552 | group: 2 553 | weight_filler { 554 | type: "gaussian" 555 | std: 0.01 556 | } 557 | bias_filler { 558 | type: "constant" 559 | value: 1 560 | } 561 | } 562 | } 563 | layer { 564 | name: "relu5" 565 | type: "ReLU" 566 | bottom: "conv5" 567 | top: "conv5" 568 | } 569 | layer { 570 | name: "pool5_new" 571 | type: "Pooling" 572 | bottom: "conv5" 573 | top: "pool5_new" 574 | pooling_param { 575 | pool: MAX 576 | kernel_size: 3 577 | stride: 2 578 | pad: 1 579 | } 580 | } 581 | 582 | 583 | ###################################################################################### 584 | layer { 585 | name:"concat1" 586 | bottom:"pool3-S_p" 587 | bottom:"pool5_new" 588 | type: "Concat" 589 | top: "concat1" 590 | concat_param { 591 | axis: 1 592 | } 593 | } 594 | 595 | ###################################################################################### 596 | layer { 597 | name: "fc_a-S_new" 598 | type: "InnerProduct" 599 | bottom: "concat1" 600 | top: "fc_a-S_new" 601 | param { 602 | lr_mult: 1 603 | decay_mult: 1 604 | } 605 | param { 606 | lr_mult: 2 607 | decay_mult: 0 608 | } 609 | inner_product_param { 610 | num_output: 4096 611 | weight_filler { 612 | type: "gaussian" 613 | std: 0.005 614 | } 615 | bias_filler { 616 | type: "constant" 617 | value: 1 618 | } 619 | } 620 | } 621 | 622 | layer { 623 | name: "relu4-S_new" 624 | type: "ReLU" 625 | bottom: "fc_a-S_new" 626 | top: "fc_a-S_new" 627 | } 628 | 629 | layer { 630 | name: "drop4-S_new" 631 | type: "Dropout" 632 | bottom: "fc_a-S_new" 633 | top: "fc_a-S_new" 634 | dropout_param { 635 | dropout_ratio: 0.1 636 | } 637 | } 638 | 639 | ########################################### 640 | layer { 641 | name: "fc6_new_new" 642 | type: "InnerProduct" 643 | bottom: "concat1" 644 | top: "fc6_new_new" 645 | param { 646 | lr_mult: 1 647 | decay_mult: 1 648 | } 649 | param { 650 | lr_mult: 2 651 | decay_mult: 0 652 | } 653 | inner_product_param { 654 | num_output: 4096 655 | weight_filler { 656 | type: "gaussian" 657 | std: 0.005 658 | } 659 | bias_filler { 660 | type: "constant" 661 | value: 1 662 | } 663 | } 664 | } 665 | 666 | layer { 667 | name: "relu6_new_new" 668 | type: "ReLU" 669 | bottom: "fc6_new_new" 670 | top: "fc6_new_new" 671 | } 672 | layer { 673 | name: "drop6_new_new" 674 | type: "Dropout" 675 | bottom: "fc6_new_new" 676 | top: "fc6_new_new" 677 | dropout_param { 678 | dropout_ratio: 0.3 679 | } 680 | } 681 | 682 | ######################################################################### 683 | layer { 684 | name:"concat2" 685 | bottom:"fc_a-S_new" 686 | bottom:"fc6_new_new" 687 | type: "Concat" 688 | top: "concat2" 689 | concat_param { 690 | axis: 1 691 | } 692 | } 693 | 694 | ########################################################################## 695 | 696 | layer { 697 | name: "fc_b-S_new" 698 | type: "InnerProduct" 699 | bottom: "concat2" 700 | top: "fc_b-S_new" 701 | param { 702 | lr_mult: 1 703 | decay_mult: 1 704 | } 705 | param { 706 | lr_mult: 2 707 | decay_mult: 0 708 | } 709 | inner_product_param { 710 | num_output: 1024 711 | weight_filler { 712 | type: "gaussian" 713 | std: 0.005 714 | } 715 | bias_filler { 716 | type: "constant" 717 | value: 1 718 | } 719 | } 720 | } 721 | 722 | 723 | layer { 724 | name: "relu5-S_new" 725 | type: "ReLU" 726 | bottom: "fc_b-S_new" 727 | top: "fc_b-S_new" 728 | } 729 | 730 | layer { 731 | name: "drop5-S_new" 732 | type: "Dropout" 733 | bottom: "fc_b-S_new" 734 | top: "fc_b-S_new" 735 | dropout_param { 736 | dropout_ratio: 0.2 737 | } 738 | } 739 | 740 | ############################################################################################### 741 | 742 | layer { 743 | name: "fc7_new_new" 744 | type: "InnerProduct" 745 | bottom: "concat2" 746 | top: "fc7_new_new" 747 | param { 748 | lr_mult: 1 749 | decay_mult: 1 750 | } 751 | param { 752 | lr_mult: 2 753 | decay_mult: 0 754 | } 755 | inner_product_param { 756 | num_output: 1024 757 | weight_filler { 758 | type: "gaussian" 759 | std: 0.005 760 | } 761 | bias_filler { 762 | type: "constant" 763 | value: 1 764 | } 765 | } 766 | } 767 | layer { 768 | name: "relu7_new_new" 769 | type: "ReLU" 770 | bottom: "fc7_new_new" 771 | top: "fc7_new_new" 772 | } 773 | layer { 774 | name: "drop7_new_new" 775 | type: "Dropout" 776 | bottom: "fc7_new_new" 777 | top: "fc7_new_new" 778 | dropout_param { 779 | dropout_ratio: 0.3 780 | } 781 | } 782 | 783 | ####################################################################################################### 784 | 785 | layer { 786 | name:"concat3" 787 | bottom:"fc_b-S_new" 788 | bottom:"fc7_new_new" 789 | type: "Concat" 790 | top: "concat3" 791 | concat_param { 792 | axis: 1 793 | } 794 | } 795 | 796 | ######################################################################################################### 797 | 798 | layer { 799 | name: "fc_fuse_TU_final" 800 | type: "InnerProduct" 801 | bottom: "concat3" 802 | top: "fc_fuse" 803 | param { 804 | lr_mult: 1 805 | decay_mult: 1 806 | } 807 | param { 808 | lr_mult: 2 809 | decay_mult: 0 810 | } 811 | inner_product_param { 812 | num_output: 256 813 | weight_filler { 814 | type: "gaussian" 815 | std: 0.01 816 | } 817 | bias_filler { 818 | type: "constant" 819 | value: 0 820 | } 821 | } 822 | } 823 | 824 | ###################################################################################### 825 | 826 | ################################################################################################# 827 | ################################################################################################# 828 | ################################################################################################# 829 | ################################################################################################# 830 | ################################################################################################# 831 | ################################################################################################# 832 | 833 | 834 | 835 | -------------------------------------------------------------------------------- /TU/Image/deploy_it_32.prototxt: -------------------------------------------------------------------------------- 1 | name: "CaffeNet" 2 | 3 | input: "st" 4 | input: "image" 5 | input_dim: 10 6 | input_dim: 3 7 | input_dim: 200 8 | input_dim: 200 9 | input_dim: 10 10 | input_dim: 3 11 | input_dim: 227 12 | input_dim: 227 13 | 14 | ################################################################################################# 15 | 16 | layer { 17 | name: "conv1" 18 | type: "Convolution" 19 | bottom: "image" 20 | top: "conv1" 21 | param { 22 | lr_mult: 1 23 | decay_mult: 1 24 | } 25 | param { 26 | lr_mult: 2 27 | decay_mult: 0 28 | } 29 | convolution_param { 30 | num_output: 96 31 | kernel_size: 11 32 | stride: 4 33 | weight_filler { 34 | type: "gaussian" 35 | std: 0.01 36 | } 37 | bias_filler { 38 | type: "constant" 39 | value: 0 40 | } 41 | } 42 | } 43 | layer { 44 | name: "conv1-S_p" 45 | type: "Convolution" 46 | bottom: "st" 47 | top: "conv1-S_p" 48 | param { 49 | lr_mult: 1 50 | decay_mult: 1 51 | name:"conv1-S_w" 52 | } 53 | param { 54 | lr_mult: 2 55 | name:"conv1-S_b" 56 | decay_mult: 0 57 | } 58 | convolution_param { 59 | num_output: 64 60 | kernel_size: 14 61 | stride: 3 62 | weight_filler { 63 | type: "gaussian" 64 | std: 0.01 65 | } 66 | bias_filler { 67 | type: "constant" 68 | value: 0 69 | } 70 | } 71 | } 72 | 73 | layer { 74 | name: "BN1-S_p" 75 | type: "BatchNorm" 76 | bottom: "conv1-S_p" 77 | top: "conv1bn-S_p" 78 | } 79 | 80 | layer { 81 | name: "SC1-S_p" 82 | type: "Scale" 83 | bottom: "conv1bn-S_p" 84 | top: "conv1sc-S_p" 85 | scale_param{ 86 | bias_term: true 87 | } 88 | } 89 | 90 | 91 | layer { 92 | name: "relu1-S_p" 93 | type: "ReLU" 94 | bottom: "conv1sc-S_p" 95 | top: "conv1sc-S_p" 96 | } 97 | 98 | layer { 99 | name: "pool1-S_p" 100 | type: "Pooling" 101 | bottom: "conv1sc-S_p" 102 | top: "pool1-S_p" 103 | pooling_param { 104 | pool: MAX 105 | kernel_size: 3 106 | stride: 2 107 | } 108 | } 109 | 110 | 111 | 112 | layer { 113 | name: "conv2_1-S_p" 114 | type: "Convolution" 115 | bottom: "pool1-S_p" 116 | top: "conv2_1-S_p" 117 | param { 118 | lr_mult: 1 119 | name:"conv2_1-S_w" 120 | decay_mult: 1 121 | } 122 | param { 123 | lr_mult: 2 124 | decay_mult: 0 125 | name:"conv2_1-S_b" 126 | } 127 | convolution_param { 128 | num_output: 128 129 | pad: 1 130 | kernel_size: 3 131 | stride: 1 132 | weight_filler { 133 | type: "gaussian" 134 | std: 0.01 135 | } 136 | bias_filler { 137 | type: "constant" 138 | value: 1 139 | } 140 | } 141 | } 142 | 143 | layer { 144 | name: "BN2_1-S_p" 145 | type: "BatchNorm" 146 | bottom: "conv2_1-S_p" 147 | top: "conv2_1bn-S_p" 148 | } 149 | 150 | layer { 151 | name: "SC2_1-S_p" 152 | type: "Scale" 153 | bottom: "conv2_1bn-S_p" 154 | top: "conv2_1sc-S_p" 155 | scale_param{ 156 | bias_term: true 157 | } 158 | } 159 | 160 | 161 | layer { 162 | name: "relu2_1-S_p" 163 | type: "ReLU" 164 | bottom: "conv2_1sc-S_p" 165 | top: "conv2_1sc-S_p" 166 | } 167 | 168 | 169 | 170 | 171 | 172 | 173 | layer { 174 | name: "conv2_2-S_p" 175 | type: "Convolution" 176 | bottom: "conv2_1sc-S_p" 177 | top: "conv2_2-S_p" 178 | param { 179 | lr_mult: 1 180 | decay_mult: 1 181 | name:"conv2_2-S_w" 182 | } 183 | param { 184 | lr_mult: 2 185 | decay_mult: 0 186 | name:"conv2_2-S_b" 187 | } 188 | convolution_param { 189 | num_output: 128 190 | pad: 1 191 | kernel_size: 3 192 | stride: 1 193 | weight_filler { 194 | type: "gaussian" 195 | std: 0.01 196 | } 197 | bias_filler { 198 | type: "constant" 199 | value: 1 200 | } 201 | } 202 | } 203 | 204 | layer { 205 | name: "BN2_2-S_p" 206 | type: "BatchNorm" 207 | bottom: "conv2_2-S_p" 208 | top: "conv2_2bn-S_p" 209 | } 210 | 211 | layer { 212 | name: "SC2_2-S_p" 213 | type: "Scale" 214 | bottom: "conv2_2bn-S_p" 215 | top: "conv2_2sc-S_p" 216 | scale_param{ 217 | bias_term: true 218 | } 219 | } 220 | 221 | 222 | layer { 223 | name: "relu2_2-S_p" 224 | type: "ReLU" 225 | bottom: "conv2_2sc-S_p" 226 | top: "conv2_2sc-S_p" 227 | } 228 | 229 | 230 | 231 | layer { 232 | name: "pool2-S_p" 233 | type: "Pooling" 234 | bottom: "conv2_2sc-S_p" 235 | top: "pool2-S_p" 236 | pooling_param { 237 | pool: MAX 238 | kernel_size: 3 239 | stride: 2 240 | } 241 | } 242 | 243 | 244 | 245 | 246 | 247 | layer { 248 | name: "conv3_1-S_p" 249 | type: "Convolution" 250 | bottom: "pool2-S_p" 251 | top: "conv3_1-S_p" 252 | param { 253 | lr_mult: 1 254 | decay_mult: 1 255 | name:"conv3_1-S_w" 256 | } 257 | param { 258 | lr_mult: 2 259 | decay_mult: 0 260 | name:"conv3_1-S_b" 261 | } 262 | convolution_param { 263 | num_output: 256 264 | pad: 1 265 | kernel_size: 3 266 | stride: 1 267 | weight_filler { 268 | type: "gaussian" 269 | std: 0.01 270 | } 271 | bias_filler { 272 | type: "constant" 273 | value: 1 274 | } 275 | } 276 | } 277 | 278 | layer { 279 | name: "BN3_1-S_p" 280 | type: "BatchNorm" 281 | bottom: "conv3_1-S_p" 282 | top: "conv3_1bn-S_p" 283 | } 284 | 285 | layer { 286 | name: "SC3_1-S_p" 287 | type: "Scale" 288 | bottom: "conv3_1bn-S_p" 289 | top: "conv3_1sc-S_p" 290 | scale_param{ 291 | bias_term: true 292 | } 293 | } 294 | 295 | 296 | layer { 297 | name: "relu3_1-S_p" 298 | type: "ReLU" 299 | bottom: "conv3_1sc-S_p" 300 | top: "conv3_1sc-S_p" 301 | } 302 | 303 | 304 | 305 | layer { 306 | name: "conv3_2-S_p" 307 | type: "Convolution" 308 | bottom: "conv3_1sc-S_p" 309 | top: "conv3_2-S_p" 310 | param { 311 | lr_mult: 1 312 | name:"conv3_2-S_w" 313 | decay_mult: 1 314 | } 315 | param { 316 | lr_mult: 2 317 | decay_mult: 0 318 | name:"conv3_2-S_b" 319 | } 320 | convolution_param { 321 | num_output: 256 322 | pad: 1 323 | kernel_size: 3 324 | stride: 1 325 | weight_filler { 326 | type: "gaussian" 327 | std: 0.01 328 | } 329 | bias_filler { 330 | type: "constant" 331 | value: 1 332 | } 333 | } 334 | } 335 | 336 | layer { 337 | name: "BN3_2-S_p" 338 | type: "BatchNorm" 339 | bottom: "conv3_2-S_p" 340 | top: "conv3_2bn-S_p" 341 | } 342 | 343 | layer { 344 | name: "SC3_2-S_p" 345 | type: "Scale" 346 | bottom: "conv3_2bn-S_p" 347 | top: "conv3_2sc-S_p" 348 | scale_param{ 349 | bias_term: true 350 | } 351 | } 352 | 353 | 354 | layer { 355 | name: "relu3_2-S_p" 356 | type: "ReLU" 357 | bottom: "conv3_2sc-S_p" 358 | top: "conv3_2sc-S_p" 359 | } 360 | 361 | 362 | 363 | 364 | layer { 365 | name: "pool3-S_p" 366 | type: "Pooling" 367 | bottom: "conv3_2sc-S_p" 368 | top: "pool3-S_p" 369 | pooling_param { 370 | pool: MAX 371 | kernel_size: 3 372 | stride: 2 373 | } 374 | } 375 | 376 | 377 | 378 | 379 | 380 | 381 | ############################################################################################# 382 | 383 | 384 | layer { 385 | name: "relu1" 386 | type: "ReLU" 387 | bottom: "conv1" 388 | top: "conv1" 389 | } 390 | layer { 391 | name: "pool1" 392 | type: "Pooling" 393 | bottom: "conv1" 394 | top: "pool1" 395 | pooling_param { 396 | pool: MAX 397 | kernel_size: 3 398 | stride: 2 399 | } 400 | } 401 | layer { 402 | name: "norm1" 403 | type: "LRN" 404 | bottom: "pool1" 405 | top: "norm1" 406 | lrn_param { 407 | local_size: 5 408 | alpha: 0.0001 409 | beta: 0.75 410 | } 411 | } 412 | layer { 413 | name: "conv2" 414 | type: "Convolution" 415 | bottom: "norm1" 416 | top: "conv2" 417 | param { 418 | lr_mult: 1 419 | decay_mult: 1 420 | } 421 | param { 422 | lr_mult: 2 423 | decay_mult: 0 424 | } 425 | convolution_param { 426 | num_output: 256 427 | pad: 2 428 | kernel_size: 5 429 | group: 2 430 | weight_filler { 431 | type: "gaussian" 432 | std: 0.01 433 | } 434 | bias_filler { 435 | type: "constant" 436 | value: 1 437 | } 438 | } 439 | } 440 | layer { 441 | name: "relu2" 442 | type: "ReLU" 443 | bottom: "conv2" 444 | top: "conv2" 445 | } 446 | layer { 447 | name: "pool2" 448 | type: "Pooling" 449 | bottom: "conv2" 450 | top: "pool2" 451 | pooling_param { 452 | pool: MAX 453 | kernel_size: 3 454 | stride: 2 455 | } 456 | } 457 | layer { 458 | name: "norm2" 459 | type: "LRN" 460 | bottom: "pool2" 461 | top: "norm2" 462 | lrn_param { 463 | local_size: 5 464 | alpha: 0.0001 465 | beta: 0.75 466 | } 467 | } 468 | layer { 469 | name: "conv3" 470 | type: "Convolution" 471 | bottom: "norm2" 472 | top: "conv3" 473 | param { 474 | lr_mult: 1 475 | decay_mult: 1 476 | } 477 | param { 478 | lr_mult: 2 479 | decay_mult: 0 480 | } 481 | convolution_param { 482 | num_output: 384 483 | pad: 1 484 | kernel_size: 3 485 | weight_filler { 486 | type: "gaussian" 487 | std: 0.01 488 | } 489 | bias_filler { 490 | type: "constant" 491 | value: 0 492 | } 493 | } 494 | } 495 | layer { 496 | name: "relu3" 497 | type: "ReLU" 498 | bottom: "conv3" 499 | top: "conv3" 500 | } 501 | layer { 502 | name: "conv4" 503 | type: "Convolution" 504 | bottom: "conv3" 505 | top: "conv4" 506 | param { 507 | lr_mult: 1 508 | decay_mult: 1 509 | } 510 | param { 511 | lr_mult: 2 512 | decay_mult: 0 513 | } 514 | convolution_param { 515 | num_output: 384 516 | pad: 1 517 | kernel_size: 3 518 | group: 2 519 | weight_filler { 520 | type: "gaussian" 521 | std: 0.01 522 | } 523 | bias_filler { 524 | type: "constant" 525 | value: 1 526 | } 527 | } 528 | } 529 | layer { 530 | name: "relu4" 531 | type: "ReLU" 532 | bottom: "conv4" 533 | top: "conv4" 534 | } 535 | layer { 536 | name: "conv5" 537 | type: "Convolution" 538 | bottom: "conv4" 539 | top: "conv5" 540 | param { 541 | lr_mult: 1 542 | decay_mult: 1 543 | } 544 | param { 545 | lr_mult: 2 546 | decay_mult: 0 547 | } 548 | convolution_param { 549 | num_output: 256 550 | pad: 1 551 | kernel_size: 3 552 | group: 2 553 | weight_filler { 554 | type: "gaussian" 555 | std: 0.01 556 | } 557 | bias_filler { 558 | type: "constant" 559 | value: 1 560 | } 561 | } 562 | } 563 | layer { 564 | name: "relu5" 565 | type: "ReLU" 566 | bottom: "conv5" 567 | top: "conv5" 568 | } 569 | layer { 570 | name: "pool5_new" 571 | type: "Pooling" 572 | bottom: "conv5" 573 | top: "pool5_new" 574 | pooling_param { 575 | pool: MAX 576 | kernel_size: 3 577 | stride: 2 578 | pad: 1 579 | } 580 | } 581 | 582 | 583 | ###################################################################################### 584 | layer { 585 | name:"concat1" 586 | bottom:"pool3-S_p" 587 | bottom:"pool5_new" 588 | type: "Concat" 589 | top: "concat1" 590 | concat_param { 591 | axis: 1 592 | } 593 | } 594 | 595 | ###################################################################################### 596 | layer { 597 | name: "fc_a-S_new" 598 | type: "InnerProduct" 599 | bottom: "concat1" 600 | top: "fc_a-S_new" 601 | param { 602 | lr_mult: 1 603 | decay_mult: 1 604 | } 605 | param { 606 | lr_mult: 2 607 | decay_mult: 0 608 | } 609 | inner_product_param { 610 | num_output: 4096 611 | weight_filler { 612 | type: "gaussian" 613 | std: 0.005 614 | } 615 | bias_filler { 616 | type: "constant" 617 | value: 1 618 | } 619 | } 620 | } 621 | 622 | layer { 623 | name: "relu4-S_new" 624 | type: "ReLU" 625 | bottom: "fc_a-S_new" 626 | top: "fc_a-S_new" 627 | } 628 | 629 | layer { 630 | name: "drop4-S_new" 631 | type: "Dropout" 632 | bottom: "fc_a-S_new" 633 | top: "fc_a-S_new" 634 | dropout_param { 635 | dropout_ratio: 0.1 636 | } 637 | } 638 | 639 | ########################################### 640 | layer { 641 | name: "fc6_new_new" 642 | type: "InnerProduct" 643 | bottom: "concat1" 644 | top: "fc6_new_new" 645 | param { 646 | lr_mult: 1 647 | decay_mult: 1 648 | } 649 | param { 650 | lr_mult: 2 651 | decay_mult: 0 652 | } 653 | inner_product_param { 654 | num_output: 4096 655 | weight_filler { 656 | type: "gaussian" 657 | std: 0.005 658 | } 659 | bias_filler { 660 | type: "constant" 661 | value: 1 662 | } 663 | } 664 | } 665 | 666 | layer { 667 | name: "relu6_new_new" 668 | type: "ReLU" 669 | bottom: "fc6_new_new" 670 | top: "fc6_new_new" 671 | } 672 | layer { 673 | name: "drop6_new_new" 674 | type: "Dropout" 675 | bottom: "fc6_new_new" 676 | top: "fc6_new_new" 677 | dropout_param { 678 | dropout_ratio: 0.3 679 | } 680 | } 681 | 682 | ######################################################################### 683 | layer { 684 | name:"concat2" 685 | bottom:"fc_a-S_new" 686 | bottom:"fc6_new_new" 687 | type: "Concat" 688 | top: "concat2" 689 | concat_param { 690 | axis: 1 691 | } 692 | } 693 | 694 | ########################################################################## 695 | 696 | layer { 697 | name: "fc_b-S_new" 698 | type: "InnerProduct" 699 | bottom: "concat2" 700 | top: "fc_b-S_new" 701 | param { 702 | lr_mult: 1 703 | decay_mult: 1 704 | } 705 | param { 706 | lr_mult: 2 707 | decay_mult: 0 708 | } 709 | inner_product_param { 710 | num_output: 1024 711 | weight_filler { 712 | type: "gaussian" 713 | std: 0.005 714 | } 715 | bias_filler { 716 | type: "constant" 717 | value: 1 718 | } 719 | } 720 | } 721 | 722 | 723 | layer { 724 | name: "relu5-S_new" 725 | type: "ReLU" 726 | bottom: "fc_b-S_new" 727 | top: "fc_b-S_new" 728 | } 729 | 730 | layer { 731 | name: "drop5-S_new" 732 | type: "Dropout" 733 | bottom: "fc_b-S_new" 734 | top: "fc_b-S_new" 735 | dropout_param { 736 | dropout_ratio: 0.2 737 | } 738 | } 739 | 740 | ############################################################################################### 741 | 742 | layer { 743 | name: "fc7_new_new" 744 | type: "InnerProduct" 745 | bottom: "concat2" 746 | top: "fc7_new_new" 747 | param { 748 | lr_mult: 1 749 | decay_mult: 1 750 | } 751 | param { 752 | lr_mult: 2 753 | decay_mult: 0 754 | } 755 | inner_product_param { 756 | num_output: 1024 757 | weight_filler { 758 | type: "gaussian" 759 | std: 0.005 760 | } 761 | bias_filler { 762 | type: "constant" 763 | value: 1 764 | } 765 | } 766 | } 767 | layer { 768 | name: "relu7_new_new" 769 | type: "ReLU" 770 | bottom: "fc7_new_new" 771 | top: "fc7_new_new" 772 | } 773 | layer { 774 | name: "drop7_new_new" 775 | type: "Dropout" 776 | bottom: "fc7_new_new" 777 | top: "fc7_new_new" 778 | dropout_param { 779 | dropout_ratio: 0.3 780 | } 781 | } 782 | 783 | ####################################################################################################### 784 | 785 | layer { 786 | name:"concat3" 787 | bottom:"fc_b-S_new" 788 | bottom:"fc7_new_new" 789 | type: "Concat" 790 | top: "concat3" 791 | concat_param { 792 | axis: 1 793 | } 794 | } 795 | 796 | ######################################################################################################### 797 | 798 | layer { 799 | name: "fc_fuse_TU_final" 800 | type: "InnerProduct" 801 | bottom: "concat3" 802 | top: "fc_fuse" 803 | param { 804 | lr_mult: 1 805 | decay_mult: 1 806 | } 807 | param { 808 | lr_mult: 2 809 | decay_mult: 0 810 | } 811 | inner_product_param { 812 | num_output: 32 813 | weight_filler { 814 | type: "gaussian" 815 | std: 0.01 816 | } 817 | bias_filler { 818 | type: "constant" 819 | value: 0 820 | } 821 | } 822 | } 823 | 824 | ###################################################################################### 825 | 826 | ################################################################################################# 827 | ################################################################################################# 828 | ################################################################################################# 829 | ################################################################################################# 830 | ################################################################################################# 831 | ################################################################################################# 832 | 833 | 834 | 835 | -------------------------------------------------------------------------------- /TU/Image/deploy_it_64.prototxt: -------------------------------------------------------------------------------- 1 | name: "CaffeNet" 2 | 3 | input: "st" 4 | input: "image" 5 | input_dim: 10 6 | input_dim: 3 7 | input_dim: 200 8 | input_dim: 200 9 | input_dim: 10 10 | input_dim: 3 11 | input_dim: 227 12 | input_dim: 227 13 | 14 | ################################################################################################# 15 | 16 | layer { 17 | name: "conv1" 18 | type: "Convolution" 19 | bottom: "image" 20 | top: "conv1" 21 | param { 22 | lr_mult: 1 23 | decay_mult: 1 24 | } 25 | param { 26 | lr_mult: 2 27 | decay_mult: 0 28 | } 29 | convolution_param { 30 | num_output: 96 31 | kernel_size: 11 32 | stride: 4 33 | weight_filler { 34 | type: "gaussian" 35 | std: 0.01 36 | } 37 | bias_filler { 38 | type: "constant" 39 | value: 0 40 | } 41 | } 42 | } 43 | layer { 44 | name: "conv1-S_p" 45 | type: "Convolution" 46 | bottom: "st" 47 | top: "conv1-S_p" 48 | param { 49 | lr_mult: 1 50 | decay_mult: 1 51 | name:"conv1-S_w" 52 | } 53 | param { 54 | lr_mult: 2 55 | name:"conv1-S_b" 56 | decay_mult: 0 57 | } 58 | convolution_param { 59 | num_output: 64 60 | kernel_size: 14 61 | stride: 3 62 | weight_filler { 63 | type: "gaussian" 64 | std: 0.01 65 | } 66 | bias_filler { 67 | type: "constant" 68 | value: 0 69 | } 70 | } 71 | } 72 | 73 | layer { 74 | name: "BN1-S_p" 75 | type: "BatchNorm" 76 | bottom: "conv1-S_p" 77 | top: "conv1bn-S_p" 78 | } 79 | 80 | layer { 81 | name: "SC1-S_p" 82 | type: "Scale" 83 | bottom: "conv1bn-S_p" 84 | top: "conv1sc-S_p" 85 | scale_param{ 86 | bias_term: true 87 | } 88 | } 89 | 90 | 91 | layer { 92 | name: "relu1-S_p" 93 | type: "ReLU" 94 | bottom: "conv1sc-S_p" 95 | top: "conv1sc-S_p" 96 | } 97 | 98 | layer { 99 | name: "pool1-S_p" 100 | type: "Pooling" 101 | bottom: "conv1sc-S_p" 102 | top: "pool1-S_p" 103 | pooling_param { 104 | pool: MAX 105 | kernel_size: 3 106 | stride: 2 107 | } 108 | } 109 | 110 | 111 | 112 | layer { 113 | name: "conv2_1-S_p" 114 | type: "Convolution" 115 | bottom: "pool1-S_p" 116 | top: "conv2_1-S_p" 117 | param { 118 | lr_mult: 1 119 | name:"conv2_1-S_w" 120 | decay_mult: 1 121 | } 122 | param { 123 | lr_mult: 2 124 | decay_mult: 0 125 | name:"conv2_1-S_b" 126 | } 127 | convolution_param { 128 | num_output: 128 129 | pad: 1 130 | kernel_size: 3 131 | stride: 1 132 | weight_filler { 133 | type: "gaussian" 134 | std: 0.01 135 | } 136 | bias_filler { 137 | type: "constant" 138 | value: 1 139 | } 140 | } 141 | } 142 | 143 | layer { 144 | name: "BN2_1-S_p" 145 | type: "BatchNorm" 146 | bottom: "conv2_1-S_p" 147 | top: "conv2_1bn-S_p" 148 | } 149 | 150 | layer { 151 | name: "SC2_1-S_p" 152 | type: "Scale" 153 | bottom: "conv2_1bn-S_p" 154 | top: "conv2_1sc-S_p" 155 | scale_param{ 156 | bias_term: true 157 | } 158 | } 159 | 160 | 161 | layer { 162 | name: "relu2_1-S_p" 163 | type: "ReLU" 164 | bottom: "conv2_1sc-S_p" 165 | top: "conv2_1sc-S_p" 166 | } 167 | 168 | 169 | 170 | 171 | 172 | 173 | layer { 174 | name: "conv2_2-S_p" 175 | type: "Convolution" 176 | bottom: "conv2_1sc-S_p" 177 | top: "conv2_2-S_p" 178 | param { 179 | lr_mult: 1 180 | decay_mult: 1 181 | name:"conv2_2-S_w" 182 | } 183 | param { 184 | lr_mult: 2 185 | decay_mult: 0 186 | name:"conv2_2-S_b" 187 | } 188 | convolution_param { 189 | num_output: 128 190 | pad: 1 191 | kernel_size: 3 192 | stride: 1 193 | weight_filler { 194 | type: "gaussian" 195 | std: 0.01 196 | } 197 | bias_filler { 198 | type: "constant" 199 | value: 1 200 | } 201 | } 202 | } 203 | 204 | layer { 205 | name: "BN2_2-S_p" 206 | type: "BatchNorm" 207 | bottom: "conv2_2-S_p" 208 | top: "conv2_2bn-S_p" 209 | } 210 | 211 | layer { 212 | name: "SC2_2-S_p" 213 | type: "Scale" 214 | bottom: "conv2_2bn-S_p" 215 | top: "conv2_2sc-S_p" 216 | scale_param{ 217 | bias_term: true 218 | } 219 | } 220 | 221 | 222 | layer { 223 | name: "relu2_2-S_p" 224 | type: "ReLU" 225 | bottom: "conv2_2sc-S_p" 226 | top: "conv2_2sc-S_p" 227 | } 228 | 229 | 230 | 231 | layer { 232 | name: "pool2-S_p" 233 | type: "Pooling" 234 | bottom: "conv2_2sc-S_p" 235 | top: "pool2-S_p" 236 | pooling_param { 237 | pool: MAX 238 | kernel_size: 3 239 | stride: 2 240 | } 241 | } 242 | 243 | 244 | 245 | 246 | 247 | layer { 248 | name: "conv3_1-S_p" 249 | type: "Convolution" 250 | bottom: "pool2-S_p" 251 | top: "conv3_1-S_p" 252 | param { 253 | lr_mult: 1 254 | decay_mult: 1 255 | name:"conv3_1-S_w" 256 | } 257 | param { 258 | lr_mult: 2 259 | decay_mult: 0 260 | name:"conv3_1-S_b" 261 | } 262 | convolution_param { 263 | num_output: 256 264 | pad: 1 265 | kernel_size: 3 266 | stride: 1 267 | weight_filler { 268 | type: "gaussian" 269 | std: 0.01 270 | } 271 | bias_filler { 272 | type: "constant" 273 | value: 1 274 | } 275 | } 276 | } 277 | 278 | layer { 279 | name: "BN3_1-S_p" 280 | type: "BatchNorm" 281 | bottom: "conv3_1-S_p" 282 | top: "conv3_1bn-S_p" 283 | } 284 | 285 | layer { 286 | name: "SC3_1-S_p" 287 | type: "Scale" 288 | bottom: "conv3_1bn-S_p" 289 | top: "conv3_1sc-S_p" 290 | scale_param{ 291 | bias_term: true 292 | } 293 | } 294 | 295 | 296 | layer { 297 | name: "relu3_1-S_p" 298 | type: "ReLU" 299 | bottom: "conv3_1sc-S_p" 300 | top: "conv3_1sc-S_p" 301 | } 302 | 303 | 304 | 305 | layer { 306 | name: "conv3_2-S_p" 307 | type: "Convolution" 308 | bottom: "conv3_1sc-S_p" 309 | top: "conv3_2-S_p" 310 | param { 311 | lr_mult: 1 312 | name:"conv3_2-S_w" 313 | decay_mult: 1 314 | } 315 | param { 316 | lr_mult: 2 317 | decay_mult: 0 318 | name:"conv3_2-S_b" 319 | } 320 | convolution_param { 321 | num_output: 256 322 | pad: 1 323 | kernel_size: 3 324 | stride: 1 325 | weight_filler { 326 | type: "gaussian" 327 | std: 0.01 328 | } 329 | bias_filler { 330 | type: "constant" 331 | value: 1 332 | } 333 | } 334 | } 335 | 336 | layer { 337 | name: "BN3_2-S_p" 338 | type: "BatchNorm" 339 | bottom: "conv3_2-S_p" 340 | top: "conv3_2bn-S_p" 341 | } 342 | 343 | layer { 344 | name: "SC3_2-S_p" 345 | type: "Scale" 346 | bottom: "conv3_2bn-S_p" 347 | top: "conv3_2sc-S_p" 348 | scale_param{ 349 | bias_term: true 350 | } 351 | } 352 | 353 | 354 | layer { 355 | name: "relu3_2-S_p" 356 | type: "ReLU" 357 | bottom: "conv3_2sc-S_p" 358 | top: "conv3_2sc-S_p" 359 | } 360 | 361 | 362 | 363 | 364 | layer { 365 | name: "pool3-S_p" 366 | type: "Pooling" 367 | bottom: "conv3_2sc-S_p" 368 | top: "pool3-S_p" 369 | pooling_param { 370 | pool: MAX 371 | kernel_size: 3 372 | stride: 2 373 | } 374 | } 375 | 376 | 377 | 378 | 379 | 380 | 381 | ############################################################################################# 382 | 383 | 384 | layer { 385 | name: "relu1" 386 | type: "ReLU" 387 | bottom: "conv1" 388 | top: "conv1" 389 | } 390 | layer { 391 | name: "pool1" 392 | type: "Pooling" 393 | bottom: "conv1" 394 | top: "pool1" 395 | pooling_param { 396 | pool: MAX 397 | kernel_size: 3 398 | stride: 2 399 | } 400 | } 401 | layer { 402 | name: "norm1" 403 | type: "LRN" 404 | bottom: "pool1" 405 | top: "norm1" 406 | lrn_param { 407 | local_size: 5 408 | alpha: 0.0001 409 | beta: 0.75 410 | } 411 | } 412 | layer { 413 | name: "conv2" 414 | type: "Convolution" 415 | bottom: "norm1" 416 | top: "conv2" 417 | param { 418 | lr_mult: 1 419 | decay_mult: 1 420 | } 421 | param { 422 | lr_mult: 2 423 | decay_mult: 0 424 | } 425 | convolution_param { 426 | num_output: 256 427 | pad: 2 428 | kernel_size: 5 429 | group: 2 430 | weight_filler { 431 | type: "gaussian" 432 | std: 0.01 433 | } 434 | bias_filler { 435 | type: "constant" 436 | value: 1 437 | } 438 | } 439 | } 440 | layer { 441 | name: "relu2" 442 | type: "ReLU" 443 | bottom: "conv2" 444 | top: "conv2" 445 | } 446 | layer { 447 | name: "pool2" 448 | type: "Pooling" 449 | bottom: "conv2" 450 | top: "pool2" 451 | pooling_param { 452 | pool: MAX 453 | kernel_size: 3 454 | stride: 2 455 | } 456 | } 457 | layer { 458 | name: "norm2" 459 | type: "LRN" 460 | bottom: "pool2" 461 | top: "norm2" 462 | lrn_param { 463 | local_size: 5 464 | alpha: 0.0001 465 | beta: 0.75 466 | } 467 | } 468 | layer { 469 | name: "conv3" 470 | type: "Convolution" 471 | bottom: "norm2" 472 | top: "conv3" 473 | param { 474 | lr_mult: 1 475 | decay_mult: 1 476 | } 477 | param { 478 | lr_mult: 2 479 | decay_mult: 0 480 | } 481 | convolution_param { 482 | num_output: 384 483 | pad: 1 484 | kernel_size: 3 485 | weight_filler { 486 | type: "gaussian" 487 | std: 0.01 488 | } 489 | bias_filler { 490 | type: "constant" 491 | value: 0 492 | } 493 | } 494 | } 495 | layer { 496 | name: "relu3" 497 | type: "ReLU" 498 | bottom: "conv3" 499 | top: "conv3" 500 | } 501 | layer { 502 | name: "conv4" 503 | type: "Convolution" 504 | bottom: "conv3" 505 | top: "conv4" 506 | param { 507 | lr_mult: 1 508 | decay_mult: 1 509 | } 510 | param { 511 | lr_mult: 2 512 | decay_mult: 0 513 | } 514 | convolution_param { 515 | num_output: 384 516 | pad: 1 517 | kernel_size: 3 518 | group: 2 519 | weight_filler { 520 | type: "gaussian" 521 | std: 0.01 522 | } 523 | bias_filler { 524 | type: "constant" 525 | value: 1 526 | } 527 | } 528 | } 529 | layer { 530 | name: "relu4" 531 | type: "ReLU" 532 | bottom: "conv4" 533 | top: "conv4" 534 | } 535 | layer { 536 | name: "conv5" 537 | type: "Convolution" 538 | bottom: "conv4" 539 | top: "conv5" 540 | param { 541 | lr_mult: 1 542 | decay_mult: 1 543 | } 544 | param { 545 | lr_mult: 2 546 | decay_mult: 0 547 | } 548 | convolution_param { 549 | num_output: 256 550 | pad: 1 551 | kernel_size: 3 552 | group: 2 553 | weight_filler { 554 | type: "gaussian" 555 | std: 0.01 556 | } 557 | bias_filler { 558 | type: "constant" 559 | value: 1 560 | } 561 | } 562 | } 563 | layer { 564 | name: "relu5" 565 | type: "ReLU" 566 | bottom: "conv5" 567 | top: "conv5" 568 | } 569 | layer { 570 | name: "pool5_new" 571 | type: "Pooling" 572 | bottom: "conv5" 573 | top: "pool5_new" 574 | pooling_param { 575 | pool: MAX 576 | kernel_size: 3 577 | stride: 2 578 | pad: 1 579 | } 580 | } 581 | 582 | 583 | ###################################################################################### 584 | layer { 585 | name:"concat1" 586 | bottom:"pool3-S_p" 587 | bottom:"pool5_new" 588 | type: "Concat" 589 | top: "concat1" 590 | concat_param { 591 | axis: 1 592 | } 593 | } 594 | 595 | ###################################################################################### 596 | layer { 597 | name: "fc_a-S_new" 598 | type: "InnerProduct" 599 | bottom: "concat1" 600 | top: "fc_a-S_new" 601 | param { 602 | lr_mult: 1 603 | decay_mult: 1 604 | } 605 | param { 606 | lr_mult: 2 607 | decay_mult: 0 608 | } 609 | inner_product_param { 610 | num_output: 4096 611 | weight_filler { 612 | type: "gaussian" 613 | std: 0.005 614 | } 615 | bias_filler { 616 | type: "constant" 617 | value: 1 618 | } 619 | } 620 | } 621 | 622 | layer { 623 | name: "relu4-S_new" 624 | type: "ReLU" 625 | bottom: "fc_a-S_new" 626 | top: "fc_a-S_new" 627 | } 628 | 629 | layer { 630 | name: "drop4-S_new" 631 | type: "Dropout" 632 | bottom: "fc_a-S_new" 633 | top: "fc_a-S_new" 634 | dropout_param { 635 | dropout_ratio: 0.1 636 | } 637 | } 638 | 639 | ########################################### 640 | layer { 641 | name: "fc6_new_new" 642 | type: "InnerProduct" 643 | bottom: "concat1" 644 | top: "fc6_new_new" 645 | param { 646 | lr_mult: 1 647 | decay_mult: 1 648 | } 649 | param { 650 | lr_mult: 2 651 | decay_mult: 0 652 | } 653 | inner_product_param { 654 | num_output: 4096 655 | weight_filler { 656 | type: "gaussian" 657 | std: 0.005 658 | } 659 | bias_filler { 660 | type: "constant" 661 | value: 1 662 | } 663 | } 664 | } 665 | 666 | layer { 667 | name: "relu6_new_new" 668 | type: "ReLU" 669 | bottom: "fc6_new_new" 670 | top: "fc6_new_new" 671 | } 672 | layer { 673 | name: "drop6_new_new" 674 | type: "Dropout" 675 | bottom: "fc6_new_new" 676 | top: "fc6_new_new" 677 | dropout_param { 678 | dropout_ratio: 0.3 679 | } 680 | } 681 | 682 | ######################################################################### 683 | layer { 684 | name:"concat2" 685 | bottom:"fc_a-S_new" 686 | bottom:"fc6_new_new" 687 | type: "Concat" 688 | top: "concat2" 689 | concat_param { 690 | axis: 1 691 | } 692 | } 693 | 694 | ########################################################################## 695 | 696 | layer { 697 | name: "fc_b-S_new" 698 | type: "InnerProduct" 699 | bottom: "concat2" 700 | top: "fc_b-S_new" 701 | param { 702 | lr_mult: 1 703 | decay_mult: 1 704 | } 705 | param { 706 | lr_mult: 2 707 | decay_mult: 0 708 | } 709 | inner_product_param { 710 | num_output: 1024 711 | weight_filler { 712 | type: "gaussian" 713 | std: 0.005 714 | } 715 | bias_filler { 716 | type: "constant" 717 | value: 1 718 | } 719 | } 720 | } 721 | 722 | 723 | layer { 724 | name: "relu5-S_new" 725 | type: "ReLU" 726 | bottom: "fc_b-S_new" 727 | top: "fc_b-S_new" 728 | } 729 | 730 | layer { 731 | name: "drop5-S_new" 732 | type: "Dropout" 733 | bottom: "fc_b-S_new" 734 | top: "fc_b-S_new" 735 | dropout_param { 736 | dropout_ratio: 0.2 737 | } 738 | } 739 | 740 | ############################################################################################### 741 | 742 | layer { 743 | name: "fc7_new_new" 744 | type: "InnerProduct" 745 | bottom: "concat2" 746 | top: "fc7_new_new" 747 | param { 748 | lr_mult: 1 749 | decay_mult: 1 750 | } 751 | param { 752 | lr_mult: 2 753 | decay_mult: 0 754 | } 755 | inner_product_param { 756 | num_output: 1024 757 | weight_filler { 758 | type: "gaussian" 759 | std: 0.005 760 | } 761 | bias_filler { 762 | type: "constant" 763 | value: 1 764 | } 765 | } 766 | } 767 | layer { 768 | name: "relu7_new_new" 769 | type: "ReLU" 770 | bottom: "fc7_new_new" 771 | top: "fc7_new_new" 772 | } 773 | layer { 774 | name: "drop7_new_new" 775 | type: "Dropout" 776 | bottom: "fc7_new_new" 777 | top: "fc7_new_new" 778 | dropout_param { 779 | dropout_ratio: 0.3 780 | } 781 | } 782 | 783 | ####################################################################################################### 784 | 785 | layer { 786 | name:"concat3" 787 | bottom:"fc_b-S_new" 788 | bottom:"fc7_new_new" 789 | type: "Concat" 790 | top: "concat3" 791 | concat_param { 792 | axis: 1 793 | } 794 | } 795 | 796 | ######################################################################################################### 797 | 798 | layer { 799 | name: "fc_fuse_TU_final" 800 | type: "InnerProduct" 801 | bottom: "concat3" 802 | top: "fc_fuse" 803 | param { 804 | lr_mult: 1 805 | decay_mult: 1 806 | } 807 | param { 808 | lr_mult: 2 809 | decay_mult: 0 810 | } 811 | inner_product_param { 812 | num_output: 64 813 | weight_filler { 814 | type: "gaussian" 815 | std: 0.01 816 | } 817 | bias_filler { 818 | type: "constant" 819 | value: 0 820 | } 821 | } 822 | } 823 | 824 | ###################################################################################### 825 | 826 | ################################################################################################# 827 | ################################################################################################# 828 | ################################################################################################# 829 | ################################################################################################# 830 | ################################################################################################# 831 | ################################################################################################# 832 | 833 | 834 | 835 | -------------------------------------------------------------------------------- /TU/README.md: -------------------------------------------------------------------------------- 1 | Deploy files for TB Berlin Dataset. 2 | -------------------------------------------------------------------------------- /TU/Sketch/deploy_sk_128.prototxt: -------------------------------------------------------------------------------- 1 | name: "CaffeNet" 2 | 3 | input: "sketch" 4 | input_dim: 10 5 | input_dim: 3 6 | input_dim: 200 7 | input_dim: 200 8 | 9 | ########################### 10 | 11 | 12 | 13 | 14 | 15 | #############################################fixed############################################################ 16 | layer { 17 | name: "conv1-S" 18 | type: "Convolution" 19 | bottom: "sketch" 20 | top: "conv1-S" 21 | param { 22 | lr_mult: 1 23 | decay_mult: 1 24 | name:"conv1-S_w" 25 | } 26 | param { 27 | lr_mult: 2 28 | name:"conv1-S_b" 29 | decay_mult: 0 30 | } 31 | convolution_param { 32 | num_output: 64 33 | kernel_size: 14 34 | stride: 3 35 | weight_filler { 36 | type: "gaussian" 37 | std: 0.01 38 | } 39 | bias_filler { 40 | type: "constant" 41 | value: 0 42 | } 43 | } 44 | } 45 | 46 | layer { 47 | name: "BN1-S" 48 | type: "BatchNorm" 49 | bottom: "conv1-S" 50 | top: "conv1bn-S" 51 | } 52 | 53 | layer { 54 | name: "SC1-S" 55 | type: "Scale" 56 | bottom: "conv1bn-S" 57 | top: "conv1sc-S" 58 | scale_param{ 59 | bias_term: true 60 | } 61 | } 62 | 63 | 64 | layer { 65 | name: "relu1-S" 66 | type: "ReLU" 67 | bottom: "conv1sc-S" 68 | top: "conv1sc-S" 69 | } 70 | 71 | layer { 72 | name: "pool1-S" 73 | type: "Pooling" 74 | bottom: "conv1sc-S" 75 | top: "pool1-S" 76 | pooling_param { 77 | pool: MAX 78 | kernel_size: 3 79 | stride: 2 80 | } 81 | } 82 | 83 | 84 | 85 | layer { 86 | name: "conv2_1-S" 87 | type: "Convolution" 88 | bottom: "pool1-S" 89 | top: "conv2_1-S" 90 | param { 91 | lr_mult: 1 92 | decay_mult: 1 93 | name:"conv2_1-S_w" 94 | } 95 | param { 96 | lr_mult: 2 97 | decay_mult: 0 98 | name:"conv2_1-S_b" 99 | } 100 | convolution_param { 101 | num_output: 128 102 | pad: 1 103 | kernel_size: 3 104 | stride: 1 105 | weight_filler { 106 | type: "gaussian" 107 | std: 0.01 108 | } 109 | bias_filler { 110 | type: "constant" 111 | value: 1 112 | } 113 | } 114 | } 115 | 116 | layer { 117 | name: "BN2_1-S" 118 | type: "BatchNorm" 119 | bottom: "conv2_1-S" 120 | top: "conv2_1bn-S" 121 | } 122 | 123 | layer { 124 | name: "SC2_1-S" 125 | type: "Scale" 126 | bottom: "conv2_1bn-S" 127 | top: "conv2_1sc-S" 128 | scale_param{ 129 | bias_term: true 130 | } 131 | } 132 | 133 | 134 | layer { 135 | name: "relu2_1-S" 136 | type: "ReLU" 137 | bottom: "conv2_1sc-S" 138 | top: "conv2_1sc-S" 139 | } 140 | 141 | 142 | 143 | 144 | 145 | 146 | layer { 147 | name: "conv2_2-S" 148 | type: "Convolution" 149 | bottom: "conv2_1sc-S" 150 | top: "conv2_2-S" 151 | param { 152 | lr_mult: 1 153 | decay_mult: 1 154 | name:"conv2_2-S_w" 155 | } 156 | param { 157 | lr_mult: 2 158 | decay_mult: 0 159 | name:"conv2_2-S_b" 160 | } 161 | convolution_param { 162 | num_output: 128 163 | pad: 1 164 | kernel_size: 3 165 | stride: 1 166 | weight_filler { 167 | type: "gaussian" 168 | std: 0.01 169 | } 170 | bias_filler { 171 | type: "constant" 172 | value: 1 173 | } 174 | } 175 | } 176 | 177 | layer { 178 | name: "BN2_2-S" 179 | type: "BatchNorm" 180 | bottom: "conv2_2-S" 181 | top: "conv2_2bn-S" 182 | } 183 | 184 | layer { 185 | name: "SC2_2-S" 186 | type: "Scale" 187 | bottom: "conv2_2bn-S" 188 | top: "conv2_2sc-S" 189 | scale_param{ 190 | bias_term: true 191 | } 192 | } 193 | 194 | 195 | layer { 196 | name: "relu2_2-S" 197 | type: "ReLU" 198 | bottom: "conv2_2sc-S" 199 | top: "conv2_2sc-S" 200 | } 201 | 202 | 203 | 204 | layer { 205 | name: "pool2-S" 206 | type: "Pooling" 207 | bottom: "conv2_2sc-S" 208 | top: "pool2-S" 209 | pooling_param { 210 | pool: MAX 211 | kernel_size: 3 212 | stride: 2 213 | } 214 | } 215 | 216 | 217 | 218 | 219 | 220 | layer { 221 | name: "conv3_1-S" 222 | type: "Convolution" 223 | bottom: "pool2-S" 224 | top: "conv3_1-S" 225 | param { 226 | lr_mult: 1 227 | decay_mult: 1 228 | name:"conv3_1-S_w" 229 | } 230 | param { 231 | lr_mult: 2 232 | decay_mult: 0 233 | name:"conv3_1-S_b" 234 | } 235 | convolution_param { 236 | num_output: 256 237 | pad: 1 238 | kernel_size: 3 239 | stride: 1 240 | weight_filler { 241 | type: "gaussian" 242 | std: 0.01 243 | } 244 | bias_filler { 245 | type: "constant" 246 | value: 1 247 | } 248 | } 249 | } 250 | 251 | layer { 252 | name: "BN3_1-S" 253 | type: "BatchNorm" 254 | bottom: "conv3_1-S" 255 | top: "conv3_1bn-S" 256 | } 257 | 258 | layer { 259 | name: "SC3_1-S" 260 | type: "Scale" 261 | bottom: "conv3_1bn-S" 262 | top: "conv3_1sc-S" 263 | scale_param{ 264 | bias_term: true 265 | } 266 | } 267 | 268 | 269 | layer { 270 | name: "relu3_1-S" 271 | type: "ReLU" 272 | bottom: "conv3_1sc-S" 273 | top: "conv3_1sc-S" 274 | } 275 | 276 | 277 | 278 | layer { 279 | name: "conv3_2-S" 280 | type: "Convolution" 281 | bottom: "conv3_1sc-S" 282 | top: "conv3_2-S" 283 | param { 284 | lr_mult: 1 285 | decay_mult: 1 286 | name:"conv3_2-S_w" 287 | } 288 | param { 289 | lr_mult: 2 290 | decay_mult: 0 291 | name:"conv3_2-S_b" 292 | } 293 | convolution_param { 294 | num_output: 256 295 | pad: 1 296 | kernel_size: 3 297 | stride: 1 298 | weight_filler { 299 | type: "gaussian" 300 | std: 0.01 301 | } 302 | bias_filler { 303 | type: "constant" 304 | value: 1 305 | } 306 | } 307 | } 308 | 309 | layer { 310 | name: "BN3_2-S" 311 | type: "BatchNorm" 312 | bottom: "conv3_2-S" 313 | top: "conv3_2bn-S" 314 | } 315 | 316 | layer { 317 | name: "SC3_2-S" 318 | type: "Scale" 319 | bottom: "conv3_2bn-S" 320 | top: "conv3_2sc-S" 321 | scale_param{ 322 | bias_term: true 323 | } 324 | } 325 | 326 | 327 | layer { 328 | name: "relu3_2-S" 329 | type: "ReLU" 330 | bottom: "conv3_2sc-S" 331 | top: "conv3_2sc-S" 332 | } 333 | 334 | 335 | 336 | 337 | layer { 338 | name: "pool3-S" 339 | type: "Pooling" 340 | bottom: "conv3_2sc-S" 341 | top: "pool3-S" 342 | pooling_param { 343 | pool: MAX 344 | kernel_size: 3 345 | stride: 2 346 | } 347 | } 348 | 349 | 350 | layer { 351 | name: "fc_a-S" 352 | type: "InnerProduct" 353 | bottom: "pool3-S" 354 | top: "fc_a-S" 355 | param { 356 | lr_mult: 1 357 | decay_mult: 1 358 | name:"fc_a-S_w" 359 | } 360 | param { 361 | lr_mult: 2 362 | decay_mult: 0 363 | name:"fc_a-S_b" 364 | } 365 | inner_product_param { 366 | num_output: 4096 367 | weight_filler { 368 | type: "gaussian" 369 | std: 0.005 370 | } 371 | bias_filler { 372 | type: "constant" 373 | value: 1 374 | } 375 | } 376 | } 377 | 378 | 379 | 380 | layer { 381 | name: "relu4-S" 382 | type: "ReLU" 383 | bottom: "fc_a-S" 384 | top: "fc_a-S" 385 | } 386 | 387 | layer { 388 | name: "drop4-S" 389 | type: "Dropout" 390 | bottom: "fc_a-S" 391 | top: "fc_a-S" 392 | dropout_param { 393 | dropout_ratio: 0.1 394 | } 395 | } 396 | 397 | layer { 398 | name: "fc_b-S" 399 | type: "InnerProduct" 400 | bottom: "fc_a-S" 401 | top: "fc_b-S" 402 | param { 403 | lr_mult: 1 404 | decay_mult: 1 405 | name:"fc_b-S_w" 406 | } 407 | param { 408 | lr_mult: 2 409 | decay_mult: 0 410 | name:"fc_b-S_b" 411 | } 412 | inner_product_param { 413 | num_output: 1024 414 | weight_filler { 415 | type: "gaussian" 416 | std: 0.005 417 | } 418 | bias_filler { 419 | type: "constant" 420 | value: 1 421 | } 422 | } 423 | } 424 | 425 | 426 | layer { 427 | name: "relu5-S" 428 | type: "ReLU" 429 | bottom: "fc_b-S" 430 | top: "fc_b-S" 431 | } 432 | 433 | layer { 434 | name: "drop5-S" 435 | type: "Dropout" 436 | bottom: "fc_b-S" 437 | top: "fc_b-S" 438 | dropout_param { 439 | dropout_ratio: 0.2 440 | } 441 | } 442 | 443 | 444 | 445 | layer { 446 | name: "fc_p-S_final" 447 | type: "InnerProduct" 448 | bottom: "fc_b-S" 449 | top: "fc_p-S" 450 | param { 451 | lr_mult: 1 452 | name:"fc_p-S_w" 453 | decay_mult: 1 454 | } 455 | param { 456 | lr_mult: 2 457 | decay_mult: 0 458 | name:"fc_p-S_b" 459 | } 460 | inner_product_param { 461 | num_output: 128 462 | weight_filler { 463 | type: "gaussian" 464 | std: 0.01 465 | } 466 | bias_filler { 467 | type: "constant" 468 | value: 0 469 | } 470 | } 471 | } 472 | #################################################################################################### 473 | 474 | -------------------------------------------------------------------------------- /TU/Sketch/deploy_sk_256.prototxt: -------------------------------------------------------------------------------- 1 | name: "CaffeNet" 2 | 3 | input: "sketch" 4 | input_dim: 10 5 | input_dim: 3 6 | input_dim: 200 7 | input_dim: 200 8 | 9 | ########################### 10 | 11 | 12 | 13 | 14 | 15 | #############################################fixed############################################################ 16 | layer { 17 | name: "conv1-S" 18 | type: "Convolution" 19 | bottom: "sketch" 20 | top: "conv1-S" 21 | param { 22 | lr_mult: 1 23 | decay_mult: 1 24 | name:"conv1-S_w" 25 | } 26 | param { 27 | lr_mult: 2 28 | name:"conv1-S_b" 29 | decay_mult: 0 30 | } 31 | convolution_param { 32 | num_output: 64 33 | kernel_size: 14 34 | stride: 3 35 | weight_filler { 36 | type: "gaussian" 37 | std: 0.01 38 | } 39 | bias_filler { 40 | type: "constant" 41 | value: 0 42 | } 43 | } 44 | } 45 | 46 | layer { 47 | name: "BN1-S" 48 | type: "BatchNorm" 49 | bottom: "conv1-S" 50 | top: "conv1bn-S" 51 | } 52 | 53 | layer { 54 | name: "SC1-S" 55 | type: "Scale" 56 | bottom: "conv1bn-S" 57 | top: "conv1sc-S" 58 | scale_param{ 59 | bias_term: true 60 | } 61 | } 62 | 63 | 64 | layer { 65 | name: "relu1-S" 66 | type: "ReLU" 67 | bottom: "conv1sc-S" 68 | top: "conv1sc-S" 69 | } 70 | 71 | layer { 72 | name: "pool1-S" 73 | type: "Pooling" 74 | bottom: "conv1sc-S" 75 | top: "pool1-S" 76 | pooling_param { 77 | pool: MAX 78 | kernel_size: 3 79 | stride: 2 80 | } 81 | } 82 | 83 | 84 | 85 | layer { 86 | name: "conv2_1-S" 87 | type: "Convolution" 88 | bottom: "pool1-S" 89 | top: "conv2_1-S" 90 | param { 91 | lr_mult: 1 92 | decay_mult: 1 93 | name:"conv2_1-S_w" 94 | } 95 | param { 96 | lr_mult: 2 97 | decay_mult: 0 98 | name:"conv2_1-S_b" 99 | } 100 | convolution_param { 101 | num_output: 128 102 | pad: 1 103 | kernel_size: 3 104 | stride: 1 105 | weight_filler { 106 | type: "gaussian" 107 | std: 0.01 108 | } 109 | bias_filler { 110 | type: "constant" 111 | value: 1 112 | } 113 | } 114 | } 115 | 116 | layer { 117 | name: "BN2_1-S" 118 | type: "BatchNorm" 119 | bottom: "conv2_1-S" 120 | top: "conv2_1bn-S" 121 | } 122 | 123 | layer { 124 | name: "SC2_1-S" 125 | type: "Scale" 126 | bottom: "conv2_1bn-S" 127 | top: "conv2_1sc-S" 128 | scale_param{ 129 | bias_term: true 130 | } 131 | } 132 | 133 | 134 | layer { 135 | name: "relu2_1-S" 136 | type: "ReLU" 137 | bottom: "conv2_1sc-S" 138 | top: "conv2_1sc-S" 139 | } 140 | 141 | 142 | 143 | 144 | 145 | 146 | layer { 147 | name: "conv2_2-S" 148 | type: "Convolution" 149 | bottom: "conv2_1sc-S" 150 | top: "conv2_2-S" 151 | param { 152 | lr_mult: 1 153 | decay_mult: 1 154 | name:"conv2_2-S_w" 155 | } 156 | param { 157 | lr_mult: 2 158 | decay_mult: 0 159 | name:"conv2_2-S_b" 160 | } 161 | convolution_param { 162 | num_output: 128 163 | pad: 1 164 | kernel_size: 3 165 | stride: 1 166 | weight_filler { 167 | type: "gaussian" 168 | std: 0.01 169 | } 170 | bias_filler { 171 | type: "constant" 172 | value: 1 173 | } 174 | } 175 | } 176 | 177 | layer { 178 | name: "BN2_2-S" 179 | type: "BatchNorm" 180 | bottom: "conv2_2-S" 181 | top: "conv2_2bn-S" 182 | } 183 | 184 | layer { 185 | name: "SC2_2-S" 186 | type: "Scale" 187 | bottom: "conv2_2bn-S" 188 | top: "conv2_2sc-S" 189 | scale_param{ 190 | bias_term: true 191 | } 192 | } 193 | 194 | 195 | layer { 196 | name: "relu2_2-S" 197 | type: "ReLU" 198 | bottom: "conv2_2sc-S" 199 | top: "conv2_2sc-S" 200 | } 201 | 202 | 203 | 204 | layer { 205 | name: "pool2-S" 206 | type: "Pooling" 207 | bottom: "conv2_2sc-S" 208 | top: "pool2-S" 209 | pooling_param { 210 | pool: MAX 211 | kernel_size: 3 212 | stride: 2 213 | } 214 | } 215 | 216 | 217 | 218 | 219 | 220 | layer { 221 | name: "conv3_1-S" 222 | type: "Convolution" 223 | bottom: "pool2-S" 224 | top: "conv3_1-S" 225 | param { 226 | lr_mult: 1 227 | decay_mult: 1 228 | name:"conv3_1-S_w" 229 | } 230 | param { 231 | lr_mult: 2 232 | decay_mult: 0 233 | name:"conv3_1-S_b" 234 | } 235 | convolution_param { 236 | num_output: 256 237 | pad: 1 238 | kernel_size: 3 239 | stride: 1 240 | weight_filler { 241 | type: "gaussian" 242 | std: 0.01 243 | } 244 | bias_filler { 245 | type: "constant" 246 | value: 1 247 | } 248 | } 249 | } 250 | 251 | layer { 252 | name: "BN3_1-S" 253 | type: "BatchNorm" 254 | bottom: "conv3_1-S" 255 | top: "conv3_1bn-S" 256 | } 257 | 258 | layer { 259 | name: "SC3_1-S" 260 | type: "Scale" 261 | bottom: "conv3_1bn-S" 262 | top: "conv3_1sc-S" 263 | scale_param{ 264 | bias_term: true 265 | } 266 | } 267 | 268 | 269 | layer { 270 | name: "relu3_1-S" 271 | type: "ReLU" 272 | bottom: "conv3_1sc-S" 273 | top: "conv3_1sc-S" 274 | } 275 | 276 | 277 | 278 | layer { 279 | name: "conv3_2-S" 280 | type: "Convolution" 281 | bottom: "conv3_1sc-S" 282 | top: "conv3_2-S" 283 | param { 284 | lr_mult: 1 285 | decay_mult: 1 286 | name:"conv3_2-S_w" 287 | } 288 | param { 289 | lr_mult: 2 290 | decay_mult: 0 291 | name:"conv3_2-S_b" 292 | } 293 | convolution_param { 294 | num_output: 256 295 | pad: 1 296 | kernel_size: 3 297 | stride: 1 298 | weight_filler { 299 | type: "gaussian" 300 | std: 0.01 301 | } 302 | bias_filler { 303 | type: "constant" 304 | value: 1 305 | } 306 | } 307 | } 308 | 309 | layer { 310 | name: "BN3_2-S" 311 | type: "BatchNorm" 312 | bottom: "conv3_2-S" 313 | top: "conv3_2bn-S" 314 | } 315 | 316 | layer { 317 | name: "SC3_2-S" 318 | type: "Scale" 319 | bottom: "conv3_2bn-S" 320 | top: "conv3_2sc-S" 321 | scale_param{ 322 | bias_term: true 323 | } 324 | } 325 | 326 | 327 | layer { 328 | name: "relu3_2-S" 329 | type: "ReLU" 330 | bottom: "conv3_2sc-S" 331 | top: "conv3_2sc-S" 332 | } 333 | 334 | 335 | 336 | 337 | layer { 338 | name: "pool3-S" 339 | type: "Pooling" 340 | bottom: "conv3_2sc-S" 341 | top: "pool3-S" 342 | pooling_param { 343 | pool: MAX 344 | kernel_size: 3 345 | stride: 2 346 | } 347 | } 348 | 349 | 350 | layer { 351 | name: "fc_a-S" 352 | type: "InnerProduct" 353 | bottom: "pool3-S" 354 | top: "fc_a-S" 355 | param { 356 | lr_mult: 1 357 | decay_mult: 1 358 | name:"fc_a-S_w" 359 | } 360 | param { 361 | lr_mult: 2 362 | decay_mult: 0 363 | name:"fc_a-S_b" 364 | } 365 | inner_product_param { 366 | num_output: 4096 367 | weight_filler { 368 | type: "gaussian" 369 | std: 0.005 370 | } 371 | bias_filler { 372 | type: "constant" 373 | value: 1 374 | } 375 | } 376 | } 377 | 378 | 379 | 380 | layer { 381 | name: "relu4-S" 382 | type: "ReLU" 383 | bottom: "fc_a-S" 384 | top: "fc_a-S" 385 | } 386 | 387 | layer { 388 | name: "drop4-S" 389 | type: "Dropout" 390 | bottom: "fc_a-S" 391 | top: "fc_a-S" 392 | dropout_param { 393 | dropout_ratio: 0.1 394 | } 395 | } 396 | 397 | layer { 398 | name: "fc_b-S" 399 | type: "InnerProduct" 400 | bottom: "fc_a-S" 401 | top: "fc_b-S" 402 | param { 403 | lr_mult: 1 404 | decay_mult: 1 405 | name:"fc_b-S_w" 406 | } 407 | param { 408 | lr_mult: 2 409 | decay_mult: 0 410 | name:"fc_b-S_b" 411 | } 412 | inner_product_param { 413 | num_output: 1024 414 | weight_filler { 415 | type: "gaussian" 416 | std: 0.005 417 | } 418 | bias_filler { 419 | type: "constant" 420 | value: 1 421 | } 422 | } 423 | } 424 | 425 | 426 | layer { 427 | name: "relu5-S" 428 | type: "ReLU" 429 | bottom: "fc_b-S" 430 | top: "fc_b-S" 431 | } 432 | 433 | layer { 434 | name: "drop5-S" 435 | type: "Dropout" 436 | bottom: "fc_b-S" 437 | top: "fc_b-S" 438 | dropout_param { 439 | dropout_ratio: 0.2 440 | } 441 | } 442 | 443 | 444 | 445 | layer { 446 | name: "fc_p-S_final" 447 | type: "InnerProduct" 448 | bottom: "fc_b-S" 449 | top: "fc_p-S" 450 | param { 451 | lr_mult: 1 452 | name:"fc_p-S_w" 453 | decay_mult: 1 454 | } 455 | param { 456 | lr_mult: 2 457 | decay_mult: 0 458 | name:"fc_p-S_b" 459 | } 460 | inner_product_param { 461 | num_output: 256 462 | weight_filler { 463 | type: "gaussian" 464 | std: 0.01 465 | } 466 | bias_filler { 467 | type: "constant" 468 | value: 0 469 | } 470 | } 471 | } 472 | #################################################################################################### 473 | 474 | -------------------------------------------------------------------------------- /TU/Sketch/deploy_sk_32.prototxt: -------------------------------------------------------------------------------- 1 | name: "CaffeNet" 2 | 3 | input: "sketch" 4 | input_dim: 10 5 | input_dim: 3 6 | input_dim: 200 7 | input_dim: 200 8 | 9 | ########################### 10 | 11 | 12 | 13 | 14 | 15 | #############################################fixed############################################################ 16 | layer { 17 | name: "conv1-S" 18 | type: "Convolution" 19 | bottom: "sketch" 20 | top: "conv1-S" 21 | param { 22 | lr_mult: 1 23 | decay_mult: 1 24 | name:"conv1-S_w" 25 | } 26 | param { 27 | lr_mult: 2 28 | name:"conv1-S_b" 29 | decay_mult: 0 30 | } 31 | convolution_param { 32 | num_output: 64 33 | kernel_size: 14 34 | stride: 3 35 | weight_filler { 36 | type: "gaussian" 37 | std: 0.01 38 | } 39 | bias_filler { 40 | type: "constant" 41 | value: 0 42 | } 43 | } 44 | } 45 | 46 | layer { 47 | name: "BN1-S" 48 | type: "BatchNorm" 49 | bottom: "conv1-S" 50 | top: "conv1bn-S" 51 | } 52 | 53 | layer { 54 | name: "SC1-S" 55 | type: "Scale" 56 | bottom: "conv1bn-S" 57 | top: "conv1sc-S" 58 | scale_param{ 59 | bias_term: true 60 | } 61 | } 62 | 63 | 64 | layer { 65 | name: "relu1-S" 66 | type: "ReLU" 67 | bottom: "conv1sc-S" 68 | top: "conv1sc-S" 69 | } 70 | 71 | layer { 72 | name: "pool1-S" 73 | type: "Pooling" 74 | bottom: "conv1sc-S" 75 | top: "pool1-S" 76 | pooling_param { 77 | pool: MAX 78 | kernel_size: 3 79 | stride: 2 80 | } 81 | } 82 | 83 | 84 | 85 | layer { 86 | name: "conv2_1-S" 87 | type: "Convolution" 88 | bottom: "pool1-S" 89 | top: "conv2_1-S" 90 | param { 91 | lr_mult: 1 92 | decay_mult: 1 93 | name:"conv2_1-S_w" 94 | } 95 | param { 96 | lr_mult: 2 97 | decay_mult: 0 98 | name:"conv2_1-S_b" 99 | } 100 | convolution_param { 101 | num_output: 128 102 | pad: 1 103 | kernel_size: 3 104 | stride: 1 105 | weight_filler { 106 | type: "gaussian" 107 | std: 0.01 108 | } 109 | bias_filler { 110 | type: "constant" 111 | value: 1 112 | } 113 | } 114 | } 115 | 116 | layer { 117 | name: "BN2_1-S" 118 | type: "BatchNorm" 119 | bottom: "conv2_1-S" 120 | top: "conv2_1bn-S" 121 | } 122 | 123 | layer { 124 | name: "SC2_1-S" 125 | type: "Scale" 126 | bottom: "conv2_1bn-S" 127 | top: "conv2_1sc-S" 128 | scale_param{ 129 | bias_term: true 130 | } 131 | } 132 | 133 | 134 | layer { 135 | name: "relu2_1-S" 136 | type: "ReLU" 137 | bottom: "conv2_1sc-S" 138 | top: "conv2_1sc-S" 139 | } 140 | 141 | 142 | 143 | 144 | 145 | 146 | layer { 147 | name: "conv2_2-S" 148 | type: "Convolution" 149 | bottom: "conv2_1sc-S" 150 | top: "conv2_2-S" 151 | param { 152 | lr_mult: 1 153 | decay_mult: 1 154 | name:"conv2_2-S_w" 155 | } 156 | param { 157 | lr_mult: 2 158 | decay_mult: 0 159 | name:"conv2_2-S_b" 160 | } 161 | convolution_param { 162 | num_output: 128 163 | pad: 1 164 | kernel_size: 3 165 | stride: 1 166 | weight_filler { 167 | type: "gaussian" 168 | std: 0.01 169 | } 170 | bias_filler { 171 | type: "constant" 172 | value: 1 173 | } 174 | } 175 | } 176 | 177 | layer { 178 | name: "BN2_2-S" 179 | type: "BatchNorm" 180 | bottom: "conv2_2-S" 181 | top: "conv2_2bn-S" 182 | } 183 | 184 | layer { 185 | name: "SC2_2-S" 186 | type: "Scale" 187 | bottom: "conv2_2bn-S" 188 | top: "conv2_2sc-S" 189 | scale_param{ 190 | bias_term: true 191 | } 192 | } 193 | 194 | 195 | layer { 196 | name: "relu2_2-S" 197 | type: "ReLU" 198 | bottom: "conv2_2sc-S" 199 | top: "conv2_2sc-S" 200 | } 201 | 202 | 203 | 204 | layer { 205 | name: "pool2-S" 206 | type: "Pooling" 207 | bottom: "conv2_2sc-S" 208 | top: "pool2-S" 209 | pooling_param { 210 | pool: MAX 211 | kernel_size: 3 212 | stride: 2 213 | } 214 | } 215 | 216 | 217 | 218 | 219 | 220 | layer { 221 | name: "conv3_1-S" 222 | type: "Convolution" 223 | bottom: "pool2-S" 224 | top: "conv3_1-S" 225 | param { 226 | lr_mult: 1 227 | decay_mult: 1 228 | name:"conv3_1-S_w" 229 | } 230 | param { 231 | lr_mult: 2 232 | decay_mult: 0 233 | name:"conv3_1-S_b" 234 | } 235 | convolution_param { 236 | num_output: 256 237 | pad: 1 238 | kernel_size: 3 239 | stride: 1 240 | weight_filler { 241 | type: "gaussian" 242 | std: 0.01 243 | } 244 | bias_filler { 245 | type: "constant" 246 | value: 1 247 | } 248 | } 249 | } 250 | 251 | layer { 252 | name: "BN3_1-S" 253 | type: "BatchNorm" 254 | bottom: "conv3_1-S" 255 | top: "conv3_1bn-S" 256 | } 257 | 258 | layer { 259 | name: "SC3_1-S" 260 | type: "Scale" 261 | bottom: "conv3_1bn-S" 262 | top: "conv3_1sc-S" 263 | scale_param{ 264 | bias_term: true 265 | } 266 | } 267 | 268 | 269 | layer { 270 | name: "relu3_1-S" 271 | type: "ReLU" 272 | bottom: "conv3_1sc-S" 273 | top: "conv3_1sc-S" 274 | } 275 | 276 | 277 | 278 | layer { 279 | name: "conv3_2-S" 280 | type: "Convolution" 281 | bottom: "conv3_1sc-S" 282 | top: "conv3_2-S" 283 | param { 284 | lr_mult: 1 285 | decay_mult: 1 286 | name:"conv3_2-S_w" 287 | } 288 | param { 289 | lr_mult: 2 290 | decay_mult: 0 291 | name:"conv3_2-S_b" 292 | } 293 | convolution_param { 294 | num_output: 256 295 | pad: 1 296 | kernel_size: 3 297 | stride: 1 298 | weight_filler { 299 | type: "gaussian" 300 | std: 0.01 301 | } 302 | bias_filler { 303 | type: "constant" 304 | value: 1 305 | } 306 | } 307 | } 308 | 309 | layer { 310 | name: "BN3_2-S" 311 | type: "BatchNorm" 312 | bottom: "conv3_2-S" 313 | top: "conv3_2bn-S" 314 | } 315 | 316 | layer { 317 | name: "SC3_2-S" 318 | type: "Scale" 319 | bottom: "conv3_2bn-S" 320 | top: "conv3_2sc-S" 321 | scale_param{ 322 | bias_term: true 323 | } 324 | } 325 | 326 | 327 | layer { 328 | name: "relu3_2-S" 329 | type: "ReLU" 330 | bottom: "conv3_2sc-S" 331 | top: "conv3_2sc-S" 332 | } 333 | 334 | 335 | 336 | 337 | layer { 338 | name: "pool3-S" 339 | type: "Pooling" 340 | bottom: "conv3_2sc-S" 341 | top: "pool3-S" 342 | pooling_param { 343 | pool: MAX 344 | kernel_size: 3 345 | stride: 2 346 | } 347 | } 348 | 349 | 350 | layer { 351 | name: "fc_a-S" 352 | type: "InnerProduct" 353 | bottom: "pool3-S" 354 | top: "fc_a-S" 355 | param { 356 | lr_mult: 1 357 | decay_mult: 1 358 | name:"fc_a-S_w" 359 | } 360 | param { 361 | lr_mult: 2 362 | decay_mult: 0 363 | name:"fc_a-S_b" 364 | } 365 | inner_product_param { 366 | num_output: 4096 367 | weight_filler { 368 | type: "gaussian" 369 | std: 0.005 370 | } 371 | bias_filler { 372 | type: "constant" 373 | value: 1 374 | } 375 | } 376 | } 377 | 378 | 379 | 380 | layer { 381 | name: "relu4-S" 382 | type: "ReLU" 383 | bottom: "fc_a-S" 384 | top: "fc_a-S" 385 | } 386 | 387 | layer { 388 | name: "drop4-S" 389 | type: "Dropout" 390 | bottom: "fc_a-S" 391 | top: "fc_a-S" 392 | dropout_param { 393 | dropout_ratio: 0.1 394 | } 395 | } 396 | 397 | layer { 398 | name: "fc_b-S" 399 | type: "InnerProduct" 400 | bottom: "fc_a-S" 401 | top: "fc_b-S" 402 | param { 403 | lr_mult: 1 404 | decay_mult: 1 405 | name:"fc_b-S_w" 406 | } 407 | param { 408 | lr_mult: 2 409 | decay_mult: 0 410 | name:"fc_b-S_b" 411 | } 412 | inner_product_param { 413 | num_output: 1024 414 | weight_filler { 415 | type: "gaussian" 416 | std: 0.005 417 | } 418 | bias_filler { 419 | type: "constant" 420 | value: 1 421 | } 422 | } 423 | } 424 | 425 | 426 | layer { 427 | name: "relu5-S" 428 | type: "ReLU" 429 | bottom: "fc_b-S" 430 | top: "fc_b-S" 431 | } 432 | 433 | layer { 434 | name: "drop5-S" 435 | type: "Dropout" 436 | bottom: "fc_b-S" 437 | top: "fc_b-S" 438 | dropout_param { 439 | dropout_ratio: 0.2 440 | } 441 | } 442 | 443 | 444 | 445 | layer { 446 | name: "fc_p-S_final" 447 | type: "InnerProduct" 448 | bottom: "fc_b-S" 449 | top: "fc_p-S" 450 | param { 451 | lr_mult: 1 452 | name:"fc_p-S_w" 453 | decay_mult: 1 454 | } 455 | param { 456 | lr_mult: 2 457 | decay_mult: 0 458 | name:"fc_p-S_b" 459 | } 460 | inner_product_param { 461 | num_output: 32 462 | weight_filler { 463 | type: "gaussian" 464 | std: 0.01 465 | } 466 | bias_filler { 467 | type: "constant" 468 | value: 0 469 | } 470 | } 471 | } 472 | #################################################################################################### 473 | 474 | -------------------------------------------------------------------------------- /TU/Sketch/deploy_sk_64.prototxt: -------------------------------------------------------------------------------- 1 | name: "CaffeNet" 2 | 3 | input: "sketch" 4 | input_dim: 10 5 | input_dim: 3 6 | input_dim: 200 7 | input_dim: 200 8 | 9 | ########################### 10 | 11 | 12 | 13 | 14 | 15 | #############################################fixed############################################################ 16 | layer { 17 | name: "conv1-S" 18 | type: "Convolution" 19 | bottom: "sketch" 20 | top: "conv1-S" 21 | param { 22 | lr_mult: 1 23 | decay_mult: 1 24 | name:"conv1-S_w" 25 | } 26 | param { 27 | lr_mult: 2 28 | name:"conv1-S_b" 29 | decay_mult: 0 30 | } 31 | convolution_param { 32 | num_output: 64 33 | kernel_size: 14 34 | stride: 3 35 | weight_filler { 36 | type: "gaussian" 37 | std: 0.01 38 | } 39 | bias_filler { 40 | type: "constant" 41 | value: 0 42 | } 43 | } 44 | } 45 | 46 | layer { 47 | name: "BN1-S" 48 | type: "BatchNorm" 49 | bottom: "conv1-S" 50 | top: "conv1bn-S" 51 | } 52 | 53 | layer { 54 | name: "SC1-S" 55 | type: "Scale" 56 | bottom: "conv1bn-S" 57 | top: "conv1sc-S" 58 | scale_param{ 59 | bias_term: true 60 | } 61 | } 62 | 63 | 64 | layer { 65 | name: "relu1-S" 66 | type: "ReLU" 67 | bottom: "conv1sc-S" 68 | top: "conv1sc-S" 69 | } 70 | 71 | layer { 72 | name: "pool1-S" 73 | type: "Pooling" 74 | bottom: "conv1sc-S" 75 | top: "pool1-S" 76 | pooling_param { 77 | pool: MAX 78 | kernel_size: 3 79 | stride: 2 80 | } 81 | } 82 | 83 | 84 | 85 | layer { 86 | name: "conv2_1-S" 87 | type: "Convolution" 88 | bottom: "pool1-S" 89 | top: "conv2_1-S" 90 | param { 91 | lr_mult: 1 92 | decay_mult: 1 93 | name:"conv2_1-S_w" 94 | } 95 | param { 96 | lr_mult: 2 97 | decay_mult: 0 98 | name:"conv2_1-S_b" 99 | } 100 | convolution_param { 101 | num_output: 128 102 | pad: 1 103 | kernel_size: 3 104 | stride: 1 105 | weight_filler { 106 | type: "gaussian" 107 | std: 0.01 108 | } 109 | bias_filler { 110 | type: "constant" 111 | value: 1 112 | } 113 | } 114 | } 115 | 116 | layer { 117 | name: "BN2_1-S" 118 | type: "BatchNorm" 119 | bottom: "conv2_1-S" 120 | top: "conv2_1bn-S" 121 | } 122 | 123 | layer { 124 | name: "SC2_1-S" 125 | type: "Scale" 126 | bottom: "conv2_1bn-S" 127 | top: "conv2_1sc-S" 128 | scale_param{ 129 | bias_term: true 130 | } 131 | } 132 | 133 | 134 | layer { 135 | name: "relu2_1-S" 136 | type: "ReLU" 137 | bottom: "conv2_1sc-S" 138 | top: "conv2_1sc-S" 139 | } 140 | 141 | 142 | 143 | 144 | 145 | 146 | layer { 147 | name: "conv2_2-S" 148 | type: "Convolution" 149 | bottom: "conv2_1sc-S" 150 | top: "conv2_2-S" 151 | param { 152 | lr_mult: 1 153 | decay_mult: 1 154 | name:"conv2_2-S_w" 155 | } 156 | param { 157 | lr_mult: 2 158 | decay_mult: 0 159 | name:"conv2_2-S_b" 160 | } 161 | convolution_param { 162 | num_output: 128 163 | pad: 1 164 | kernel_size: 3 165 | stride: 1 166 | weight_filler { 167 | type: "gaussian" 168 | std: 0.01 169 | } 170 | bias_filler { 171 | type: "constant" 172 | value: 1 173 | } 174 | } 175 | } 176 | 177 | layer { 178 | name: "BN2_2-S" 179 | type: "BatchNorm" 180 | bottom: "conv2_2-S" 181 | top: "conv2_2bn-S" 182 | } 183 | 184 | layer { 185 | name: "SC2_2-S" 186 | type: "Scale" 187 | bottom: "conv2_2bn-S" 188 | top: "conv2_2sc-S" 189 | scale_param{ 190 | bias_term: true 191 | } 192 | } 193 | 194 | 195 | layer { 196 | name: "relu2_2-S" 197 | type: "ReLU" 198 | bottom: "conv2_2sc-S" 199 | top: "conv2_2sc-S" 200 | } 201 | 202 | 203 | 204 | layer { 205 | name: "pool2-S" 206 | type: "Pooling" 207 | bottom: "conv2_2sc-S" 208 | top: "pool2-S" 209 | pooling_param { 210 | pool: MAX 211 | kernel_size: 3 212 | stride: 2 213 | } 214 | } 215 | 216 | 217 | 218 | 219 | 220 | layer { 221 | name: "conv3_1-S" 222 | type: "Convolution" 223 | bottom: "pool2-S" 224 | top: "conv3_1-S" 225 | param { 226 | lr_mult: 1 227 | decay_mult: 1 228 | name:"conv3_1-S_w" 229 | } 230 | param { 231 | lr_mult: 2 232 | decay_mult: 0 233 | name:"conv3_1-S_b" 234 | } 235 | convolution_param { 236 | num_output: 256 237 | pad: 1 238 | kernel_size: 3 239 | stride: 1 240 | weight_filler { 241 | type: "gaussian" 242 | std: 0.01 243 | } 244 | bias_filler { 245 | type: "constant" 246 | value: 1 247 | } 248 | } 249 | } 250 | 251 | layer { 252 | name: "BN3_1-S" 253 | type: "BatchNorm" 254 | bottom: "conv3_1-S" 255 | top: "conv3_1bn-S" 256 | } 257 | 258 | layer { 259 | name: "SC3_1-S" 260 | type: "Scale" 261 | bottom: "conv3_1bn-S" 262 | top: "conv3_1sc-S" 263 | scale_param{ 264 | bias_term: true 265 | } 266 | } 267 | 268 | 269 | layer { 270 | name: "relu3_1-S" 271 | type: "ReLU" 272 | bottom: "conv3_1sc-S" 273 | top: "conv3_1sc-S" 274 | } 275 | 276 | 277 | 278 | layer { 279 | name: "conv3_2-S" 280 | type: "Convolution" 281 | bottom: "conv3_1sc-S" 282 | top: "conv3_2-S" 283 | param { 284 | lr_mult: 1 285 | decay_mult: 1 286 | name:"conv3_2-S_w" 287 | } 288 | param { 289 | lr_mult: 2 290 | decay_mult: 0 291 | name:"conv3_2-S_b" 292 | } 293 | convolution_param { 294 | num_output: 256 295 | pad: 1 296 | kernel_size: 3 297 | stride: 1 298 | weight_filler { 299 | type: "gaussian" 300 | std: 0.01 301 | } 302 | bias_filler { 303 | type: "constant" 304 | value: 1 305 | } 306 | } 307 | } 308 | 309 | layer { 310 | name: "BN3_2-S" 311 | type: "BatchNorm" 312 | bottom: "conv3_2-S" 313 | top: "conv3_2bn-S" 314 | } 315 | 316 | layer { 317 | name: "SC3_2-S" 318 | type: "Scale" 319 | bottom: "conv3_2bn-S" 320 | top: "conv3_2sc-S" 321 | scale_param{ 322 | bias_term: true 323 | } 324 | } 325 | 326 | 327 | layer { 328 | name: "relu3_2-S" 329 | type: "ReLU" 330 | bottom: "conv3_2sc-S" 331 | top: "conv3_2sc-S" 332 | } 333 | 334 | 335 | 336 | 337 | layer { 338 | name: "pool3-S" 339 | type: "Pooling" 340 | bottom: "conv3_2sc-S" 341 | top: "pool3-S" 342 | pooling_param { 343 | pool: MAX 344 | kernel_size: 3 345 | stride: 2 346 | } 347 | } 348 | 349 | 350 | layer { 351 | name: "fc_a-S" 352 | type: "InnerProduct" 353 | bottom: "pool3-S" 354 | top: "fc_a-S" 355 | param { 356 | lr_mult: 1 357 | decay_mult: 1 358 | name:"fc_a-S_w" 359 | } 360 | param { 361 | lr_mult: 2 362 | decay_mult: 0 363 | name:"fc_a-S_b" 364 | } 365 | inner_product_param { 366 | num_output: 4096 367 | weight_filler { 368 | type: "gaussian" 369 | std: 0.005 370 | } 371 | bias_filler { 372 | type: "constant" 373 | value: 1 374 | } 375 | } 376 | } 377 | 378 | 379 | 380 | layer { 381 | name: "relu4-S" 382 | type: "ReLU" 383 | bottom: "fc_a-S" 384 | top: "fc_a-S" 385 | } 386 | 387 | layer { 388 | name: "drop4-S" 389 | type: "Dropout" 390 | bottom: "fc_a-S" 391 | top: "fc_a-S" 392 | dropout_param { 393 | dropout_ratio: 0.1 394 | } 395 | } 396 | 397 | layer { 398 | name: "fc_b-S" 399 | type: "InnerProduct" 400 | bottom: "fc_a-S" 401 | top: "fc_b-S" 402 | param { 403 | lr_mult: 1 404 | decay_mult: 1 405 | name:"fc_b-S_w" 406 | } 407 | param { 408 | lr_mult: 2 409 | decay_mult: 0 410 | name:"fc_b-S_b" 411 | } 412 | inner_product_param { 413 | num_output: 1024 414 | weight_filler { 415 | type: "gaussian" 416 | std: 0.005 417 | } 418 | bias_filler { 419 | type: "constant" 420 | value: 1 421 | } 422 | } 423 | } 424 | 425 | 426 | layer { 427 | name: "relu5-S" 428 | type: "ReLU" 429 | bottom: "fc_b-S" 430 | top: "fc_b-S" 431 | } 432 | 433 | layer { 434 | name: "drop5-S" 435 | type: "Dropout" 436 | bottom: "fc_b-S" 437 | top: "fc_b-S" 438 | dropout_param { 439 | dropout_ratio: 0.2 440 | } 441 | } 442 | 443 | 444 | 445 | layer { 446 | name: "fc_p-S_final" 447 | type: "InnerProduct" 448 | bottom: "fc_b-S" 449 | top: "fc_p-S" 450 | param { 451 | lr_mult: 1 452 | name:"fc_p-S_w" 453 | decay_mult: 1 454 | } 455 | param { 456 | lr_mult: 2 457 | decay_mult: 0 458 | name:"fc_p-S_b" 459 | } 460 | inner_product_param { 461 | num_output: 64 462 | weight_filler { 463 | type: "gaussian" 464 | std: 0.01 465 | } 466 | bias_filler { 467 | type: "constant" 468 | value: 0 469 | } 470 | } 471 | } 472 | #################################################################################################### 473 | 474 | --------------------------------------------------------------------------------