├── MobileFaceNet.prototxt ├── MobileFaceNet_deploy.prototxt ├── README.md ├── face_snapshot └── MobileFaceNet.caffemodel ├── face_solver.prototxt ├── mobileFaceNet.log ├── result.png └── start_train.sh /MobileFaceNet.prototxt: -------------------------------------------------------------------------------- 1 | name:"Caffe_MobileFaceNet" 2 | 3 | ############## CNN Architecture ############### 4 | layer { 5 | name: "data" 6 | type: "ImageData" 7 | top: "data" 8 | top: "label" 9 | transform_param { 10 | mean_value: 127.5 11 | mean_value: 127.5 12 | mean_value: 127.5 13 | scale: 0.0078125 14 | mirror: true 15 | } 16 | image_data_param { 17 | source: "/data/vggface2/VGGFACE_train_list-112X96-add.txt" 18 | batch_size:64 19 | shuffle: true 20 | } 21 | } 22 | 23 | layer { 24 | name: "conv1" 25 | type: "Convolution" 26 | bottom: "data" 27 | top: "conv1" 28 | param { 29 | lr_mult: 1 30 | decay_mult: 1 31 | } 32 | convolution_param { 33 | num_output: 64 34 | kernel_size: 3 35 | stride: 2 36 | pad: 1 37 | weight_filler { 38 | type: "xavier" 39 | } 40 | bias_term:false 41 | } 42 | } 43 | layer { 44 | name: "conv1/bn" 45 | type: "BatchNorm" 46 | bottom: "conv1" 47 | top: "conv1" 48 | param { 49 | lr_mult: 0 50 | decay_mult: 0 51 | } 52 | param { 53 | lr_mult: 0 54 | decay_mult: 0 55 | } 56 | param { 57 | lr_mult: 0 58 | decay_mult: 0 59 | } 60 | } 61 | layer { 62 | name: "conv1/scale" 63 | type: "Scale" 64 | bottom: "conv1" 65 | top: "conv1" 66 | param { 67 | lr_mult: 1 68 | decay_mult: 0 69 | } 70 | param { 71 | lr_mult: 1 72 | decay_mult: 0 73 | } 74 | scale_param { 75 | bias_term: true 76 | } 77 | } 78 | layer { 79 | name: "relu1" 80 | type: "PReLU" 81 | bottom: "conv1" 82 | top: "conv1" 83 | } 84 | layer { 85 | name: "conv1_dw" 86 | type: "DepthwiseConvolution" 87 | bottom: "conv1" 88 | top: "conv1_dw" 89 | param { 90 | lr_mult: 1 91 | decay_mult: 1 92 | } 93 | convolution_param { 94 | num_output: 64 95 | group:64 96 | kernel_size: 3 97 | stride: 1 98 | pad: 1 99 | weight_filler { 100 | type: "xavier" 101 | } 102 | bias_term:false 103 | } 104 | } 105 | layer { 106 | name: "conv1_dw/bn" 107 | type: "BatchNorm" 108 | bottom: "conv1_dw" 109 | top: "conv1_dw" 110 | param { 111 | lr_mult: 0 112 | decay_mult: 0 113 | } 114 | param { 115 | lr_mult: 0 116 | decay_mult: 0 117 | } 118 | param { 119 | lr_mult: 0 120 | decay_mult: 0 121 | } 122 | } 123 | layer { 124 | name: "conv1_dw/scale" 125 | type: "Scale" 126 | bottom: "conv1_dw" 127 | top: "conv1_dw" 128 | param { 129 | lr_mult: 1 130 | decay_mult: 0 131 | } 132 | param { 133 | lr_mult: 1 134 | decay_mult: 0 135 | } 136 | scale_param { 137 | bias_term: true 138 | } 139 | } 140 | layer { 141 | name: "relu1_dw" 142 | type: "PReLU" 143 | bottom: "conv1_dw" 144 | top: "conv1_dw" 145 | } 146 | layer { 147 | name: "conv2_ex" 148 | type: "Convolution" 149 | bottom: "conv1_dw" 150 | top: "conv2_ex" 151 | param { 152 | lr_mult: 1 153 | decay_mult: 1 154 | } 155 | convolution_param { 156 | num_output: 128 157 | kernel_size: 1 158 | stride: 1 159 | pad: 0 160 | weight_filler { 161 | type: "xavier" 162 | } 163 | bias_term:false 164 | } 165 | } 166 | layer { 167 | name: "conv2_ex/bn" 168 | type: "BatchNorm" 169 | bottom: "conv2_ex" 170 | top: "conv2_ex" 171 | param { 172 | lr_mult: 0 173 | decay_mult: 0 174 | } 175 | param { 176 | lr_mult: 0 177 | decay_mult: 0 178 | } 179 | param { 180 | lr_mult: 0 181 | decay_mult: 0 182 | } 183 | } 184 | layer { 185 | name: "conv2_ex/scale" 186 | type: "Scale" 187 | bottom: "conv2_ex" 188 | top: "conv2_ex" 189 | param { 190 | lr_mult: 1 191 | decay_mult: 0 192 | } 193 | param { 194 | lr_mult: 1 195 | decay_mult: 0 196 | } 197 | scale_param { 198 | bias_term: true 199 | } 200 | } 201 | layer { 202 | name: "relu2_ex" 203 | type: "PReLU" 204 | bottom: "conv2_ex" 205 | top: "conv2_ex" 206 | } 207 | 208 | layer { 209 | name: "conv2_dw" 210 | type: "DepthwiseConvolution" 211 | bottom: "conv2_ex" 212 | top: "conv2_dw" 213 | param { 214 | lr_mult: 1 215 | decay_mult: 1 216 | } 217 | convolution_param { 218 | num_output: 128 219 | group:128 220 | kernel_size: 3 221 | stride: 2 222 | pad: 1 223 | weight_filler { 224 | type: "xavier" 225 | } 226 | bias_term:false 227 | engine: CAFFE 228 | } 229 | } 230 | 231 | layer { 232 | name: "conv2_dw/bn" 233 | type: "BatchNorm" 234 | bottom: "conv2_dw" 235 | top: "conv2_dw" 236 | param { 237 | lr_mult: 0 238 | decay_mult: 0 239 | } 240 | param { 241 | lr_mult: 0 242 | decay_mult: 0 243 | } 244 | param { 245 | lr_mult: 0 246 | decay_mult: 0 247 | } 248 | } 249 | layer { 250 | name: "conv2_dw/scale" 251 | type: "Scale" 252 | bottom: "conv2_dw" 253 | top: "conv2_dw" 254 | param { 255 | lr_mult: 1 256 | decay_mult: 0 257 | } 258 | param { 259 | lr_mult: 1 260 | decay_mult: 0 261 | } 262 | scale_param { 263 | bias_term: true 264 | } 265 | } 266 | layer { 267 | name: "relu2_dw" 268 | type: "PReLU" 269 | bottom: "conv2_dw" 270 | top: "conv2_dw" 271 | } 272 | 273 | layer { 274 | name: "conv2_em" 275 | type: "Convolution" 276 | bottom: "conv2_dw" 277 | top: "conv2_em" 278 | param { 279 | lr_mult: 1 280 | decay_mult: 1 281 | } 282 | convolution_param { 283 | num_output: 64 284 | kernel_size: 1 285 | stride: 1 286 | pad: 0 287 | weight_filler { 288 | type: "xavier" 289 | } 290 | bias_term:false 291 | } 292 | } 293 | 294 | 295 | layer { 296 | name: "conv2_em/bn" 297 | type: "BatchNorm" 298 | bottom: "conv2_em" 299 | top: "conv2_em" 300 | param { 301 | lr_mult: 0 302 | decay_mult: 0 303 | } 304 | param { 305 | lr_mult: 0 306 | decay_mult: 0 307 | } 308 | param { 309 | lr_mult: 0 310 | decay_mult: 0 311 | } 312 | } 313 | layer { 314 | name: "conv2_em/scale" 315 | type: "Scale" 316 | bottom: "conv2_em" 317 | top: "conv2_em" 318 | param { 319 | lr_mult: 1 320 | decay_mult: 0 321 | } 322 | param { 323 | lr_mult: 1 324 | decay_mult: 0 325 | } 326 | scale_param { 327 | bias_term: true 328 | } 329 | } 330 | 331 | layer { 332 | name: "conv2_1_ex" 333 | type: "Convolution" 334 | bottom: "conv2_em" 335 | top: "conv2_1_ex" 336 | param { 337 | lr_mult: 1 338 | decay_mult: 1 339 | } 340 | convolution_param { 341 | num_output: 128 342 | kernel_size: 1 343 | stride: 1 344 | pad: 0 345 | weight_filler { 346 | type: "xavier" 347 | } 348 | bias_term:false 349 | } 350 | } 351 | 352 | layer { 353 | name: "conv2_1_ex/bn" 354 | type: "BatchNorm" 355 | bottom: "conv2_1_ex" 356 | top: "conv2_1_ex" 357 | param { 358 | lr_mult: 0 359 | decay_mult: 0 360 | } 361 | param { 362 | lr_mult: 0 363 | decay_mult: 0 364 | } 365 | param { 366 | lr_mult: 0 367 | decay_mult: 0 368 | } 369 | } 370 | layer { 371 | name: "conv2_1_ex/scale" 372 | type: "Scale" 373 | bottom: "conv2_1_ex" 374 | top: "conv2_1_ex" 375 | param { 376 | lr_mult: 1 377 | decay_mult: 0 378 | } 379 | param { 380 | lr_mult: 1 381 | decay_mult: 0 382 | } 383 | scale_param { 384 | bias_term: true 385 | } 386 | } 387 | layer { 388 | name: "relu2_1_ex" 389 | type: "PReLU" 390 | bottom: "conv2_1_ex" 391 | top: "conv2_1_ex" 392 | } 393 | 394 | 395 | layer { 396 | name: "conv2_1_dw" 397 | type: "DepthwiseConvolution" 398 | bottom: "conv2_1_ex" 399 | top: "conv2_1_dw" 400 | param { 401 | lr_mult: 1 402 | decay_mult: 1 403 | } 404 | convolution_param { 405 | num_output: 128 406 | group:128 407 | kernel_size: 3 408 | stride: 1 409 | pad: 1 410 | weight_filler { 411 | type: "xavier" 412 | } 413 | bias_term:false 414 | engine: CAFFE 415 | } 416 | } 417 | 418 | layer { 419 | name: "conv2_1_dw/bn" 420 | type: "BatchNorm" 421 | bottom: "conv2_1_dw" 422 | top: "conv2_1_dw" 423 | param { 424 | lr_mult: 0 425 | decay_mult: 0 426 | } 427 | param { 428 | lr_mult: 0 429 | decay_mult: 0 430 | } 431 | param { 432 | lr_mult: 0 433 | decay_mult: 0 434 | } 435 | } 436 | layer { 437 | name: "conv2_1_dw/scale" 438 | type: "Scale" 439 | bottom: "conv2_1_dw" 440 | top: "conv2_1_dw" 441 | param { 442 | lr_mult: 1 443 | decay_mult: 0 444 | } 445 | param { 446 | lr_mult: 1 447 | decay_mult: 0 448 | } 449 | scale_param { 450 | bias_term: true 451 | } 452 | } 453 | layer { 454 | name: "relu2_1_dw" 455 | type: "PReLU" 456 | bottom: "conv2_1_dw" 457 | top: "conv2_1_dw" 458 | } 459 | 460 | layer { 461 | name: "conv2_1_em" 462 | type: "Convolution" 463 | bottom: "conv2_1_dw" 464 | top: "conv2_1_em" 465 | param { 466 | lr_mult: 1 467 | decay_mult: 1 468 | } 469 | convolution_param { 470 | num_output: 64 471 | kernel_size: 1 472 | stride: 1 473 | pad: 0 474 | weight_filler { 475 | type: "xavier" 476 | } 477 | bias_term:false 478 | } 479 | } 480 | 481 | 482 | layer { 483 | name: "conv2_1_em/bn" 484 | type: "BatchNorm" 485 | bottom: "conv2_1_em" 486 | top: "conv2_1_em" 487 | param { 488 | lr_mult: 0 489 | decay_mult: 0 490 | } 491 | param { 492 | lr_mult: 0 493 | decay_mult: 0 494 | } 495 | param { 496 | lr_mult: 0 497 | decay_mult: 0 498 | } 499 | } 500 | layer { 501 | name: "conv2_1_em/scale" 502 | type: "Scale" 503 | bottom: "conv2_1_em" 504 | top: "conv2_1_em" 505 | param { 506 | lr_mult: 1 507 | decay_mult: 0 508 | } 509 | param { 510 | lr_mult: 1 511 | decay_mult: 0 512 | } 513 | scale_param { 514 | bias_term: true 515 | } 516 | } 517 | 518 | layer { 519 | name: "res2_1" 520 | type: "Eltwise" 521 | bottom: "conv2_em" 522 | bottom: "conv2_1_em" 523 | top: "res2_1" 524 | } 525 | 526 | layer { 527 | name: "conv2_2_ex" 528 | type: "Convolution" 529 | bottom: "res2_1" 530 | top: "conv2_2_ex" 531 | param { 532 | lr_mult: 1 533 | decay_mult: 1 534 | } 535 | convolution_param { 536 | num_output: 128 537 | kernel_size: 1 538 | stride: 1 539 | pad: 0 540 | weight_filler { 541 | type: "xavier" 542 | } 543 | bias_term:false 544 | } 545 | } 546 | 547 | layer { 548 | name: "conv2_2_ex/bn" 549 | type: "BatchNorm" 550 | bottom: "conv2_2_ex" 551 | top: "conv2_2_ex" 552 | param { 553 | lr_mult: 0 554 | decay_mult: 0 555 | } 556 | param { 557 | lr_mult: 0 558 | decay_mult: 0 559 | } 560 | param { 561 | lr_mult: 0 562 | decay_mult: 0 563 | } 564 | } 565 | layer { 566 | name: "conv2_2_ex/scale" 567 | type: "Scale" 568 | bottom: "conv2_2_ex" 569 | top: "conv2_2_ex" 570 | param { 571 | lr_mult: 1 572 | decay_mult: 0 573 | } 574 | param { 575 | lr_mult: 1 576 | decay_mult: 0 577 | } 578 | scale_param { 579 | bias_term: true 580 | } 581 | } 582 | layer { 583 | name: "relu2_2_ex" 584 | type: "PReLU" 585 | bottom: "conv2_2_ex" 586 | top: "conv2_2_ex" 587 | } 588 | 589 | 590 | layer { 591 | name: "conv2_2_dw" 592 | type: "DepthwiseConvolution" 593 | bottom: "conv2_2_ex" 594 | top: "conv2_2_dw" 595 | param { 596 | lr_mult: 1 597 | decay_mult: 1 598 | } 599 | convolution_param { 600 | num_output: 128 601 | group:128 602 | kernel_size: 3 603 | stride: 1 604 | pad: 1 605 | weight_filler { 606 | type: "xavier" 607 | } 608 | bias_term:false 609 | engine: CAFFE 610 | } 611 | } 612 | 613 | layer { 614 | name: "conv2_2_dw/bn" 615 | type: "BatchNorm" 616 | bottom: "conv2_2_dw" 617 | top: "conv2_2_dw" 618 | param { 619 | lr_mult: 0 620 | decay_mult: 0 621 | } 622 | param { 623 | lr_mult: 0 624 | decay_mult: 0 625 | } 626 | param { 627 | lr_mult: 0 628 | decay_mult: 0 629 | } 630 | } 631 | layer { 632 | name: "conv2_2_dw/scale" 633 | type: "Scale" 634 | bottom: "conv2_2_dw" 635 | top: "conv2_2_dw" 636 | param { 637 | lr_mult: 1 638 | decay_mult: 0 639 | } 640 | param { 641 | lr_mult: 1 642 | decay_mult: 0 643 | } 644 | scale_param { 645 | bias_term: true 646 | } 647 | } 648 | layer { 649 | name: "relu2_2_dw" 650 | type: "PReLU" 651 | bottom: "conv2_2_dw" 652 | top: "conv2_2_dw" 653 | } 654 | 655 | layer { 656 | name: "conv2_2_em" 657 | type: "Convolution" 658 | bottom: "conv2_2_dw" 659 | top: "conv2_2_em" 660 | param { 661 | lr_mult: 1 662 | decay_mult: 1 663 | } 664 | convolution_param { 665 | num_output: 64 666 | kernel_size: 1 667 | stride: 1 668 | pad: 0 669 | weight_filler { 670 | type: "xavier" 671 | } 672 | bias_term:false 673 | } 674 | } 675 | 676 | 677 | layer { 678 | name: "conv2_2_em/bn" 679 | type: "BatchNorm" 680 | bottom: "conv2_2_em" 681 | top: "conv2_2_em" 682 | param { 683 | lr_mult: 0 684 | decay_mult: 0 685 | } 686 | param { 687 | lr_mult: 0 688 | decay_mult: 0 689 | } 690 | param { 691 | lr_mult: 0 692 | decay_mult: 0 693 | } 694 | } 695 | layer { 696 | name: "conv2_2_em/scale" 697 | type: "Scale" 698 | bottom: "conv2_2_em" 699 | top: "conv2_2_em" 700 | param { 701 | lr_mult: 1 702 | decay_mult: 0 703 | } 704 | param { 705 | lr_mult: 1 706 | decay_mult: 0 707 | } 708 | scale_param { 709 | bias_term: true 710 | } 711 | } 712 | 713 | layer { 714 | name: "res2_2" 715 | type: "Eltwise" 716 | bottom: "res2_1" 717 | bottom: "conv2_2_em" 718 | top: "res2_2" 719 | } 720 | 721 | layer { 722 | name: "conv2_3_ex" 723 | type: "Convolution" 724 | bottom: "res2_2" 725 | top: "conv2_3_ex" 726 | param { 727 | lr_mult: 1 728 | decay_mult: 1 729 | } 730 | convolution_param { 731 | num_output: 128 732 | kernel_size: 1 733 | stride: 1 734 | pad: 0 735 | weight_filler { 736 | type: "xavier" 737 | } 738 | bias_term:false 739 | } 740 | } 741 | 742 | layer { 743 | name: "conv2_3_ex/bn" 744 | type: "BatchNorm" 745 | bottom: "conv2_3_ex" 746 | top: "conv2_3_ex" 747 | param { 748 | lr_mult: 0 749 | decay_mult: 0 750 | } 751 | param { 752 | lr_mult: 0 753 | decay_mult: 0 754 | } 755 | param { 756 | lr_mult: 0 757 | decay_mult: 0 758 | } 759 | } 760 | layer { 761 | name: "conv2_3_ex/scale" 762 | type: "Scale" 763 | bottom: "conv2_3_ex" 764 | top: "conv2_3_ex" 765 | param { 766 | lr_mult: 1 767 | decay_mult: 0 768 | } 769 | param { 770 | lr_mult: 1 771 | decay_mult: 0 772 | } 773 | scale_param { 774 | bias_term: true 775 | } 776 | } 777 | layer { 778 | name: "relu2_3_ex" 779 | type: "PReLU" 780 | bottom: "conv2_3_ex" 781 | top: "conv2_3_ex" 782 | } 783 | 784 | 785 | layer { 786 | name: "conv2_3_dw" 787 | type: "DepthwiseConvolution" 788 | bottom: "conv2_3_ex" 789 | top: "conv2_3_dw" 790 | param { 791 | lr_mult: 1 792 | decay_mult: 1 793 | } 794 | convolution_param { 795 | num_output: 128 796 | group:128 797 | kernel_size: 3 798 | stride: 1 799 | pad: 1 800 | weight_filler { 801 | type: "xavier" 802 | } 803 | bias_term:false 804 | engine: CAFFE 805 | } 806 | } 807 | 808 | layer { 809 | name: "conv2_3_dw/bn" 810 | type: "BatchNorm" 811 | bottom: "conv2_3_dw" 812 | top: "conv2_3_dw" 813 | param { 814 | lr_mult: 0 815 | decay_mult: 0 816 | } 817 | param { 818 | lr_mult: 0 819 | decay_mult: 0 820 | } 821 | param { 822 | lr_mult: 0 823 | decay_mult: 0 824 | } 825 | } 826 | layer { 827 | name: "conv2_3_dw/scale" 828 | type: "Scale" 829 | bottom: "conv2_3_dw" 830 | top: "conv2_3_dw" 831 | param { 832 | lr_mult: 1 833 | decay_mult: 0 834 | } 835 | param { 836 | lr_mult: 1 837 | decay_mult: 0 838 | } 839 | scale_param { 840 | bias_term: true 841 | } 842 | } 843 | layer { 844 | name: "relu2_3_dw" 845 | type: "PReLU" 846 | bottom: "conv2_3_dw" 847 | top: "conv2_3_dw" 848 | } 849 | 850 | layer { 851 | name: "conv2_3_em" 852 | type: "Convolution" 853 | bottom: "conv2_3_dw" 854 | top: "conv2_3_em" 855 | param { 856 | lr_mult: 1 857 | decay_mult: 1 858 | } 859 | convolution_param { 860 | num_output: 64 861 | kernel_size: 1 862 | stride: 1 863 | pad: 0 864 | weight_filler { 865 | type: "xavier" 866 | } 867 | bias_term:false 868 | } 869 | } 870 | 871 | 872 | layer { 873 | name: "conv2_3_em/bn" 874 | type: "BatchNorm" 875 | bottom: "conv2_3_em" 876 | top: "conv2_3_em" 877 | param { 878 | lr_mult: 0 879 | decay_mult: 0 880 | } 881 | param { 882 | lr_mult: 0 883 | decay_mult: 0 884 | } 885 | param { 886 | lr_mult: 0 887 | decay_mult: 0 888 | } 889 | } 890 | layer { 891 | name: "conv2_3_em/scale" 892 | type: "Scale" 893 | bottom: "conv2_3_em" 894 | top: "conv2_3_em" 895 | param { 896 | lr_mult: 1 897 | decay_mult: 0 898 | } 899 | param { 900 | lr_mult: 1 901 | decay_mult: 0 902 | } 903 | scale_param { 904 | bias_term: true 905 | } 906 | } 907 | 908 | layer { 909 | name: "res2_3" 910 | type: "Eltwise" 911 | bottom: "res2_2" 912 | bottom: "conv2_3_em" 913 | top: "res2_3" 914 | } 915 | 916 | layer { 917 | name: "conv2_4_ex" 918 | type: "Convolution" 919 | bottom: "res2_3" 920 | top: "conv2_4_ex" 921 | param { 922 | lr_mult: 1 923 | decay_mult: 1 924 | } 925 | 926 | convolution_param { 927 | num_output: 128 928 | kernel_size: 1 929 | stride: 1 930 | pad: 0 931 | weight_filler { 932 | type: "xavier" 933 | } 934 | bias_term:false 935 | } 936 | } 937 | 938 | layer { 939 | name: "conv2_4_ex/bn" 940 | type: "BatchNorm" 941 | bottom: "conv2_4_ex" 942 | top: "conv2_4_ex" 943 | param { 944 | lr_mult: 0 945 | decay_mult: 0 946 | } 947 | param { 948 | lr_mult: 0 949 | decay_mult: 0 950 | } 951 | param { 952 | lr_mult: 0 953 | decay_mult: 0 954 | } 955 | } 956 | layer { 957 | name: "conv2_4_ex/scale" 958 | type: "Scale" 959 | bottom: "conv2_4_ex" 960 | top: "conv2_4_ex" 961 | param { 962 | lr_mult: 1 963 | decay_mult: 0 964 | } 965 | param { 966 | lr_mult: 1 967 | decay_mult: 0 968 | } 969 | scale_param { 970 | bias_term: true 971 | } 972 | } 973 | layer { 974 | name: "relu2_4_ex" 975 | type: "PReLU" 976 | bottom: "conv2_4_ex" 977 | top: "conv2_4_ex" 978 | } 979 | 980 | 981 | layer { 982 | name: "conv2_4_dw" 983 | type: "DepthwiseConvolution" 984 | bottom: "conv2_4_ex" 985 | top: "conv2_4_dw" 986 | param { 987 | lr_mult: 1 988 | decay_mult: 1 989 | } 990 | convolution_param { 991 | num_output: 128 992 | group:128 993 | kernel_size: 3 994 | stride: 1 995 | pad: 1 996 | weight_filler { 997 | type: "xavier" 998 | } 999 | bias_term:false 1000 | engine: CAFFE 1001 | } 1002 | } 1003 | 1004 | layer { 1005 | name: "conv2_4_dw/bn" 1006 | type: "BatchNorm" 1007 | bottom: "conv2_4_dw" 1008 | top: "conv2_4_dw" 1009 | param { 1010 | lr_mult: 0 1011 | decay_mult: 0 1012 | } 1013 | param { 1014 | lr_mult: 0 1015 | decay_mult: 0 1016 | } 1017 | param { 1018 | lr_mult: 0 1019 | decay_mult: 0 1020 | } 1021 | } 1022 | layer { 1023 | name: "conv2_4_dw/scale" 1024 | type: "Scale" 1025 | bottom: "conv2_4_dw" 1026 | top: "conv2_4_dw" 1027 | param { 1028 | lr_mult: 1 1029 | decay_mult: 0 1030 | } 1031 | param { 1032 | lr_mult: 1 1033 | decay_mult: 0 1034 | } 1035 | scale_param { 1036 | bias_term: true 1037 | } 1038 | } 1039 | layer { 1040 | name: "relu2_4_dw" 1041 | type: "PReLU" 1042 | bottom: "conv2_4_dw" 1043 | top: "conv2_4_dw" 1044 | } 1045 | 1046 | layer { 1047 | name: "conv2_4_em" 1048 | type: "Convolution" 1049 | bottom: "conv2_4_dw" 1050 | top: "conv2_4_em" 1051 | param { 1052 | lr_mult: 1 1053 | decay_mult: 1 1054 | } 1055 | convolution_param { 1056 | num_output: 64 1057 | kernel_size: 1 1058 | stride: 1 1059 | pad: 0 1060 | weight_filler { 1061 | type: "xavier" 1062 | } 1063 | bias_term:false 1064 | } 1065 | } 1066 | 1067 | 1068 | layer { 1069 | name: "conv2_4_em/bn" 1070 | type: "BatchNorm" 1071 | bottom: "conv2_4_em" 1072 | top: "conv2_4_em" 1073 | param { 1074 | lr_mult: 0 1075 | decay_mult: 0 1076 | } 1077 | param { 1078 | lr_mult: 0 1079 | decay_mult: 0 1080 | } 1081 | param { 1082 | lr_mult: 0 1083 | decay_mult: 0 1084 | } 1085 | } 1086 | layer { 1087 | name: "conv2_4_em/scale" 1088 | type: "Scale" 1089 | bottom: "conv2_4_em" 1090 | top: "conv2_4_em" 1091 | param { 1092 | lr_mult: 1 1093 | decay_mult: 0 1094 | } 1095 | param { 1096 | lr_mult: 1 1097 | decay_mult: 0 1098 | } 1099 | scale_param { 1100 | bias_term: true 1101 | } 1102 | } 1103 | 1104 | layer { 1105 | name: "res2_4" 1106 | type: "Eltwise" 1107 | bottom: "res2_3" 1108 | bottom: "conv2_4_em" 1109 | top: "res2_4" 1110 | } 1111 | 1112 | 1113 | layer { 1114 | name: "conv3_ex" 1115 | type: "Convolution" 1116 | bottom: "res2_4" 1117 | top: "conv3_ex" 1118 | param { 1119 | lr_mult: 1 1120 | decay_mult: 1 1121 | } 1122 | convolution_param { 1123 | num_output: 256 1124 | kernel_size: 1 1125 | stride: 1 1126 | pad: 0 1127 | weight_filler { 1128 | type: "xavier" 1129 | } 1130 | bias_term:false 1131 | } 1132 | } 1133 | 1134 | layer { 1135 | name: "conv3_ex/bn" 1136 | type: "BatchNorm" 1137 | bottom: "conv3_ex" 1138 | top: "conv3_ex" 1139 | param { 1140 | lr_mult: 0 1141 | decay_mult: 0 1142 | } 1143 | param { 1144 | lr_mult: 0 1145 | decay_mult: 0 1146 | } 1147 | param { 1148 | lr_mult: 0 1149 | decay_mult: 0 1150 | } 1151 | } 1152 | layer { 1153 | name: "conv3_ex/scale" 1154 | type: "Scale" 1155 | bottom: "conv3_ex" 1156 | top: "conv3_ex" 1157 | param { 1158 | lr_mult: 1 1159 | decay_mult: 0 1160 | } 1161 | param { 1162 | lr_mult: 1 1163 | decay_mult: 0 1164 | } 1165 | scale_param { 1166 | bias_term: true 1167 | } 1168 | } 1169 | layer { 1170 | name: "relu3_ex" 1171 | type: "PReLU" 1172 | bottom: "conv3_ex" 1173 | top: "conv3_ex" 1174 | } 1175 | 1176 | 1177 | layer { 1178 | name: "conv3_dw" 1179 | type: "DepthwiseConvolution" 1180 | bottom: "conv3_ex" 1181 | top: "conv3_dw" 1182 | param { 1183 | lr_mult: 1 1184 | decay_mult: 1 1185 | } 1186 | convolution_param { 1187 | num_output: 256 1188 | group:256 1189 | kernel_size: 3 1190 | stride: 2 1191 | pad: 1 1192 | weight_filler { 1193 | type: "xavier" 1194 | } 1195 | bias_term:false 1196 | engine: CAFFE 1197 | } 1198 | } 1199 | 1200 | layer { 1201 | name: "conv3_dw/bn" 1202 | type: "BatchNorm" 1203 | bottom: "conv3_dw" 1204 | top: "conv3_dw" 1205 | param { 1206 | lr_mult: 0 1207 | decay_mult: 0 1208 | } 1209 | param { 1210 | lr_mult: 0 1211 | decay_mult: 0 1212 | } 1213 | param { 1214 | lr_mult: 0 1215 | decay_mult: 0 1216 | } 1217 | } 1218 | layer { 1219 | name: "conv3_dw/scale" 1220 | type: "Scale" 1221 | bottom: "conv3_dw" 1222 | top: "conv3_dw" 1223 | param { 1224 | lr_mult: 1 1225 | decay_mult: 0 1226 | } 1227 | param { 1228 | lr_mult: 1 1229 | decay_mult: 0 1230 | } 1231 | scale_param { 1232 | bias_term: true 1233 | } 1234 | } 1235 | layer { 1236 | name: "relu3_dw" 1237 | type: "PReLU" 1238 | bottom: "conv3_dw" 1239 | top: "conv3_dw" 1240 | } 1241 | 1242 | layer { 1243 | name: "conv3_em" 1244 | type: "Convolution" 1245 | bottom: "conv3_dw" 1246 | top: "conv3_em" 1247 | param { 1248 | lr_mult: 1 1249 | decay_mult: 1 1250 | } 1251 | convolution_param { 1252 | num_output: 128 1253 | kernel_size: 1 1254 | stride: 1 1255 | pad: 0 1256 | weight_filler { 1257 | type: "xavier" 1258 | } 1259 | bias_term:false 1260 | } 1261 | } 1262 | 1263 | 1264 | layer { 1265 | name: "conv3_em/bn" 1266 | type: "BatchNorm" 1267 | bottom: "conv3_em" 1268 | top: "conv3_em" 1269 | param { 1270 | lr_mult: 0 1271 | decay_mult: 0 1272 | } 1273 | param { 1274 | lr_mult: 0 1275 | decay_mult: 0 1276 | } 1277 | param { 1278 | lr_mult: 0 1279 | decay_mult: 0 1280 | } 1281 | } 1282 | layer { 1283 | name: "conv3_em/scale" 1284 | type: "Scale" 1285 | bottom: "conv3_em" 1286 | top: "conv3_em" 1287 | param { 1288 | lr_mult: 1 1289 | decay_mult: 0 1290 | } 1291 | param { 1292 | lr_mult: 1 1293 | decay_mult: 0 1294 | } 1295 | scale_param { 1296 | bias_term: true 1297 | } 1298 | } 1299 | 1300 | layer { 1301 | name: "conv3_1_ex" 1302 | type: "Convolution" 1303 | bottom: "conv3_em" 1304 | top: "conv3_1_ex" 1305 | param { 1306 | lr_mult: 1 1307 | decay_mult: 1 1308 | } 1309 | convolution_param { 1310 | num_output: 256 1311 | kernel_size: 1 1312 | stride: 1 1313 | pad: 0 1314 | weight_filler { 1315 | type: "xavier" 1316 | } 1317 | bias_term:false 1318 | } 1319 | } 1320 | 1321 | layer { 1322 | name: "conv3_1_ex/bn" 1323 | type: "BatchNorm" 1324 | bottom: "conv3_1_ex" 1325 | top: "conv3_1_ex" 1326 | param { 1327 | lr_mult: 0 1328 | decay_mult: 0 1329 | } 1330 | param { 1331 | lr_mult: 0 1332 | decay_mult: 0 1333 | } 1334 | param { 1335 | lr_mult: 0 1336 | decay_mult: 0 1337 | } 1338 | } 1339 | layer { 1340 | name: "conv3_1_ex/scale" 1341 | type: "Scale" 1342 | bottom: "conv3_1_ex" 1343 | top: "conv3_1_ex" 1344 | param { 1345 | lr_mult: 1 1346 | decay_mult: 0 1347 | } 1348 | param { 1349 | lr_mult: 1 1350 | decay_mult: 0 1351 | } 1352 | scale_param { 1353 | bias_term: true 1354 | } 1355 | } 1356 | layer { 1357 | name: "relu3_1_ex" 1358 | type: "PReLU" 1359 | bottom: "conv3_1_ex" 1360 | top: "conv3_1_ex" 1361 | } 1362 | 1363 | 1364 | layer { 1365 | name: "conv3_1_dw" 1366 | type: "DepthwiseConvolution" 1367 | bottom: "conv3_1_ex" 1368 | top: "conv3_1_dw" 1369 | param { 1370 | lr_mult: 1 1371 | decay_mult: 1 1372 | } 1373 | convolution_param { 1374 | num_output: 256 1375 | group:256 1376 | kernel_size: 3 1377 | stride: 1 1378 | pad: 1 1379 | weight_filler { 1380 | type: "xavier" 1381 | } 1382 | bias_term:false 1383 | engine: CAFFE 1384 | } 1385 | } 1386 | 1387 | layer { 1388 | name: "conv3_1_dw/bn" 1389 | type: "BatchNorm" 1390 | bottom: "conv3_1_dw" 1391 | top: "conv3_1_dw" 1392 | param { 1393 | lr_mult: 0 1394 | decay_mult: 0 1395 | } 1396 | param { 1397 | lr_mult: 0 1398 | decay_mult: 0 1399 | } 1400 | param { 1401 | lr_mult: 0 1402 | decay_mult: 0 1403 | } 1404 | } 1405 | layer { 1406 | name: "conv3_1_dw/scale" 1407 | type: "Scale" 1408 | bottom: "conv3_1_dw" 1409 | top: "conv3_1_dw" 1410 | param { 1411 | lr_mult: 1 1412 | decay_mult: 0 1413 | } 1414 | param { 1415 | lr_mult: 1 1416 | decay_mult: 0 1417 | } 1418 | scale_param { 1419 | bias_term: true 1420 | } 1421 | } 1422 | layer { 1423 | name: "relu3_1_dw" 1424 | type: "PReLU" 1425 | bottom: "conv3_1_dw" 1426 | top: "conv3_1_dw" 1427 | } 1428 | 1429 | layer { 1430 | name: "conv3_1_em" 1431 | type: "Convolution" 1432 | bottom: "conv3_1_dw" 1433 | top: "conv3_1_em" 1434 | param { 1435 | lr_mult: 1 1436 | decay_mult: 1 1437 | } 1438 | convolution_param { 1439 | num_output: 128 1440 | kernel_size: 1 1441 | stride: 1 1442 | pad: 0 1443 | weight_filler { 1444 | type: "xavier" 1445 | } 1446 | bias_term:false 1447 | } 1448 | } 1449 | 1450 | 1451 | layer { 1452 | name: "conv3_1_em/bn" 1453 | type: "BatchNorm" 1454 | bottom: "conv3_1_em" 1455 | top: "conv3_1_em" 1456 | param { 1457 | lr_mult: 0 1458 | decay_mult: 0 1459 | } 1460 | param { 1461 | lr_mult: 0 1462 | decay_mult: 0 1463 | } 1464 | param { 1465 | lr_mult: 0 1466 | decay_mult: 0 1467 | } 1468 | } 1469 | layer { 1470 | name: "conv3_1_em/scale" 1471 | type: "Scale" 1472 | bottom: "conv3_1_em" 1473 | top: "conv3_1_em" 1474 | param { 1475 | lr_mult: 1 1476 | decay_mult: 0 1477 | } 1478 | param { 1479 | lr_mult: 1 1480 | decay_mult: 0 1481 | } 1482 | scale_param { 1483 | bias_term: true 1484 | } 1485 | } 1486 | 1487 | layer { 1488 | name: "res3_1" 1489 | type: "Eltwise" 1490 | bottom: "conv3_em" 1491 | bottom: "conv3_1_em" 1492 | top: "res3_1" 1493 | } 1494 | 1495 | 1496 | layer { 1497 | name: "conv3_2_ex" 1498 | type: "Convolution" 1499 | bottom: "res3_1" 1500 | top: "conv3_2_ex" 1501 | param { 1502 | lr_mult: 1 1503 | decay_mult: 1 1504 | } 1505 | convolution_param { 1506 | num_output: 256 1507 | kernel_size: 1 1508 | stride: 1 1509 | pad: 0 1510 | weight_filler { 1511 | type: "xavier" 1512 | } 1513 | bias_term:false 1514 | } 1515 | } 1516 | 1517 | layer { 1518 | name: "conv3_2_ex/bn" 1519 | type: "BatchNorm" 1520 | bottom: "conv3_2_ex" 1521 | top: "conv3_2_ex" 1522 | param { 1523 | lr_mult: 0 1524 | decay_mult: 0 1525 | } 1526 | param { 1527 | lr_mult: 0 1528 | decay_mult: 0 1529 | } 1530 | param { 1531 | lr_mult: 0 1532 | decay_mult: 0 1533 | } 1534 | } 1535 | layer { 1536 | name: "conv3_2_ex/scale" 1537 | type: "Scale" 1538 | bottom: "conv3_2_ex" 1539 | top: "conv3_2_ex" 1540 | param { 1541 | lr_mult: 1 1542 | decay_mult: 0 1543 | } 1544 | param { 1545 | lr_mult: 1 1546 | decay_mult: 0 1547 | } 1548 | scale_param { 1549 | bias_term: true 1550 | } 1551 | } 1552 | layer { 1553 | name: "relu3_2_ex" 1554 | type: "PReLU" 1555 | bottom: "conv3_2_ex" 1556 | top: "conv3_2_ex" 1557 | } 1558 | 1559 | 1560 | layer { 1561 | name: "conv3_2_dw" 1562 | type: "DepthwiseConvolution" 1563 | bottom: "conv3_2_ex" 1564 | top: "conv3_2_dw" 1565 | param { 1566 | lr_mult: 1 1567 | decay_mult: 1 1568 | } 1569 | convolution_param { 1570 | num_output: 256 1571 | group:256 1572 | kernel_size: 3 1573 | stride: 1 1574 | pad: 1 1575 | weight_filler { 1576 | type: "xavier" 1577 | } 1578 | bias_term:false 1579 | engine: CAFFE 1580 | } 1581 | } 1582 | 1583 | layer { 1584 | name: "conv3_2_dw/bn" 1585 | type: "BatchNorm" 1586 | bottom: "conv3_2_dw" 1587 | top: "conv3_2_dw" 1588 | param { 1589 | lr_mult: 0 1590 | decay_mult: 0 1591 | } 1592 | param { 1593 | lr_mult: 0 1594 | decay_mult: 0 1595 | } 1596 | param { 1597 | lr_mult: 0 1598 | decay_mult: 0 1599 | } 1600 | } 1601 | layer { 1602 | name: "conv3_2_dw/scale" 1603 | type: "Scale" 1604 | bottom: "conv3_2_dw" 1605 | top: "conv3_2_dw" 1606 | param { 1607 | lr_mult: 1 1608 | decay_mult: 0 1609 | } 1610 | param { 1611 | lr_mult: 1 1612 | decay_mult: 0 1613 | } 1614 | scale_param { 1615 | bias_term: true 1616 | } 1617 | } 1618 | layer { 1619 | name: "relu3_2_dw" 1620 | type: "PReLU" 1621 | bottom: "conv3_2_dw" 1622 | top: "conv3_2_dw" 1623 | } 1624 | 1625 | layer { 1626 | name: "conv3_2_em" 1627 | type: "Convolution" 1628 | bottom: "conv3_2_dw" 1629 | top: "conv3_2_em" 1630 | param { 1631 | lr_mult: 1 1632 | decay_mult: 1 1633 | } 1634 | convolution_param { 1635 | num_output: 128 1636 | kernel_size: 1 1637 | stride: 1 1638 | pad: 0 1639 | weight_filler { 1640 | type: "xavier" 1641 | } 1642 | bias_term:false 1643 | } 1644 | } 1645 | 1646 | 1647 | layer { 1648 | name: "conv3_2_em/bn" 1649 | type: "BatchNorm" 1650 | bottom: "conv3_2_em" 1651 | top: "conv3_2_em" 1652 | param { 1653 | lr_mult: 0 1654 | decay_mult: 0 1655 | } 1656 | param { 1657 | lr_mult: 0 1658 | decay_mult: 0 1659 | } 1660 | param { 1661 | lr_mult: 0 1662 | decay_mult: 0 1663 | } 1664 | } 1665 | layer { 1666 | name: "conv3_2_em/scale" 1667 | type: "Scale" 1668 | bottom: "conv3_2_em" 1669 | top: "conv3_2_em" 1670 | param { 1671 | lr_mult: 1 1672 | decay_mult: 0 1673 | } 1674 | param { 1675 | lr_mult: 1 1676 | decay_mult: 0 1677 | } 1678 | scale_param { 1679 | bias_term: true 1680 | } 1681 | } 1682 | 1683 | layer { 1684 | name: "res3_2" 1685 | type: "Eltwise" 1686 | bottom: "res3_1" 1687 | bottom: "conv3_2_em" 1688 | top: "res3_2" 1689 | } 1690 | 1691 | layer { 1692 | name: "conv3_3_ex" 1693 | type: "Convolution" 1694 | bottom: "res3_2" 1695 | top: "conv3_3_ex" 1696 | param { 1697 | lr_mult: 1 1698 | decay_mult: 1 1699 | } 1700 | convolution_param { 1701 | num_output: 256 1702 | kernel_size: 1 1703 | stride: 1 1704 | pad: 0 1705 | weight_filler { 1706 | type: "xavier" 1707 | } 1708 | bias_term:false 1709 | } 1710 | } 1711 | 1712 | layer { 1713 | name: "conv3_3_ex/bn" 1714 | type: "BatchNorm" 1715 | bottom: "conv3_3_ex" 1716 | top: "conv3_3_ex" 1717 | param { 1718 | lr_mult: 0 1719 | decay_mult: 0 1720 | } 1721 | param { 1722 | lr_mult: 0 1723 | decay_mult: 0 1724 | } 1725 | param { 1726 | lr_mult: 0 1727 | decay_mult: 0 1728 | } 1729 | } 1730 | layer { 1731 | name: "conv3_3_ex/scale" 1732 | type: "Scale" 1733 | bottom: "conv3_3_ex" 1734 | top: "conv3_3_ex" 1735 | param { 1736 | lr_mult: 1 1737 | decay_mult: 0 1738 | } 1739 | param { 1740 | lr_mult: 1 1741 | decay_mult: 0 1742 | } 1743 | scale_param { 1744 | bias_term: true 1745 | } 1746 | } 1747 | layer { 1748 | name: "relu3_3_ex" 1749 | type: "PReLU" 1750 | bottom: "conv3_3_ex" 1751 | top: "conv3_3_ex" 1752 | } 1753 | 1754 | 1755 | layer { 1756 | name: "conv3_3_dw" 1757 | type: "DepthwiseConvolution" 1758 | bottom: "conv3_3_ex" 1759 | top: "conv3_3_dw" 1760 | param { 1761 | lr_mult: 1 1762 | decay_mult: 1 1763 | } 1764 | convolution_param { 1765 | num_output: 256 1766 | group:256 1767 | kernel_size: 3 1768 | stride: 1 1769 | pad: 1 1770 | weight_filler { 1771 | type: "xavier" 1772 | } 1773 | bias_term:false 1774 | engine: CAFFE 1775 | } 1776 | } 1777 | 1778 | layer { 1779 | name: "conv3_3_dw/bn" 1780 | type: "BatchNorm" 1781 | bottom: "conv3_3_dw" 1782 | top: "conv3_3_dw" 1783 | param { 1784 | lr_mult: 0 1785 | decay_mult: 0 1786 | } 1787 | param { 1788 | lr_mult: 0 1789 | decay_mult: 0 1790 | } 1791 | param { 1792 | lr_mult: 0 1793 | decay_mult: 0 1794 | } 1795 | } 1796 | layer { 1797 | name: "conv3_3_dw/scale" 1798 | type: "Scale" 1799 | bottom: "conv3_3_dw" 1800 | top: "conv3_3_dw" 1801 | param { 1802 | lr_mult: 1 1803 | decay_mult: 0 1804 | } 1805 | param { 1806 | lr_mult: 1 1807 | decay_mult: 0 1808 | } 1809 | scale_param { 1810 | bias_term: true 1811 | } 1812 | } 1813 | layer { 1814 | name: "relu3_3_dw" 1815 | type: "PReLU" 1816 | bottom: "conv3_3_dw" 1817 | top: "conv3_3_dw" 1818 | } 1819 | 1820 | layer { 1821 | name: "conv3_3_em" 1822 | type: "Convolution" 1823 | bottom: "conv3_3_dw" 1824 | top: "conv3_3_em" 1825 | param { 1826 | lr_mult: 1 1827 | decay_mult: 1 1828 | } 1829 | convolution_param { 1830 | num_output: 128 1831 | kernel_size: 1 1832 | stride: 1 1833 | pad: 0 1834 | weight_filler { 1835 | type: "xavier" 1836 | } 1837 | bias_term:false 1838 | } 1839 | } 1840 | 1841 | 1842 | layer { 1843 | name: "conv3_3_em/bn" 1844 | type: "BatchNorm" 1845 | bottom: "conv3_3_em" 1846 | top: "conv3_3_em" 1847 | param { 1848 | lr_mult: 0 1849 | decay_mult: 0 1850 | } 1851 | param { 1852 | lr_mult: 0 1853 | decay_mult: 0 1854 | } 1855 | param { 1856 | lr_mult: 0 1857 | decay_mult: 0 1858 | } 1859 | } 1860 | layer { 1861 | name: "conv3_3_em/scale" 1862 | type: "Scale" 1863 | bottom: "conv3_3_em" 1864 | top: "conv3_3_em" 1865 | param { 1866 | lr_mult: 1 1867 | decay_mult: 0 1868 | } 1869 | param { 1870 | lr_mult: 1 1871 | decay_mult: 0 1872 | } 1873 | scale_param { 1874 | bias_term: true 1875 | } 1876 | } 1877 | 1878 | layer { 1879 | name: "res3_3" 1880 | type: "Eltwise" 1881 | bottom: "res3_2" 1882 | bottom: "conv3_3_em" 1883 | top: "res3_3" 1884 | } 1885 | 1886 | 1887 | layer { 1888 | name: "conv3_4_ex" 1889 | type: "Convolution" 1890 | bottom: "res3_3" 1891 | top: "conv3_4_ex" 1892 | param { 1893 | lr_mult: 1 1894 | decay_mult: 1 1895 | } 1896 | convolution_param { 1897 | num_output: 256 1898 | kernel_size: 1 1899 | stride: 1 1900 | pad: 0 1901 | weight_filler { 1902 | type: "xavier" 1903 | } 1904 | bias_term:false 1905 | } 1906 | } 1907 | 1908 | layer { 1909 | name: "conv3_4_ex/bn" 1910 | type: "BatchNorm" 1911 | bottom: "conv3_4_ex" 1912 | top: "conv3_4_ex" 1913 | param { 1914 | lr_mult: 0 1915 | decay_mult: 0 1916 | } 1917 | param { 1918 | lr_mult: 0 1919 | decay_mult: 0 1920 | } 1921 | param { 1922 | lr_mult: 0 1923 | decay_mult: 0 1924 | } 1925 | } 1926 | layer { 1927 | name: "conv3_4_ex/scale" 1928 | type: "Scale" 1929 | bottom: "conv3_4_ex" 1930 | top: "conv3_4_ex" 1931 | param { 1932 | lr_mult: 1 1933 | decay_mult: 0 1934 | } 1935 | param { 1936 | lr_mult: 1 1937 | decay_mult: 0 1938 | } 1939 | scale_param { 1940 | bias_term: true 1941 | } 1942 | } 1943 | layer { 1944 | name: "relu3_4_ex" 1945 | type: "PReLU" 1946 | bottom: "conv3_4_ex" 1947 | top: "conv3_4_ex" 1948 | } 1949 | 1950 | 1951 | layer { 1952 | name: "conv3_4_dw" 1953 | type: "DepthwiseConvolution" 1954 | bottom: "conv3_4_ex" 1955 | top: "conv3_4_dw" 1956 | param { 1957 | lr_mult: 1 1958 | decay_mult: 1 1959 | } 1960 | convolution_param { 1961 | num_output: 256 1962 | group:256 1963 | kernel_size: 3 1964 | stride: 1 1965 | pad: 1 1966 | weight_filler { 1967 | type: "xavier" 1968 | } 1969 | bias_term:false 1970 | engine: CAFFE 1971 | } 1972 | } 1973 | 1974 | layer { 1975 | name: "conv3_4_dw/bn" 1976 | type: "BatchNorm" 1977 | bottom: "conv3_4_dw" 1978 | top: "conv3_4_dw" 1979 | param { 1980 | lr_mult: 0 1981 | decay_mult: 0 1982 | } 1983 | param { 1984 | lr_mult: 0 1985 | decay_mult: 0 1986 | } 1987 | param { 1988 | lr_mult: 0 1989 | decay_mult: 0 1990 | } 1991 | } 1992 | layer { 1993 | name: "conv3_4_dw/scale" 1994 | type: "Scale" 1995 | bottom: "conv3_4_dw" 1996 | top: "conv3_4_dw" 1997 | param { 1998 | lr_mult: 1 1999 | decay_mult: 0 2000 | } 2001 | param { 2002 | lr_mult: 1 2003 | decay_mult: 0 2004 | } 2005 | scale_param { 2006 | bias_term: true 2007 | } 2008 | } 2009 | layer { 2010 | name: "relu3_4_dw" 2011 | type: "PReLU" 2012 | bottom: "conv3_4_dw" 2013 | top: "conv3_4_dw" 2014 | } 2015 | 2016 | layer { 2017 | name: "conv3_4_em" 2018 | type: "Convolution" 2019 | bottom: "conv3_4_dw" 2020 | top: "conv3_4_em" 2021 | param { 2022 | lr_mult: 1 2023 | decay_mult: 1 2024 | } 2025 | convolution_param { 2026 | num_output: 128 2027 | kernel_size: 1 2028 | stride: 1 2029 | pad: 0 2030 | weight_filler { 2031 | type: "xavier" 2032 | } 2033 | bias_term:false 2034 | } 2035 | } 2036 | 2037 | 2038 | layer { 2039 | name: "conv3_4_em/bn" 2040 | type: "BatchNorm" 2041 | bottom: "conv3_4_em" 2042 | top: "conv3_4_em" 2043 | param { 2044 | lr_mult: 0 2045 | decay_mult: 0 2046 | } 2047 | param { 2048 | lr_mult: 0 2049 | decay_mult: 0 2050 | } 2051 | param { 2052 | lr_mult: 0 2053 | decay_mult: 0 2054 | } 2055 | } 2056 | layer { 2057 | name: "conv3_4_em/scale" 2058 | type: "Scale" 2059 | bottom: "conv3_4_em" 2060 | top: "conv3_4_em" 2061 | param { 2062 | lr_mult: 1 2063 | decay_mult: 0 2064 | } 2065 | param { 2066 | lr_mult: 1 2067 | decay_mult: 0 2068 | } 2069 | scale_param { 2070 | bias_term: true 2071 | } 2072 | } 2073 | 2074 | layer { 2075 | name: "res3_4" 2076 | type: "Eltwise" 2077 | bottom: "res3_3" 2078 | bottom: "conv3_4_em" 2079 | top: "res3_4" 2080 | } 2081 | 2082 | 2083 | layer { 2084 | name: "conv3_5_ex" 2085 | type: "Convolution" 2086 | bottom: "res3_4" 2087 | top: "conv3_5_ex" 2088 | param { 2089 | lr_mult: 1 2090 | decay_mult: 1 2091 | } 2092 | convolution_param { 2093 | num_output: 256 2094 | kernel_size: 1 2095 | stride: 1 2096 | pad: 0 2097 | weight_filler { 2098 | type: "xavier" 2099 | } 2100 | bias_term:false 2101 | } 2102 | } 2103 | 2104 | layer { 2105 | name: "conv3_5_ex/bn" 2106 | type: "BatchNorm" 2107 | bottom: "conv3_5_ex" 2108 | top: "conv3_5_ex" 2109 | param { 2110 | lr_mult: 0 2111 | decay_mult: 0 2112 | } 2113 | param { 2114 | lr_mult: 0 2115 | decay_mult: 0 2116 | } 2117 | param { 2118 | lr_mult: 0 2119 | decay_mult: 0 2120 | } 2121 | } 2122 | layer { 2123 | name: "conv3_5_ex/scale" 2124 | type: "Scale" 2125 | bottom: "conv3_5_ex" 2126 | top: "conv3_5_ex" 2127 | param { 2128 | lr_mult: 1 2129 | decay_mult: 0 2130 | } 2131 | param { 2132 | lr_mult: 1 2133 | decay_mult: 0 2134 | } 2135 | scale_param { 2136 | bias_term: true 2137 | } 2138 | } 2139 | layer { 2140 | name: "relu3_5_ex" 2141 | type: "PReLU" 2142 | bottom: "conv3_5_ex" 2143 | top: "conv3_5_ex" 2144 | } 2145 | 2146 | 2147 | layer { 2148 | name: "conv3_5_dw" 2149 | type: "DepthwiseConvolution" 2150 | bottom: "conv3_5_ex" 2151 | top: "conv3_5_dw" 2152 | param { 2153 | lr_mult: 1 2154 | decay_mult: 1 2155 | } 2156 | convolution_param { 2157 | num_output: 256 2158 | group:256 2159 | kernel_size: 3 2160 | stride: 1 2161 | pad: 1 2162 | weight_filler { 2163 | type: "xavier" 2164 | } 2165 | bias_term:false 2166 | engine: CAFFE 2167 | } 2168 | } 2169 | 2170 | layer { 2171 | name: "conv3_5_dw/bn" 2172 | type: "BatchNorm" 2173 | bottom: "conv3_5_dw" 2174 | top: "conv3_5_dw" 2175 | param { 2176 | lr_mult: 0 2177 | decay_mult: 0 2178 | } 2179 | param { 2180 | lr_mult: 0 2181 | decay_mult: 0 2182 | } 2183 | param { 2184 | lr_mult: 0 2185 | decay_mult: 0 2186 | } 2187 | } 2188 | layer { 2189 | name: "conv3_5_dw/scale" 2190 | type: "Scale" 2191 | bottom: "conv3_5_dw" 2192 | top: "conv3_5_dw" 2193 | param { 2194 | lr_mult: 1 2195 | decay_mult: 0 2196 | } 2197 | param { 2198 | lr_mult: 1 2199 | decay_mult: 0 2200 | } 2201 | scale_param { 2202 | bias_term: true 2203 | } 2204 | } 2205 | layer { 2206 | name: "relu3_5_dw" 2207 | type: "PReLU" 2208 | bottom: "conv3_5_dw" 2209 | top: "conv3_5_dw" 2210 | } 2211 | 2212 | layer { 2213 | name: "conv3_5_em" 2214 | type: "Convolution" 2215 | bottom: "conv3_5_dw" 2216 | top: "conv3_5_em" 2217 | param { 2218 | lr_mult: 1 2219 | decay_mult: 1 2220 | } 2221 | convolution_param { 2222 | num_output: 128 2223 | kernel_size: 1 2224 | stride: 1 2225 | pad: 0 2226 | weight_filler { 2227 | type: "xavier" 2228 | } 2229 | bias_term:false 2230 | } 2231 | } 2232 | 2233 | 2234 | layer { 2235 | name: "conv3_5_em/bn" 2236 | type: "BatchNorm" 2237 | bottom: "conv3_5_em" 2238 | top: "conv3_5_em" 2239 | param { 2240 | lr_mult: 0 2241 | decay_mult: 0 2242 | } 2243 | param { 2244 | lr_mult: 0 2245 | decay_mult: 0 2246 | } 2247 | param { 2248 | lr_mult: 0 2249 | decay_mult: 0 2250 | } 2251 | } 2252 | layer { 2253 | name: "conv3_5_em/scale" 2254 | type: "Scale" 2255 | bottom: "conv3_5_em" 2256 | top: "conv3_5_em" 2257 | param { 2258 | lr_mult: 1 2259 | decay_mult: 0 2260 | } 2261 | param { 2262 | lr_mult: 1 2263 | decay_mult: 0 2264 | } 2265 | scale_param { 2266 | bias_term: true 2267 | } 2268 | } 2269 | 2270 | layer { 2271 | name: "res3_5" 2272 | type: "Eltwise" 2273 | bottom: "res3_4" 2274 | bottom: "conv3_5_em" 2275 | top: "res3_5" 2276 | } 2277 | 2278 | 2279 | layer { 2280 | name: "conv3_6_ex" 2281 | type: "Convolution" 2282 | bottom: "res3_5" 2283 | top: "conv3_6_ex" 2284 | param { 2285 | lr_mult: 1 2286 | decay_mult: 1 2287 | } 2288 | convolution_param { 2289 | num_output: 256 2290 | kernel_size: 1 2291 | stride: 1 2292 | pad: 0 2293 | weight_filler { 2294 | type: "xavier" 2295 | } 2296 | bias_term:false 2297 | } 2298 | } 2299 | 2300 | layer { 2301 | name: "conv3_6_ex/bn" 2302 | type: "BatchNorm" 2303 | bottom: "conv3_6_ex" 2304 | top: "conv3_6_ex" 2305 | param { 2306 | lr_mult: 0 2307 | decay_mult: 0 2308 | } 2309 | param { 2310 | lr_mult: 0 2311 | decay_mult: 0 2312 | } 2313 | param { 2314 | lr_mult: 0 2315 | decay_mult: 0 2316 | } 2317 | } 2318 | layer { 2319 | name: "conv3_6_ex/scale" 2320 | type: "Scale" 2321 | bottom: "conv3_6_ex" 2322 | top: "conv3_6_ex" 2323 | param { 2324 | lr_mult: 1 2325 | decay_mult: 0 2326 | } 2327 | param { 2328 | lr_mult: 1 2329 | decay_mult: 0 2330 | } 2331 | scale_param { 2332 | bias_term: true 2333 | } 2334 | } 2335 | layer { 2336 | name: "relu3_6_ex" 2337 | type: "PReLU" 2338 | bottom: "conv3_6_ex" 2339 | top: "conv3_6_ex" 2340 | } 2341 | 2342 | 2343 | layer { 2344 | name: "conv3_6_dw" 2345 | type: "DepthwiseConvolution" 2346 | bottom: "conv3_6_ex" 2347 | top: "conv3_6_dw" 2348 | param { 2349 | lr_mult: 1 2350 | decay_mult: 1 2351 | } 2352 | convolution_param { 2353 | num_output: 256 2354 | group:256 2355 | kernel_size: 3 2356 | stride: 1 2357 | pad: 1 2358 | weight_filler { 2359 | type: "xavier" 2360 | } 2361 | bias_term:false 2362 | engine: CAFFE 2363 | } 2364 | } 2365 | 2366 | layer { 2367 | name: "conv3_6_dw/bn" 2368 | type: "BatchNorm" 2369 | bottom: "conv3_6_dw" 2370 | top: "conv3_6_dw" 2371 | param { 2372 | lr_mult: 0 2373 | decay_mult: 0 2374 | } 2375 | param { 2376 | lr_mult: 0 2377 | decay_mult: 0 2378 | } 2379 | param { 2380 | lr_mult: 0 2381 | decay_mult: 0 2382 | } 2383 | } 2384 | layer { 2385 | name: "conv3_6_dw/scale" 2386 | type: "Scale" 2387 | bottom: "conv3_6_dw" 2388 | top: "conv3_6_dw" 2389 | param { 2390 | lr_mult: 1 2391 | decay_mult: 0 2392 | } 2393 | param { 2394 | lr_mult: 1 2395 | decay_mult: 0 2396 | } 2397 | scale_param { 2398 | bias_term: true 2399 | } 2400 | } 2401 | layer { 2402 | name: "relu3_6_dw" 2403 | type: "PReLU" 2404 | bottom: "conv3_6_dw" 2405 | top: "conv3_6_dw" 2406 | } 2407 | 2408 | layer { 2409 | name: "conv3_6_em" 2410 | type: "Convolution" 2411 | bottom: "conv3_6_dw" 2412 | top: "conv3_6_em" 2413 | param { 2414 | lr_mult: 1 2415 | decay_mult: 1 2416 | } 2417 | convolution_param { 2418 | num_output: 128 2419 | kernel_size: 1 2420 | stride: 1 2421 | pad: 0 2422 | weight_filler { 2423 | type: "xavier" 2424 | } 2425 | bias_term:false 2426 | } 2427 | } 2428 | 2429 | 2430 | layer { 2431 | name: "conv3_6_em/bn" 2432 | type: "BatchNorm" 2433 | bottom: "conv3_6_em" 2434 | top: "conv3_6_em" 2435 | param { 2436 | lr_mult: 0 2437 | decay_mult: 0 2438 | } 2439 | param { 2440 | lr_mult: 0 2441 | decay_mult: 0 2442 | } 2443 | param { 2444 | lr_mult: 0 2445 | decay_mult: 0 2446 | } 2447 | } 2448 | layer { 2449 | name: "conv3_6_em/scale" 2450 | type: "Scale" 2451 | bottom: "conv3_6_em" 2452 | top: "conv3_6_em" 2453 | param { 2454 | lr_mult: 1 2455 | decay_mult: 0 2456 | } 2457 | param { 2458 | lr_mult: 1 2459 | decay_mult: 0 2460 | } 2461 | scale_param { 2462 | bias_term: true 2463 | } 2464 | } 2465 | 2466 | layer { 2467 | name: "res3_6" 2468 | type: "Eltwise" 2469 | bottom: "res3_5" 2470 | bottom: "conv3_6_em" 2471 | top: "res3_6" 2472 | } 2473 | 2474 | layer { 2475 | name: "conv4_ex" 2476 | type: "Convolution" 2477 | bottom: "res3_6" 2478 | top: "conv4_ex" 2479 | param { 2480 | lr_mult: 1 2481 | decay_mult: 1 2482 | } 2483 | convolution_param { 2484 | num_output: 512 2485 | kernel_size: 1 2486 | stride: 1 2487 | pad: 0 2488 | weight_filler { 2489 | type: "xavier" 2490 | } 2491 | bias_term:false 2492 | } 2493 | } 2494 | 2495 | layer { 2496 | name: "conv4_ex/bn" 2497 | type: "BatchNorm" 2498 | bottom: "conv4_ex" 2499 | top: "conv4_ex" 2500 | param { 2501 | lr_mult: 0 2502 | decay_mult: 0 2503 | } 2504 | param { 2505 | lr_mult: 0 2506 | decay_mult: 0 2507 | } 2508 | param { 2509 | lr_mult: 0 2510 | decay_mult: 0 2511 | } 2512 | } 2513 | layer { 2514 | name: "conv4_ex/scale" 2515 | type: "Scale" 2516 | bottom: "conv4_ex" 2517 | top: "conv4_ex" 2518 | param { 2519 | lr_mult: 1 2520 | decay_mult: 0 2521 | } 2522 | param { 2523 | lr_mult: 1 2524 | decay_mult: 0 2525 | } 2526 | scale_param { 2527 | bias_term: true 2528 | } 2529 | } 2530 | layer { 2531 | name: "relu4_ex" 2532 | type: "PReLU" 2533 | bottom: "conv4_ex" 2534 | top: "conv4_ex" 2535 | } 2536 | 2537 | 2538 | layer { 2539 | name: "conv4_dw" 2540 | type: "DepthwiseConvolution" 2541 | bottom: "conv4_ex" 2542 | top: "conv4_dw" 2543 | param { 2544 | lr_mult: 1 2545 | decay_mult: 1 2546 | } 2547 | convolution_param { 2548 | num_output: 512 2549 | group:512 2550 | kernel_size: 3 2551 | stride: 2 2552 | pad: 1 2553 | weight_filler { 2554 | type: "xavier" 2555 | } 2556 | bias_term:false 2557 | engine: CAFFE 2558 | } 2559 | } 2560 | 2561 | layer { 2562 | name: "conv4_dw/bn" 2563 | type: "BatchNorm" 2564 | bottom: "conv4_dw" 2565 | top: "conv4_dw" 2566 | param { 2567 | lr_mult: 0 2568 | decay_mult: 0 2569 | } 2570 | param { 2571 | lr_mult: 0 2572 | decay_mult: 0 2573 | } 2574 | param { 2575 | lr_mult: 0 2576 | decay_mult: 0 2577 | } 2578 | } 2579 | layer { 2580 | name: "conv4_dw/scale" 2581 | type: "Scale" 2582 | bottom: "conv4_dw" 2583 | top: "conv4_dw" 2584 | param { 2585 | lr_mult: 1 2586 | decay_mult: 0 2587 | } 2588 | param { 2589 | lr_mult: 1 2590 | decay_mult: 0 2591 | } 2592 | scale_param { 2593 | bias_term: true 2594 | } 2595 | } 2596 | layer { 2597 | name: "relu4_dw" 2598 | type: "PReLU" 2599 | bottom: "conv4_dw" 2600 | top: "conv4_dw" 2601 | } 2602 | 2603 | layer { 2604 | name: "conv4_em" 2605 | type: "Convolution" 2606 | bottom: "conv4_dw" 2607 | top: "conv4_em" 2608 | param { 2609 | lr_mult: 1 2610 | decay_mult: 1 2611 | } 2612 | convolution_param { 2613 | num_output: 128 2614 | kernel_size: 1 2615 | stride: 1 2616 | pad: 0 2617 | weight_filler { 2618 | type: "xavier" 2619 | } 2620 | bias_term:false 2621 | } 2622 | } 2623 | 2624 | 2625 | layer { 2626 | name: "conv4_em/bn" 2627 | type: "BatchNorm" 2628 | bottom: "conv4_em" 2629 | top: "conv4_em" 2630 | param { 2631 | lr_mult: 0 2632 | decay_mult: 0 2633 | } 2634 | param { 2635 | lr_mult: 0 2636 | decay_mult: 0 2637 | } 2638 | param { 2639 | lr_mult: 0 2640 | decay_mult: 0 2641 | } 2642 | } 2643 | layer { 2644 | name: "conv4_em/scale" 2645 | type: "Scale" 2646 | bottom: "conv4_em" 2647 | top: "conv4_em" 2648 | param { 2649 | lr_mult: 1 2650 | decay_mult: 0 2651 | } 2652 | param { 2653 | lr_mult: 1 2654 | decay_mult: 0 2655 | } 2656 | scale_param { 2657 | bias_term: true 2658 | } 2659 | } 2660 | 2661 | layer { 2662 | name: "conv4_1_ex" 2663 | type: "Convolution" 2664 | bottom: "conv4_em" 2665 | top: "conv4_1_ex" 2666 | param { 2667 | lr_mult: 1 2668 | decay_mult: 1 2669 | } 2670 | convolution_param { 2671 | num_output: 256 2672 | kernel_size: 1 2673 | stride: 1 2674 | pad: 0 2675 | weight_filler { 2676 | type: "xavier" 2677 | } 2678 | bias_term:false 2679 | } 2680 | } 2681 | 2682 | layer { 2683 | name: "conv4_1_ex/bn" 2684 | type: "BatchNorm" 2685 | bottom: "conv4_1_ex" 2686 | top: "conv4_1_ex" 2687 | param { 2688 | lr_mult: 0 2689 | decay_mult: 0 2690 | } 2691 | param { 2692 | lr_mult: 0 2693 | decay_mult: 0 2694 | } 2695 | param { 2696 | lr_mult: 0 2697 | decay_mult: 0 2698 | } 2699 | } 2700 | layer { 2701 | name: "conv4_1_ex/scale" 2702 | type: "Scale" 2703 | bottom: "conv4_1_ex" 2704 | top: "conv4_1_ex" 2705 | param { 2706 | lr_mult: 1 2707 | decay_mult: 0 2708 | } 2709 | param { 2710 | lr_mult: 1 2711 | decay_mult: 0 2712 | } 2713 | scale_param { 2714 | bias_term: true 2715 | } 2716 | } 2717 | layer { 2718 | name: "relu4_1_ex" 2719 | type: "PReLU" 2720 | bottom: "conv4_1_ex" 2721 | top: "conv4_1_ex" 2722 | } 2723 | 2724 | 2725 | layer { 2726 | name: "conv4_1_dw" 2727 | type: "DepthwiseConvolution" 2728 | bottom: "conv4_1_ex" 2729 | top: "conv4_1_dw" 2730 | param { 2731 | lr_mult: 1 2732 | decay_mult: 1 2733 | } 2734 | convolution_param { 2735 | num_output: 256 2736 | group:256 2737 | kernel_size: 3 2738 | stride: 1 2739 | pad: 1 2740 | weight_filler { 2741 | type: "xavier" 2742 | } 2743 | bias_term:false 2744 | engine: CAFFE 2745 | } 2746 | } 2747 | 2748 | layer { 2749 | name: "conv4_1_dw/bn" 2750 | type: "BatchNorm" 2751 | bottom: "conv4_1_dw" 2752 | top: "conv4_1_dw" 2753 | param { 2754 | lr_mult: 0 2755 | decay_mult: 0 2756 | } 2757 | param { 2758 | lr_mult: 0 2759 | decay_mult: 0 2760 | } 2761 | param { 2762 | lr_mult: 0 2763 | decay_mult: 0 2764 | } 2765 | } 2766 | layer { 2767 | name: "conv4_1_dw/scale" 2768 | type: "Scale" 2769 | bottom: "conv4_1_dw" 2770 | top: "conv4_1_dw" 2771 | param { 2772 | lr_mult: 1 2773 | decay_mult: 0 2774 | } 2775 | param { 2776 | lr_mult: 1 2777 | decay_mult: 0 2778 | } 2779 | scale_param { 2780 | bias_term: true 2781 | } 2782 | } 2783 | layer { 2784 | name: "relu4_1_dw" 2785 | type: "PReLU" 2786 | bottom: "conv4_1_dw" 2787 | top: "conv4_1_dw" 2788 | } 2789 | 2790 | layer { 2791 | name: "conv4_1_em" 2792 | type: "Convolution" 2793 | bottom: "conv4_1_dw" 2794 | top: "conv4_1_em" 2795 | param { 2796 | lr_mult: 1 2797 | decay_mult: 1 2798 | } 2799 | convolution_param { 2800 | num_output: 128 2801 | kernel_size: 1 2802 | stride: 1 2803 | pad: 0 2804 | weight_filler { 2805 | type: "xavier" 2806 | } 2807 | bias_term:false 2808 | } 2809 | } 2810 | 2811 | 2812 | layer { 2813 | name: "conv4_1_em/bn" 2814 | type: "BatchNorm" 2815 | bottom: "conv4_1_em" 2816 | top: "conv4_1_em" 2817 | param { 2818 | lr_mult: 0 2819 | decay_mult: 0 2820 | } 2821 | param { 2822 | lr_mult: 0 2823 | decay_mult: 0 2824 | } 2825 | param { 2826 | lr_mult: 0 2827 | decay_mult: 0 2828 | } 2829 | } 2830 | layer { 2831 | name: "conv4_1_em/scale" 2832 | type: "Scale" 2833 | bottom: "conv4_1_em" 2834 | top: "conv4_1_em" 2835 | param { 2836 | lr_mult: 1 2837 | decay_mult: 0 2838 | } 2839 | param { 2840 | lr_mult: 1 2841 | decay_mult: 0 2842 | } 2843 | scale_param { 2844 | bias_term: true 2845 | } 2846 | } 2847 | 2848 | layer { 2849 | name: "res4_1" 2850 | type: "Eltwise" 2851 | bottom: "conv4_em" 2852 | bottom: "conv4_1_em" 2853 | top: "res4_1" 2854 | } 2855 | 2856 | 2857 | layer { 2858 | name: "conv4_2_ex" 2859 | type: "Convolution" 2860 | bottom: "res4_1" 2861 | top: "conv4_2_ex" 2862 | param { 2863 | lr_mult: 1 2864 | decay_mult: 1 2865 | } 2866 | convolution_param { 2867 | num_output: 256 2868 | kernel_size: 1 2869 | stride: 1 2870 | pad: 0 2871 | weight_filler { 2872 | type: "xavier" 2873 | } 2874 | bias_term:false 2875 | } 2876 | } 2877 | 2878 | layer { 2879 | name: "conv4_2_ex/bn" 2880 | type: "BatchNorm" 2881 | bottom: "conv4_2_ex" 2882 | top: "conv4_2_ex" 2883 | param { 2884 | lr_mult: 0 2885 | decay_mult: 0 2886 | } 2887 | param { 2888 | lr_mult: 0 2889 | decay_mult: 0 2890 | } 2891 | param { 2892 | lr_mult: 0 2893 | decay_mult: 0 2894 | } 2895 | } 2896 | layer { 2897 | name: "conv4_2_ex/scale" 2898 | type: "Scale" 2899 | bottom: "conv4_2_ex" 2900 | top: "conv4_2_ex" 2901 | param { 2902 | lr_mult: 1 2903 | decay_mult: 0 2904 | } 2905 | param { 2906 | lr_mult: 1 2907 | decay_mult: 0 2908 | } 2909 | scale_param { 2910 | bias_term: true 2911 | } 2912 | } 2913 | layer { 2914 | name: "relu4_2_ex" 2915 | type: "PReLU" 2916 | bottom: "conv4_2_ex" 2917 | top: "conv4_2_ex" 2918 | } 2919 | 2920 | 2921 | layer { 2922 | name: "conv4_2_dw" 2923 | type: "DepthwiseConvolution" 2924 | bottom: "conv4_2_ex" 2925 | top: "conv4_2_dw" 2926 | param { 2927 | lr_mult: 1 2928 | decay_mult: 1 2929 | } 2930 | convolution_param { 2931 | num_output: 256 2932 | group:256 2933 | kernel_size: 3 2934 | stride: 1 2935 | pad: 1 2936 | weight_filler { 2937 | type: "xavier" 2938 | } 2939 | bias_term:false 2940 | engine: CAFFE 2941 | } 2942 | } 2943 | 2944 | layer { 2945 | name: "conv4_2_dw/bn" 2946 | type: "BatchNorm" 2947 | bottom: "conv4_2_dw" 2948 | top: "conv4_2_dw" 2949 | param { 2950 | lr_mult: 0 2951 | decay_mult: 0 2952 | } 2953 | param { 2954 | lr_mult: 0 2955 | decay_mult: 0 2956 | } 2957 | param { 2958 | lr_mult: 0 2959 | decay_mult: 0 2960 | } 2961 | } 2962 | layer { 2963 | name: "conv4_2_dw/scale" 2964 | type: "Scale" 2965 | bottom: "conv4_2_dw" 2966 | top: "conv4_2_dw" 2967 | param { 2968 | lr_mult: 1 2969 | decay_mult: 0 2970 | } 2971 | param { 2972 | lr_mult: 1 2973 | decay_mult: 0 2974 | } 2975 | scale_param { 2976 | bias_term: true 2977 | } 2978 | } 2979 | layer { 2980 | name: "relu4_2_dw" 2981 | type: "PReLU" 2982 | bottom: "conv4_2_dw" 2983 | top: "conv4_2_dw" 2984 | } 2985 | 2986 | layer { 2987 | name: "conv4_2_em" 2988 | type: "Convolution" 2989 | bottom: "conv4_2_dw" 2990 | top: "conv4_2_em" 2991 | param { 2992 | lr_mult: 1 2993 | decay_mult: 1 2994 | } 2995 | convolution_param { 2996 | num_output: 128 2997 | kernel_size: 1 2998 | stride: 1 2999 | pad: 0 3000 | weight_filler { 3001 | type: "xavier" 3002 | } 3003 | bias_term:false 3004 | } 3005 | } 3006 | 3007 | 3008 | layer { 3009 | name: "conv4_2_em/bn" 3010 | type: "BatchNorm" 3011 | bottom: "conv4_2_em" 3012 | top: "conv4_2_em" 3013 | param { 3014 | lr_mult: 0 3015 | decay_mult: 0 3016 | } 3017 | param { 3018 | lr_mult: 0 3019 | decay_mult: 0 3020 | } 3021 | param { 3022 | lr_mult: 0 3023 | decay_mult: 0 3024 | } 3025 | } 3026 | layer { 3027 | name: "conv4_2_em/scale" 3028 | type: "Scale" 3029 | bottom: "conv4_2_em" 3030 | top: "conv4_2_em" 3031 | param { 3032 | lr_mult: 1 3033 | decay_mult: 0 3034 | } 3035 | param { 3036 | lr_mult: 1 3037 | decay_mult: 0 3038 | } 3039 | scale_param { 3040 | bias_term: true 3041 | } 3042 | } 3043 | 3044 | layer { 3045 | name: "res4_2" 3046 | type: "Eltwise" 3047 | bottom: "res4_1" 3048 | bottom: "conv4_2_em" 3049 | top: "res4_2" 3050 | } 3051 | 3052 | layer { 3053 | name: "conv5_ex" 3054 | type: "Convolution" 3055 | bottom: "res4_2" 3056 | top: "conv5_ex" 3057 | param { 3058 | lr_mult: 1 3059 | decay_mult: 1 3060 | } 3061 | convolution_param { 3062 | num_output: 512 3063 | kernel_size: 1 3064 | stride: 1 3065 | pad: 0 3066 | weight_filler { 3067 | type: "xavier" 3068 | } 3069 | bias_term:false 3070 | } 3071 | } 3072 | 3073 | 3074 | layer { 3075 | name: "conv5_ex/bn" 3076 | type: "BatchNorm" 3077 | bottom: "conv5_ex" 3078 | top: "conv5_ex" 3079 | param { 3080 | lr_mult: 0 3081 | decay_mult: 0 3082 | } 3083 | param { 3084 | lr_mult: 0 3085 | decay_mult: 0 3086 | } 3087 | param { 3088 | lr_mult: 0 3089 | decay_mult: 0 3090 | } 3091 | } 3092 | layer { 3093 | name: "conv5_ex/scale" 3094 | type: "Scale" 3095 | bottom: "conv5_ex" 3096 | top: "conv5_ex" 3097 | param { 3098 | lr_mult: 1 3099 | decay_mult: 0 3100 | } 3101 | param { 3102 | lr_mult: 1 3103 | decay_mult: 0 3104 | } 3105 | scale_param { 3106 | bias_term: true 3107 | } 3108 | } 3109 | layer { 3110 | name: "relu5_ex" 3111 | type: "PReLU" 3112 | bottom: "conv5_ex" 3113 | top: "conv5_ex" 3114 | } 3115 | 3116 | layer { 3117 | name: "conv5_dw" 3118 | type: "DepthwiseConvolution" 3119 | bottom: "conv5_ex" 3120 | top: "conv5_dw" 3121 | param { 3122 | lr_mult: 1 3123 | decay_mult: 1 3124 | } 3125 | convolution_param { 3126 | num_output: 512 3127 | group:512 3128 | kernel_h: 7 3129 | kernel_w:6 3130 | stride: 1 3131 | pad: 0 3132 | weight_filler { 3133 | type: "xavier" 3134 | } 3135 | bias_term:false 3136 | engine: CAFFE 3137 | } 3138 | } 3139 | 3140 | layer { 3141 | name: "conv5_dw/bn" 3142 | type: "BatchNorm" 3143 | bottom: "conv5_dw" 3144 | top: "conv5_dw" 3145 | param { 3146 | lr_mult: 0 3147 | decay_mult: 0 3148 | } 3149 | param { 3150 | lr_mult: 0 3151 | decay_mult: 0 3152 | } 3153 | param { 3154 | lr_mult: 0 3155 | decay_mult: 0 3156 | } 3157 | } 3158 | layer { 3159 | name: "conv5_dw/scale" 3160 | type: "Scale" 3161 | bottom: "conv5_dw" 3162 | top: "conv5_dw" 3163 | param { 3164 | lr_mult: 1 3165 | decay_mult: 0 3166 | } 3167 | param { 3168 | lr_mult: 1 3169 | decay_mult: 0 3170 | } 3171 | scale_param { 3172 | bias_term: true 3173 | } 3174 | } 3175 | 3176 | 3177 | layer { 3178 | name: "fc5" 3179 | type: "InnerProduct" 3180 | bottom: "conv5_dw" 3181 | top: "fc5" 3182 | param { 3183 | lr_mult: 1 3184 | decay_mult: 10 3185 | } 3186 | inner_product_param { 3187 | num_output: 128 3188 | weight_filler { 3189 | type: "xavier" 3190 | } 3191 | bias_term:false 3192 | } 3193 | } 3194 | 3195 | 3196 | layer { 3197 | name: "norm1" 3198 | type: "Normalize" 3199 | bottom: "fc5" 3200 | top: "norm1" 3201 | } 3202 | 3203 | layer { 3204 | name: "fc6_l2" 3205 | type: "InnerProduct" 3206 | bottom: "norm1" 3207 | top: "fc6" 3208 | param { 3209 | lr_mult: 1 3210 | decay_mult:10 3211 | } 3212 | inner_product_param{ 3213 | num_output: 9131 3214 | normalize: true 3215 | weight_filler { 3216 | type: "xavier" 3217 | } 3218 | bias_term: false 3219 | } 3220 | } 3221 | 3222 | layer{ 3223 | name: "label_specific_margin" 3224 | type: "LabelSpecificAdd" 3225 | bottom: "fc6" 3226 | bottom: "label" 3227 | top: "fc6_margin" 3228 | label_specific_add_param { 3229 | bias: -0.3 3230 | } 3231 | } 3232 | 3233 | layer{ 3234 | name: "fc6_margin_scale" 3235 | type: "Scale" 3236 | bottom: "fc6_margin" 3237 | top: "fc6_margin_scale" 3238 | param { 3239 | lr_mult: 0 3240 | decay_mult:0 3241 | } 3242 | scale_param{ 3243 | min_value: 30 3244 | filler{ 3245 | type:"constant" 3246 | value:30 3247 | } 3248 | } 3249 | } 3250 | 3251 | layer{ 3252 | name: "softmax_loss" 3253 | type: "SoftmaxWithLoss" 3254 | bottom: "fc6_margin_scale" 3255 | bottom:"label" 3256 | top: "softmax_loss" 3257 | } 3258 | 3259 | 3260 | 3261 | -------------------------------------------------------------------------------- /MobileFaceNet_deploy.prototxt: -------------------------------------------------------------------------------- 1 | input:"data" 2 | input_dim:1 3 | input_dim:3 4 | input_dim:112 5 | input_dim:96 6 | ############## CNN Architecture ############### 7 | layer { 8 | name: "conv1" 9 | type: "Convolution" 10 | bottom: "data" 11 | top: "conv1" 12 | param { 13 | lr_mult: 1 14 | decay_mult: 1 15 | } 16 | convolution_param { 17 | num_output: 64 18 | kernel_size: 3 19 | stride: 2 20 | pad: 1 21 | weight_filler { 22 | type: "xavier" 23 | } 24 | bias_term:false 25 | } 26 | } 27 | layer { 28 | name: "conv1/bn" 29 | type: "BatchNorm" 30 | bottom: "conv1" 31 | top: "conv1" 32 | param { 33 | lr_mult: 0 34 | decay_mult: 0 35 | } 36 | param { 37 | lr_mult: 0 38 | decay_mult: 0 39 | } 40 | param { 41 | lr_mult: 0 42 | decay_mult: 0 43 | } 44 | } 45 | layer { 46 | name: "conv1/scale" 47 | type: "Scale" 48 | bottom: "conv1" 49 | top: "conv1" 50 | param { 51 | lr_mult: 1 52 | decay_mult: 0 53 | } 54 | param { 55 | lr_mult: 1 56 | decay_mult: 0 57 | } 58 | scale_param { 59 | bias_term: true 60 | } 61 | } 62 | layer { 63 | name: "relu1" 64 | type: "PReLU" 65 | bottom: "conv1" 66 | top: "conv1" 67 | } 68 | layer { 69 | name: "conv1_dw" 70 | type: "DepthwiseConvolution" 71 | bottom: "conv1" 72 | top: "conv1_dw" 73 | param { 74 | lr_mult: 1 75 | decay_mult: 1 76 | } 77 | convolution_param { 78 | num_output: 64 79 | group:64 80 | kernel_size: 3 81 | stride: 1 82 | pad: 1 83 | weight_filler { 84 | type: "xavier" 85 | } 86 | bias_term:false 87 | } 88 | } 89 | layer { 90 | name: "conv1_dw/bn" 91 | type: "BatchNorm" 92 | bottom: "conv1_dw" 93 | top: "conv1_dw" 94 | param { 95 | lr_mult: 0 96 | decay_mult: 0 97 | } 98 | param { 99 | lr_mult: 0 100 | decay_mult: 0 101 | } 102 | param { 103 | lr_mult: 0 104 | decay_mult: 0 105 | } 106 | } 107 | layer { 108 | name: "conv1_dw/scale" 109 | type: "Scale" 110 | bottom: "conv1_dw" 111 | top: "conv1_dw" 112 | param { 113 | lr_mult: 1 114 | decay_mult: 0 115 | } 116 | param { 117 | lr_mult: 1 118 | decay_mult: 0 119 | } 120 | scale_param { 121 | bias_term: true 122 | } 123 | } 124 | layer { 125 | name: "relu1_dw" 126 | type: "PReLU" 127 | bottom: "conv1_dw" 128 | top: "conv1_dw" 129 | } 130 | layer { 131 | name: "conv2_ex" 132 | type: "Convolution" 133 | bottom: "conv1_dw" 134 | top: "conv2_ex" 135 | param { 136 | lr_mult: 1 137 | decay_mult: 1 138 | } 139 | convolution_param { 140 | num_output: 128 141 | kernel_size: 1 142 | stride: 1 143 | pad: 0 144 | weight_filler { 145 | type: "xavier" 146 | } 147 | bias_term:false 148 | } 149 | } 150 | layer { 151 | name: "conv2_ex/bn" 152 | type: "BatchNorm" 153 | bottom: "conv2_ex" 154 | top: "conv2_ex" 155 | param { 156 | lr_mult: 0 157 | decay_mult: 0 158 | } 159 | param { 160 | lr_mult: 0 161 | decay_mult: 0 162 | } 163 | param { 164 | lr_mult: 0 165 | decay_mult: 0 166 | } 167 | } 168 | layer { 169 | name: "conv2_ex/scale" 170 | type: "Scale" 171 | bottom: "conv2_ex" 172 | top: "conv2_ex" 173 | param { 174 | lr_mult: 1 175 | decay_mult: 0 176 | } 177 | param { 178 | lr_mult: 1 179 | decay_mult: 0 180 | } 181 | scale_param { 182 | bias_term: true 183 | } 184 | } 185 | layer { 186 | name: "relu2_ex" 187 | type: "PReLU" 188 | bottom: "conv2_ex" 189 | top: "conv2_ex" 190 | } 191 | 192 | layer { 193 | name: "conv2_dw" 194 | type: "DepthwiseConvolution" 195 | bottom: "conv2_ex" 196 | top: "conv2_dw" 197 | param { 198 | lr_mult: 1 199 | decay_mult: 1 200 | } 201 | convolution_param { 202 | num_output: 128 203 | group:128 204 | kernel_size: 3 205 | stride: 2 206 | pad: 1 207 | weight_filler { 208 | type: "xavier" 209 | } 210 | bias_term:false 211 | engine: CAFFE 212 | } 213 | } 214 | 215 | layer { 216 | name: "conv2_dw/bn" 217 | type: "BatchNorm" 218 | bottom: "conv2_dw" 219 | top: "conv2_dw" 220 | param { 221 | lr_mult: 0 222 | decay_mult: 0 223 | } 224 | param { 225 | lr_mult: 0 226 | decay_mult: 0 227 | } 228 | param { 229 | lr_mult: 0 230 | decay_mult: 0 231 | } 232 | } 233 | layer { 234 | name: "conv2_dw/scale" 235 | type: "Scale" 236 | bottom: "conv2_dw" 237 | top: "conv2_dw" 238 | param { 239 | lr_mult: 1 240 | decay_mult: 0 241 | } 242 | param { 243 | lr_mult: 1 244 | decay_mult: 0 245 | } 246 | scale_param { 247 | bias_term: true 248 | } 249 | } 250 | layer { 251 | name: "relu2_dw" 252 | type: "PReLU" 253 | bottom: "conv2_dw" 254 | top: "conv2_dw" 255 | } 256 | 257 | layer { 258 | name: "conv2_em" 259 | type: "Convolution" 260 | bottom: "conv2_dw" 261 | top: "conv2_em" 262 | param { 263 | lr_mult: 1 264 | decay_mult: 1 265 | } 266 | convolution_param { 267 | num_output: 64 268 | kernel_size: 1 269 | stride: 1 270 | pad: 0 271 | weight_filler { 272 | type: "xavier" 273 | } 274 | bias_term:false 275 | } 276 | } 277 | 278 | 279 | layer { 280 | name: "conv2_em/bn" 281 | type: "BatchNorm" 282 | bottom: "conv2_em" 283 | top: "conv2_em" 284 | param { 285 | lr_mult: 0 286 | decay_mult: 0 287 | } 288 | param { 289 | lr_mult: 0 290 | decay_mult: 0 291 | } 292 | param { 293 | lr_mult: 0 294 | decay_mult: 0 295 | } 296 | } 297 | layer { 298 | name: "conv2_em/scale" 299 | type: "Scale" 300 | bottom: "conv2_em" 301 | top: "conv2_em" 302 | param { 303 | lr_mult: 1 304 | decay_mult: 0 305 | } 306 | param { 307 | lr_mult: 1 308 | decay_mult: 0 309 | } 310 | scale_param { 311 | bias_term: true 312 | } 313 | } 314 | 315 | layer { 316 | name: "conv2_1_ex" 317 | type: "Convolution" 318 | bottom: "conv2_em" 319 | top: "conv2_1_ex" 320 | param { 321 | lr_mult: 1 322 | decay_mult: 1 323 | } 324 | convolution_param { 325 | num_output: 128 326 | kernel_size: 1 327 | stride: 1 328 | pad: 0 329 | weight_filler { 330 | type: "xavier" 331 | } 332 | bias_term:false 333 | } 334 | } 335 | 336 | layer { 337 | name: "conv2_1_ex/bn" 338 | type: "BatchNorm" 339 | bottom: "conv2_1_ex" 340 | top: "conv2_1_ex" 341 | param { 342 | lr_mult: 0 343 | decay_mult: 0 344 | } 345 | param { 346 | lr_mult: 0 347 | decay_mult: 0 348 | } 349 | param { 350 | lr_mult: 0 351 | decay_mult: 0 352 | } 353 | } 354 | layer { 355 | name: "conv2_1_ex/scale" 356 | type: "Scale" 357 | bottom: "conv2_1_ex" 358 | top: "conv2_1_ex" 359 | param { 360 | lr_mult: 1 361 | decay_mult: 0 362 | } 363 | param { 364 | lr_mult: 1 365 | decay_mult: 0 366 | } 367 | scale_param { 368 | bias_term: true 369 | } 370 | } 371 | layer { 372 | name: "relu2_1_ex" 373 | type: "PReLU" 374 | bottom: "conv2_1_ex" 375 | top: "conv2_1_ex" 376 | } 377 | 378 | 379 | layer { 380 | name: "conv2_1_dw" 381 | type: "DepthwiseConvolution" 382 | bottom: "conv2_1_ex" 383 | top: "conv2_1_dw" 384 | param { 385 | lr_mult: 1 386 | decay_mult: 1 387 | } 388 | convolution_param { 389 | num_output: 128 390 | group:128 391 | kernel_size: 3 392 | stride: 1 393 | pad: 1 394 | weight_filler { 395 | type: "xavier" 396 | } 397 | bias_term:false 398 | engine: CAFFE 399 | } 400 | } 401 | 402 | layer { 403 | name: "conv2_1_dw/bn" 404 | type: "BatchNorm" 405 | bottom: "conv2_1_dw" 406 | top: "conv2_1_dw" 407 | param { 408 | lr_mult: 0 409 | decay_mult: 0 410 | } 411 | param { 412 | lr_mult: 0 413 | decay_mult: 0 414 | } 415 | param { 416 | lr_mult: 0 417 | decay_mult: 0 418 | } 419 | } 420 | layer { 421 | name: "conv2_1_dw/scale" 422 | type: "Scale" 423 | bottom: "conv2_1_dw" 424 | top: "conv2_1_dw" 425 | param { 426 | lr_mult: 1 427 | decay_mult: 0 428 | } 429 | param { 430 | lr_mult: 1 431 | decay_mult: 0 432 | } 433 | scale_param { 434 | bias_term: true 435 | } 436 | } 437 | layer { 438 | name: "relu2_1_dw" 439 | type: "PReLU" 440 | bottom: "conv2_1_dw" 441 | top: "conv2_1_dw" 442 | } 443 | 444 | layer { 445 | name: "conv2_1_em" 446 | type: "Convolution" 447 | bottom: "conv2_1_dw" 448 | top: "conv2_1_em" 449 | param { 450 | lr_mult: 1 451 | decay_mult: 1 452 | } 453 | convolution_param { 454 | num_output: 64 455 | kernel_size: 1 456 | stride: 1 457 | pad: 0 458 | weight_filler { 459 | type: "xavier" 460 | } 461 | bias_term:false 462 | } 463 | } 464 | 465 | 466 | layer { 467 | name: "conv2_1_em/bn" 468 | type: "BatchNorm" 469 | bottom: "conv2_1_em" 470 | top: "conv2_1_em" 471 | param { 472 | lr_mult: 0 473 | decay_mult: 0 474 | } 475 | param { 476 | lr_mult: 0 477 | decay_mult: 0 478 | } 479 | param { 480 | lr_mult: 0 481 | decay_mult: 0 482 | } 483 | } 484 | layer { 485 | name: "conv2_1_em/scale" 486 | type: "Scale" 487 | bottom: "conv2_1_em" 488 | top: "conv2_1_em" 489 | param { 490 | lr_mult: 1 491 | decay_mult: 0 492 | } 493 | param { 494 | lr_mult: 1 495 | decay_mult: 0 496 | } 497 | scale_param { 498 | bias_term: true 499 | } 500 | } 501 | 502 | layer { 503 | name: "res2_1" 504 | type: "Eltwise" 505 | bottom: "conv2_em" 506 | bottom: "conv2_1_em" 507 | top: "res2_1" 508 | } 509 | 510 | layer { 511 | name: "conv2_2_ex" 512 | type: "Convolution" 513 | bottom: "res2_1" 514 | top: "conv2_2_ex" 515 | param { 516 | lr_mult: 1 517 | decay_mult: 1 518 | } 519 | convolution_param { 520 | num_output: 128 521 | kernel_size: 1 522 | stride: 1 523 | pad: 0 524 | weight_filler { 525 | type: "xavier" 526 | } 527 | bias_term:false 528 | } 529 | } 530 | 531 | layer { 532 | name: "conv2_2_ex/bn" 533 | type: "BatchNorm" 534 | bottom: "conv2_2_ex" 535 | top: "conv2_2_ex" 536 | param { 537 | lr_mult: 0 538 | decay_mult: 0 539 | } 540 | param { 541 | lr_mult: 0 542 | decay_mult: 0 543 | } 544 | param { 545 | lr_mult: 0 546 | decay_mult: 0 547 | } 548 | } 549 | layer { 550 | name: "conv2_2_ex/scale" 551 | type: "Scale" 552 | bottom: "conv2_2_ex" 553 | top: "conv2_2_ex" 554 | param { 555 | lr_mult: 1 556 | decay_mult: 0 557 | } 558 | param { 559 | lr_mult: 1 560 | decay_mult: 0 561 | } 562 | scale_param { 563 | bias_term: true 564 | } 565 | } 566 | layer { 567 | name: "relu2_2_ex" 568 | type: "PReLU" 569 | bottom: "conv2_2_ex" 570 | top: "conv2_2_ex" 571 | } 572 | 573 | 574 | layer { 575 | name: "conv2_2_dw" 576 | type: "DepthwiseConvolution" 577 | bottom: "conv2_2_ex" 578 | top: "conv2_2_dw" 579 | param { 580 | lr_mult: 1 581 | decay_mult: 1 582 | } 583 | convolution_param { 584 | num_output: 128 585 | group:128 586 | kernel_size: 3 587 | stride: 1 588 | pad: 1 589 | weight_filler { 590 | type: "xavier" 591 | } 592 | bias_term:false 593 | engine: CAFFE 594 | } 595 | } 596 | 597 | layer { 598 | name: "conv2_2_dw/bn" 599 | type: "BatchNorm" 600 | bottom: "conv2_2_dw" 601 | top: "conv2_2_dw" 602 | param { 603 | lr_mult: 0 604 | decay_mult: 0 605 | } 606 | param { 607 | lr_mult: 0 608 | decay_mult: 0 609 | } 610 | param { 611 | lr_mult: 0 612 | decay_mult: 0 613 | } 614 | } 615 | layer { 616 | name: "conv2_2_dw/scale" 617 | type: "Scale" 618 | bottom: "conv2_2_dw" 619 | top: "conv2_2_dw" 620 | param { 621 | lr_mult: 1 622 | decay_mult: 0 623 | } 624 | param { 625 | lr_mult: 1 626 | decay_mult: 0 627 | } 628 | scale_param { 629 | bias_term: true 630 | } 631 | } 632 | layer { 633 | name: "relu2_2_dw" 634 | type: "PReLU" 635 | bottom: "conv2_2_dw" 636 | top: "conv2_2_dw" 637 | } 638 | 639 | layer { 640 | name: "conv2_2_em" 641 | type: "Convolution" 642 | bottom: "conv2_2_dw" 643 | top: "conv2_2_em" 644 | param { 645 | lr_mult: 1 646 | decay_mult: 1 647 | } 648 | convolution_param { 649 | num_output: 64 650 | kernel_size: 1 651 | stride: 1 652 | pad: 0 653 | weight_filler { 654 | type: "xavier" 655 | } 656 | bias_term:false 657 | } 658 | } 659 | 660 | 661 | layer { 662 | name: "conv2_2_em/bn" 663 | type: "BatchNorm" 664 | bottom: "conv2_2_em" 665 | top: "conv2_2_em" 666 | param { 667 | lr_mult: 0 668 | decay_mult: 0 669 | } 670 | param { 671 | lr_mult: 0 672 | decay_mult: 0 673 | } 674 | param { 675 | lr_mult: 0 676 | decay_mult: 0 677 | } 678 | } 679 | layer { 680 | name: "conv2_2_em/scale" 681 | type: "Scale" 682 | bottom: "conv2_2_em" 683 | top: "conv2_2_em" 684 | param { 685 | lr_mult: 1 686 | decay_mult: 0 687 | } 688 | param { 689 | lr_mult: 1 690 | decay_mult: 0 691 | } 692 | scale_param { 693 | bias_term: true 694 | } 695 | } 696 | 697 | layer { 698 | name: "res2_2" 699 | type: "Eltwise" 700 | bottom: "res2_1" 701 | bottom: "conv2_2_em" 702 | top: "res2_2" 703 | } 704 | 705 | layer { 706 | name: "conv2_3_ex" 707 | type: "Convolution" 708 | bottom: "res2_2" 709 | top: "conv2_3_ex" 710 | param { 711 | lr_mult: 1 712 | decay_mult: 1 713 | } 714 | convolution_param { 715 | num_output: 128 716 | kernel_size: 1 717 | stride: 1 718 | pad: 0 719 | weight_filler { 720 | type: "xavier" 721 | } 722 | bias_term:false 723 | } 724 | } 725 | 726 | layer { 727 | name: "conv2_3_ex/bn" 728 | type: "BatchNorm" 729 | bottom: "conv2_3_ex" 730 | top: "conv2_3_ex" 731 | param { 732 | lr_mult: 0 733 | decay_mult: 0 734 | } 735 | param { 736 | lr_mult: 0 737 | decay_mult: 0 738 | } 739 | param { 740 | lr_mult: 0 741 | decay_mult: 0 742 | } 743 | } 744 | layer { 745 | name: "conv2_3_ex/scale" 746 | type: "Scale" 747 | bottom: "conv2_3_ex" 748 | top: "conv2_3_ex" 749 | param { 750 | lr_mult: 1 751 | decay_mult: 0 752 | } 753 | param { 754 | lr_mult: 1 755 | decay_mult: 0 756 | } 757 | scale_param { 758 | bias_term: true 759 | } 760 | } 761 | layer { 762 | name: "relu2_3_ex" 763 | type: "PReLU" 764 | bottom: "conv2_3_ex" 765 | top: "conv2_3_ex" 766 | } 767 | 768 | 769 | layer { 770 | name: "conv2_3_dw" 771 | type: "DepthwiseConvolution" 772 | bottom: "conv2_3_ex" 773 | top: "conv2_3_dw" 774 | param { 775 | lr_mult: 1 776 | decay_mult: 1 777 | } 778 | convolution_param { 779 | num_output: 128 780 | group:128 781 | kernel_size: 3 782 | stride: 1 783 | pad: 1 784 | weight_filler { 785 | type: "xavier" 786 | } 787 | bias_term:false 788 | engine: CAFFE 789 | } 790 | } 791 | 792 | layer { 793 | name: "conv2_3_dw/bn" 794 | type: "BatchNorm" 795 | bottom: "conv2_3_dw" 796 | top: "conv2_3_dw" 797 | param { 798 | lr_mult: 0 799 | decay_mult: 0 800 | } 801 | param { 802 | lr_mult: 0 803 | decay_mult: 0 804 | } 805 | param { 806 | lr_mult: 0 807 | decay_mult: 0 808 | } 809 | } 810 | layer { 811 | name: "conv2_3_dw/scale" 812 | type: "Scale" 813 | bottom: "conv2_3_dw" 814 | top: "conv2_3_dw" 815 | param { 816 | lr_mult: 1 817 | decay_mult: 0 818 | } 819 | param { 820 | lr_mult: 1 821 | decay_mult: 0 822 | } 823 | scale_param { 824 | bias_term: true 825 | } 826 | } 827 | layer { 828 | name: "relu2_3_dw" 829 | type: "PReLU" 830 | bottom: "conv2_3_dw" 831 | top: "conv2_3_dw" 832 | } 833 | 834 | layer { 835 | name: "conv2_3_em" 836 | type: "Convolution" 837 | bottom: "conv2_3_dw" 838 | top: "conv2_3_em" 839 | param { 840 | lr_mult: 1 841 | decay_mult: 1 842 | } 843 | convolution_param { 844 | num_output: 64 845 | kernel_size: 1 846 | stride: 1 847 | pad: 0 848 | weight_filler { 849 | type: "xavier" 850 | } 851 | bias_term:false 852 | } 853 | } 854 | 855 | 856 | layer { 857 | name: "conv2_3_em/bn" 858 | type: "BatchNorm" 859 | bottom: "conv2_3_em" 860 | top: "conv2_3_em" 861 | param { 862 | lr_mult: 0 863 | decay_mult: 0 864 | } 865 | param { 866 | lr_mult: 0 867 | decay_mult: 0 868 | } 869 | param { 870 | lr_mult: 0 871 | decay_mult: 0 872 | } 873 | } 874 | layer { 875 | name: "conv2_3_em/scale" 876 | type: "Scale" 877 | bottom: "conv2_3_em" 878 | top: "conv2_3_em" 879 | param { 880 | lr_mult: 1 881 | decay_mult: 0 882 | } 883 | param { 884 | lr_mult: 1 885 | decay_mult: 0 886 | } 887 | scale_param { 888 | bias_term: true 889 | } 890 | } 891 | 892 | layer { 893 | name: "res2_3" 894 | type: "Eltwise" 895 | bottom: "res2_2" 896 | bottom: "conv2_3_em" 897 | top: "res2_3" 898 | } 899 | 900 | layer { 901 | name: "conv2_4_ex" 902 | type: "Convolution" 903 | bottom: "res2_3" 904 | top: "conv2_4_ex" 905 | param { 906 | lr_mult: 1 907 | decay_mult: 1 908 | } 909 | 910 | convolution_param { 911 | num_output: 128 912 | kernel_size: 1 913 | stride: 1 914 | pad: 0 915 | weight_filler { 916 | type: "xavier" 917 | } 918 | bias_term:false 919 | } 920 | } 921 | 922 | layer { 923 | name: "conv2_4_ex/bn" 924 | type: "BatchNorm" 925 | bottom: "conv2_4_ex" 926 | top: "conv2_4_ex" 927 | param { 928 | lr_mult: 0 929 | decay_mult: 0 930 | } 931 | param { 932 | lr_mult: 0 933 | decay_mult: 0 934 | } 935 | param { 936 | lr_mult: 0 937 | decay_mult: 0 938 | } 939 | } 940 | layer { 941 | name: "conv2_4_ex/scale" 942 | type: "Scale" 943 | bottom: "conv2_4_ex" 944 | top: "conv2_4_ex" 945 | param { 946 | lr_mult: 1 947 | decay_mult: 0 948 | } 949 | param { 950 | lr_mult: 1 951 | decay_mult: 0 952 | } 953 | scale_param { 954 | bias_term: true 955 | } 956 | } 957 | layer { 958 | name: "relu2_4_ex" 959 | type: "PReLU" 960 | bottom: "conv2_4_ex" 961 | top: "conv2_4_ex" 962 | } 963 | 964 | 965 | layer { 966 | name: "conv2_4_dw" 967 | type: "DepthwiseConvolution" 968 | bottom: "conv2_4_ex" 969 | top: "conv2_4_dw" 970 | param { 971 | lr_mult: 1 972 | decay_mult: 1 973 | } 974 | convolution_param { 975 | num_output: 128 976 | group:128 977 | kernel_size: 3 978 | stride: 1 979 | pad: 1 980 | weight_filler { 981 | type: "xavier" 982 | } 983 | bias_term:false 984 | engine: CAFFE 985 | } 986 | } 987 | 988 | layer { 989 | name: "conv2_4_dw/bn" 990 | type: "BatchNorm" 991 | bottom: "conv2_4_dw" 992 | top: "conv2_4_dw" 993 | param { 994 | lr_mult: 0 995 | decay_mult: 0 996 | } 997 | param { 998 | lr_mult: 0 999 | decay_mult: 0 1000 | } 1001 | param { 1002 | lr_mult: 0 1003 | decay_mult: 0 1004 | } 1005 | } 1006 | layer { 1007 | name: "conv2_4_dw/scale" 1008 | type: "Scale" 1009 | bottom: "conv2_4_dw" 1010 | top: "conv2_4_dw" 1011 | param { 1012 | lr_mult: 1 1013 | decay_mult: 0 1014 | } 1015 | param { 1016 | lr_mult: 1 1017 | decay_mult: 0 1018 | } 1019 | scale_param { 1020 | bias_term: true 1021 | } 1022 | } 1023 | layer { 1024 | name: "relu2_4_dw" 1025 | type: "PReLU" 1026 | bottom: "conv2_4_dw" 1027 | top: "conv2_4_dw" 1028 | } 1029 | 1030 | layer { 1031 | name: "conv2_4_em" 1032 | type: "Convolution" 1033 | bottom: "conv2_4_dw" 1034 | top: "conv2_4_em" 1035 | param { 1036 | lr_mult: 1 1037 | decay_mult: 1 1038 | } 1039 | convolution_param { 1040 | num_output: 64 1041 | kernel_size: 1 1042 | stride: 1 1043 | pad: 0 1044 | weight_filler { 1045 | type: "xavier" 1046 | } 1047 | bias_term:false 1048 | } 1049 | } 1050 | 1051 | 1052 | layer { 1053 | name: "conv2_4_em/bn" 1054 | type: "BatchNorm" 1055 | bottom: "conv2_4_em" 1056 | top: "conv2_4_em" 1057 | param { 1058 | lr_mult: 0 1059 | decay_mult: 0 1060 | } 1061 | param { 1062 | lr_mult: 0 1063 | decay_mult: 0 1064 | } 1065 | param { 1066 | lr_mult: 0 1067 | decay_mult: 0 1068 | } 1069 | } 1070 | layer { 1071 | name: "conv2_4_em/scale" 1072 | type: "Scale" 1073 | bottom: "conv2_4_em" 1074 | top: "conv2_4_em" 1075 | param { 1076 | lr_mult: 1 1077 | decay_mult: 0 1078 | } 1079 | param { 1080 | lr_mult: 1 1081 | decay_mult: 0 1082 | } 1083 | scale_param { 1084 | bias_term: true 1085 | } 1086 | } 1087 | 1088 | layer { 1089 | name: "res2_4" 1090 | type: "Eltwise" 1091 | bottom: "res2_3" 1092 | bottom: "conv2_4_em" 1093 | top: "res2_4" 1094 | } 1095 | 1096 | 1097 | layer { 1098 | name: "conv3_ex" 1099 | type: "Convolution" 1100 | bottom: "res2_4" 1101 | top: "conv3_ex" 1102 | param { 1103 | lr_mult: 1 1104 | decay_mult: 1 1105 | } 1106 | convolution_param { 1107 | num_output: 256 1108 | kernel_size: 1 1109 | stride: 1 1110 | pad: 0 1111 | weight_filler { 1112 | type: "xavier" 1113 | } 1114 | bias_term:false 1115 | } 1116 | } 1117 | 1118 | layer { 1119 | name: "conv3_ex/bn" 1120 | type: "BatchNorm" 1121 | bottom: "conv3_ex" 1122 | top: "conv3_ex" 1123 | param { 1124 | lr_mult: 0 1125 | decay_mult: 0 1126 | } 1127 | param { 1128 | lr_mult: 0 1129 | decay_mult: 0 1130 | } 1131 | param { 1132 | lr_mult: 0 1133 | decay_mult: 0 1134 | } 1135 | } 1136 | layer { 1137 | name: "conv3_ex/scale" 1138 | type: "Scale" 1139 | bottom: "conv3_ex" 1140 | top: "conv3_ex" 1141 | param { 1142 | lr_mult: 1 1143 | decay_mult: 0 1144 | } 1145 | param { 1146 | lr_mult: 1 1147 | decay_mult: 0 1148 | } 1149 | scale_param { 1150 | bias_term: true 1151 | } 1152 | } 1153 | layer { 1154 | name: "relu3_ex" 1155 | type: "PReLU" 1156 | bottom: "conv3_ex" 1157 | top: "conv3_ex" 1158 | } 1159 | 1160 | 1161 | layer { 1162 | name: "conv3_dw" 1163 | type: "DepthwiseConvolution" 1164 | bottom: "conv3_ex" 1165 | top: "conv3_dw" 1166 | param { 1167 | lr_mult: 1 1168 | decay_mult: 1 1169 | } 1170 | convolution_param { 1171 | num_output: 256 1172 | group:256 1173 | kernel_size: 3 1174 | stride: 2 1175 | pad: 1 1176 | weight_filler { 1177 | type: "xavier" 1178 | } 1179 | bias_term:false 1180 | engine: CAFFE 1181 | } 1182 | } 1183 | 1184 | layer { 1185 | name: "conv3_dw/bn" 1186 | type: "BatchNorm" 1187 | bottom: "conv3_dw" 1188 | top: "conv3_dw" 1189 | param { 1190 | lr_mult: 0 1191 | decay_mult: 0 1192 | } 1193 | param { 1194 | lr_mult: 0 1195 | decay_mult: 0 1196 | } 1197 | param { 1198 | lr_mult: 0 1199 | decay_mult: 0 1200 | } 1201 | } 1202 | layer { 1203 | name: "conv3_dw/scale" 1204 | type: "Scale" 1205 | bottom: "conv3_dw" 1206 | top: "conv3_dw" 1207 | param { 1208 | lr_mult: 1 1209 | decay_mult: 0 1210 | } 1211 | param { 1212 | lr_mult: 1 1213 | decay_mult: 0 1214 | } 1215 | scale_param { 1216 | bias_term: true 1217 | } 1218 | } 1219 | layer { 1220 | name: "relu3_dw" 1221 | type: "PReLU" 1222 | bottom: "conv3_dw" 1223 | top: "conv3_dw" 1224 | } 1225 | 1226 | layer { 1227 | name: "conv3_em" 1228 | type: "Convolution" 1229 | bottom: "conv3_dw" 1230 | top: "conv3_em" 1231 | param { 1232 | lr_mult: 1 1233 | decay_mult: 1 1234 | } 1235 | convolution_param { 1236 | num_output: 128 1237 | kernel_size: 1 1238 | stride: 1 1239 | pad: 0 1240 | weight_filler { 1241 | type: "xavier" 1242 | } 1243 | bias_term:false 1244 | } 1245 | } 1246 | 1247 | 1248 | layer { 1249 | name: "conv3_em/bn" 1250 | type: "BatchNorm" 1251 | bottom: "conv3_em" 1252 | top: "conv3_em" 1253 | param { 1254 | lr_mult: 0 1255 | decay_mult: 0 1256 | } 1257 | param { 1258 | lr_mult: 0 1259 | decay_mult: 0 1260 | } 1261 | param { 1262 | lr_mult: 0 1263 | decay_mult: 0 1264 | } 1265 | } 1266 | layer { 1267 | name: "conv3_em/scale" 1268 | type: "Scale" 1269 | bottom: "conv3_em" 1270 | top: "conv3_em" 1271 | param { 1272 | lr_mult: 1 1273 | decay_mult: 0 1274 | } 1275 | param { 1276 | lr_mult: 1 1277 | decay_mult: 0 1278 | } 1279 | scale_param { 1280 | bias_term: true 1281 | } 1282 | } 1283 | 1284 | layer { 1285 | name: "conv3_1_ex" 1286 | type: "Convolution" 1287 | bottom: "conv3_em" 1288 | top: "conv3_1_ex" 1289 | param { 1290 | lr_mult: 1 1291 | decay_mult: 1 1292 | } 1293 | convolution_param { 1294 | num_output: 256 1295 | kernel_size: 1 1296 | stride: 1 1297 | pad: 0 1298 | weight_filler { 1299 | type: "xavier" 1300 | } 1301 | bias_term:false 1302 | } 1303 | } 1304 | 1305 | layer { 1306 | name: "conv3_1_ex/bn" 1307 | type: "BatchNorm" 1308 | bottom: "conv3_1_ex" 1309 | top: "conv3_1_ex" 1310 | param { 1311 | lr_mult: 0 1312 | decay_mult: 0 1313 | } 1314 | param { 1315 | lr_mult: 0 1316 | decay_mult: 0 1317 | } 1318 | param { 1319 | lr_mult: 0 1320 | decay_mult: 0 1321 | } 1322 | } 1323 | layer { 1324 | name: "conv3_1_ex/scale" 1325 | type: "Scale" 1326 | bottom: "conv3_1_ex" 1327 | top: "conv3_1_ex" 1328 | param { 1329 | lr_mult: 1 1330 | decay_mult: 0 1331 | } 1332 | param { 1333 | lr_mult: 1 1334 | decay_mult: 0 1335 | } 1336 | scale_param { 1337 | bias_term: true 1338 | } 1339 | } 1340 | layer { 1341 | name: "relu3_1_ex" 1342 | type: "PReLU" 1343 | bottom: "conv3_1_ex" 1344 | top: "conv3_1_ex" 1345 | } 1346 | 1347 | 1348 | layer { 1349 | name: "conv3_1_dw" 1350 | type: "DepthwiseConvolution" 1351 | bottom: "conv3_1_ex" 1352 | top: "conv3_1_dw" 1353 | param { 1354 | lr_mult: 1 1355 | decay_mult: 1 1356 | } 1357 | convolution_param { 1358 | num_output: 256 1359 | group:256 1360 | kernel_size: 3 1361 | stride: 1 1362 | pad: 1 1363 | weight_filler { 1364 | type: "xavier" 1365 | } 1366 | bias_term:false 1367 | engine: CAFFE 1368 | } 1369 | } 1370 | 1371 | layer { 1372 | name: "conv3_1_dw/bn" 1373 | type: "BatchNorm" 1374 | bottom: "conv3_1_dw" 1375 | top: "conv3_1_dw" 1376 | param { 1377 | lr_mult: 0 1378 | decay_mult: 0 1379 | } 1380 | param { 1381 | lr_mult: 0 1382 | decay_mult: 0 1383 | } 1384 | param { 1385 | lr_mult: 0 1386 | decay_mult: 0 1387 | } 1388 | } 1389 | layer { 1390 | name: "conv3_1_dw/scale" 1391 | type: "Scale" 1392 | bottom: "conv3_1_dw" 1393 | top: "conv3_1_dw" 1394 | param { 1395 | lr_mult: 1 1396 | decay_mult: 0 1397 | } 1398 | param { 1399 | lr_mult: 1 1400 | decay_mult: 0 1401 | } 1402 | scale_param { 1403 | bias_term: true 1404 | } 1405 | } 1406 | layer { 1407 | name: "relu3_1_dw" 1408 | type: "PReLU" 1409 | bottom: "conv3_1_dw" 1410 | top: "conv3_1_dw" 1411 | } 1412 | 1413 | layer { 1414 | name: "conv3_1_em" 1415 | type: "Convolution" 1416 | bottom: "conv3_1_dw" 1417 | top: "conv3_1_em" 1418 | param { 1419 | lr_mult: 1 1420 | decay_mult: 1 1421 | } 1422 | convolution_param { 1423 | num_output: 128 1424 | kernel_size: 1 1425 | stride: 1 1426 | pad: 0 1427 | weight_filler { 1428 | type: "xavier" 1429 | } 1430 | bias_term:false 1431 | } 1432 | } 1433 | 1434 | 1435 | layer { 1436 | name: "conv3_1_em/bn" 1437 | type: "BatchNorm" 1438 | bottom: "conv3_1_em" 1439 | top: "conv3_1_em" 1440 | param { 1441 | lr_mult: 0 1442 | decay_mult: 0 1443 | } 1444 | param { 1445 | lr_mult: 0 1446 | decay_mult: 0 1447 | } 1448 | param { 1449 | lr_mult: 0 1450 | decay_mult: 0 1451 | } 1452 | } 1453 | layer { 1454 | name: "conv3_1_em/scale" 1455 | type: "Scale" 1456 | bottom: "conv3_1_em" 1457 | top: "conv3_1_em" 1458 | param { 1459 | lr_mult: 1 1460 | decay_mult: 0 1461 | } 1462 | param { 1463 | lr_mult: 1 1464 | decay_mult: 0 1465 | } 1466 | scale_param { 1467 | bias_term: true 1468 | } 1469 | } 1470 | 1471 | layer { 1472 | name: "res3_1" 1473 | type: "Eltwise" 1474 | bottom: "conv3_em" 1475 | bottom: "conv3_1_em" 1476 | top: "res3_1" 1477 | } 1478 | 1479 | 1480 | layer { 1481 | name: "conv3_2_ex" 1482 | type: "Convolution" 1483 | bottom: "res3_1" 1484 | top: "conv3_2_ex" 1485 | param { 1486 | lr_mult: 1 1487 | decay_mult: 1 1488 | } 1489 | convolution_param { 1490 | num_output: 256 1491 | kernel_size: 1 1492 | stride: 1 1493 | pad: 0 1494 | weight_filler { 1495 | type: "xavier" 1496 | } 1497 | bias_term:false 1498 | } 1499 | } 1500 | 1501 | layer { 1502 | name: "conv3_2_ex/bn" 1503 | type: "BatchNorm" 1504 | bottom: "conv3_2_ex" 1505 | top: "conv3_2_ex" 1506 | param { 1507 | lr_mult: 0 1508 | decay_mult: 0 1509 | } 1510 | param { 1511 | lr_mult: 0 1512 | decay_mult: 0 1513 | } 1514 | param { 1515 | lr_mult: 0 1516 | decay_mult: 0 1517 | } 1518 | } 1519 | layer { 1520 | name: "conv3_2_ex/scale" 1521 | type: "Scale" 1522 | bottom: "conv3_2_ex" 1523 | top: "conv3_2_ex" 1524 | param { 1525 | lr_mult: 1 1526 | decay_mult: 0 1527 | } 1528 | param { 1529 | lr_mult: 1 1530 | decay_mult: 0 1531 | } 1532 | scale_param { 1533 | bias_term: true 1534 | } 1535 | } 1536 | layer { 1537 | name: "relu3_2_ex" 1538 | type: "PReLU" 1539 | bottom: "conv3_2_ex" 1540 | top: "conv3_2_ex" 1541 | } 1542 | 1543 | 1544 | layer { 1545 | name: "conv3_2_dw" 1546 | type: "DepthwiseConvolution" 1547 | bottom: "conv3_2_ex" 1548 | top: "conv3_2_dw" 1549 | param { 1550 | lr_mult: 1 1551 | decay_mult: 1 1552 | } 1553 | convolution_param { 1554 | num_output: 256 1555 | group:256 1556 | kernel_size: 3 1557 | stride: 1 1558 | pad: 1 1559 | weight_filler { 1560 | type: "xavier" 1561 | } 1562 | bias_term:false 1563 | engine: CAFFE 1564 | } 1565 | } 1566 | 1567 | layer { 1568 | name: "conv3_2_dw/bn" 1569 | type: "BatchNorm" 1570 | bottom: "conv3_2_dw" 1571 | top: "conv3_2_dw" 1572 | param { 1573 | lr_mult: 0 1574 | decay_mult: 0 1575 | } 1576 | param { 1577 | lr_mult: 0 1578 | decay_mult: 0 1579 | } 1580 | param { 1581 | lr_mult: 0 1582 | decay_mult: 0 1583 | } 1584 | } 1585 | layer { 1586 | name: "conv3_2_dw/scale" 1587 | type: "Scale" 1588 | bottom: "conv3_2_dw" 1589 | top: "conv3_2_dw" 1590 | param { 1591 | lr_mult: 1 1592 | decay_mult: 0 1593 | } 1594 | param { 1595 | lr_mult: 1 1596 | decay_mult: 0 1597 | } 1598 | scale_param { 1599 | bias_term: true 1600 | } 1601 | } 1602 | layer { 1603 | name: "relu3_2_dw" 1604 | type: "PReLU" 1605 | bottom: "conv3_2_dw" 1606 | top: "conv3_2_dw" 1607 | } 1608 | 1609 | layer { 1610 | name: "conv3_2_em" 1611 | type: "Convolution" 1612 | bottom: "conv3_2_dw" 1613 | top: "conv3_2_em" 1614 | param { 1615 | lr_mult: 1 1616 | decay_mult: 1 1617 | } 1618 | convolution_param { 1619 | num_output: 128 1620 | kernel_size: 1 1621 | stride: 1 1622 | pad: 0 1623 | weight_filler { 1624 | type: "xavier" 1625 | } 1626 | bias_term:false 1627 | } 1628 | } 1629 | 1630 | 1631 | layer { 1632 | name: "conv3_2_em/bn" 1633 | type: "BatchNorm" 1634 | bottom: "conv3_2_em" 1635 | top: "conv3_2_em" 1636 | param { 1637 | lr_mult: 0 1638 | decay_mult: 0 1639 | } 1640 | param { 1641 | lr_mult: 0 1642 | decay_mult: 0 1643 | } 1644 | param { 1645 | lr_mult: 0 1646 | decay_mult: 0 1647 | } 1648 | } 1649 | layer { 1650 | name: "conv3_2_em/scale" 1651 | type: "Scale" 1652 | bottom: "conv3_2_em" 1653 | top: "conv3_2_em" 1654 | param { 1655 | lr_mult: 1 1656 | decay_mult: 0 1657 | } 1658 | param { 1659 | lr_mult: 1 1660 | decay_mult: 0 1661 | } 1662 | scale_param { 1663 | bias_term: true 1664 | } 1665 | } 1666 | 1667 | layer { 1668 | name: "res3_2" 1669 | type: "Eltwise" 1670 | bottom: "res3_1" 1671 | bottom: "conv3_2_em" 1672 | top: "res3_2" 1673 | } 1674 | 1675 | layer { 1676 | name: "conv3_3_ex" 1677 | type: "Convolution" 1678 | bottom: "res3_2" 1679 | top: "conv3_3_ex" 1680 | param { 1681 | lr_mult: 1 1682 | decay_mult: 1 1683 | } 1684 | convolution_param { 1685 | num_output: 256 1686 | kernel_size: 1 1687 | stride: 1 1688 | pad: 0 1689 | weight_filler { 1690 | type: "xavier" 1691 | } 1692 | bias_term:false 1693 | } 1694 | } 1695 | 1696 | layer { 1697 | name: "conv3_3_ex/bn" 1698 | type: "BatchNorm" 1699 | bottom: "conv3_3_ex" 1700 | top: "conv3_3_ex" 1701 | param { 1702 | lr_mult: 0 1703 | decay_mult: 0 1704 | } 1705 | param { 1706 | lr_mult: 0 1707 | decay_mult: 0 1708 | } 1709 | param { 1710 | lr_mult: 0 1711 | decay_mult: 0 1712 | } 1713 | } 1714 | layer { 1715 | name: "conv3_3_ex/scale" 1716 | type: "Scale" 1717 | bottom: "conv3_3_ex" 1718 | top: "conv3_3_ex" 1719 | param { 1720 | lr_mult: 1 1721 | decay_mult: 0 1722 | } 1723 | param { 1724 | lr_mult: 1 1725 | decay_mult: 0 1726 | } 1727 | scale_param { 1728 | bias_term: true 1729 | } 1730 | } 1731 | layer { 1732 | name: "relu3_3_ex" 1733 | type: "PReLU" 1734 | bottom: "conv3_3_ex" 1735 | top: "conv3_3_ex" 1736 | } 1737 | 1738 | 1739 | layer { 1740 | name: "conv3_3_dw" 1741 | type: "DepthwiseConvolution" 1742 | bottom: "conv3_3_ex" 1743 | top: "conv3_3_dw" 1744 | param { 1745 | lr_mult: 1 1746 | decay_mult: 1 1747 | } 1748 | convolution_param { 1749 | num_output: 256 1750 | group:256 1751 | kernel_size: 3 1752 | stride: 1 1753 | pad: 1 1754 | weight_filler { 1755 | type: "xavier" 1756 | } 1757 | bias_term:false 1758 | engine: CAFFE 1759 | } 1760 | } 1761 | 1762 | layer { 1763 | name: "conv3_3_dw/bn" 1764 | type: "BatchNorm" 1765 | bottom: "conv3_3_dw" 1766 | top: "conv3_3_dw" 1767 | param { 1768 | lr_mult: 0 1769 | decay_mult: 0 1770 | } 1771 | param { 1772 | lr_mult: 0 1773 | decay_mult: 0 1774 | } 1775 | param { 1776 | lr_mult: 0 1777 | decay_mult: 0 1778 | } 1779 | } 1780 | layer { 1781 | name: "conv3_3_dw/scale" 1782 | type: "Scale" 1783 | bottom: "conv3_3_dw" 1784 | top: "conv3_3_dw" 1785 | param { 1786 | lr_mult: 1 1787 | decay_mult: 0 1788 | } 1789 | param { 1790 | lr_mult: 1 1791 | decay_mult: 0 1792 | } 1793 | scale_param { 1794 | bias_term: true 1795 | } 1796 | } 1797 | layer { 1798 | name: "relu3_3_dw" 1799 | type: "PReLU" 1800 | bottom: "conv3_3_dw" 1801 | top: "conv3_3_dw" 1802 | } 1803 | 1804 | layer { 1805 | name: "conv3_3_em" 1806 | type: "Convolution" 1807 | bottom: "conv3_3_dw" 1808 | top: "conv3_3_em" 1809 | param { 1810 | lr_mult: 1 1811 | decay_mult: 1 1812 | } 1813 | convolution_param { 1814 | num_output: 128 1815 | kernel_size: 1 1816 | stride: 1 1817 | pad: 0 1818 | weight_filler { 1819 | type: "xavier" 1820 | } 1821 | bias_term:false 1822 | } 1823 | } 1824 | 1825 | 1826 | layer { 1827 | name: "conv3_3_em/bn" 1828 | type: "BatchNorm" 1829 | bottom: "conv3_3_em" 1830 | top: "conv3_3_em" 1831 | param { 1832 | lr_mult: 0 1833 | decay_mult: 0 1834 | } 1835 | param { 1836 | lr_mult: 0 1837 | decay_mult: 0 1838 | } 1839 | param { 1840 | lr_mult: 0 1841 | decay_mult: 0 1842 | } 1843 | } 1844 | layer { 1845 | name: "conv3_3_em/scale" 1846 | type: "Scale" 1847 | bottom: "conv3_3_em" 1848 | top: "conv3_3_em" 1849 | param { 1850 | lr_mult: 1 1851 | decay_mult: 0 1852 | } 1853 | param { 1854 | lr_mult: 1 1855 | decay_mult: 0 1856 | } 1857 | scale_param { 1858 | bias_term: true 1859 | } 1860 | } 1861 | 1862 | layer { 1863 | name: "res3_3" 1864 | type: "Eltwise" 1865 | bottom: "res3_2" 1866 | bottom: "conv3_3_em" 1867 | top: "res3_3" 1868 | } 1869 | 1870 | 1871 | layer { 1872 | name: "conv3_4_ex" 1873 | type: "Convolution" 1874 | bottom: "res3_3" 1875 | top: "conv3_4_ex" 1876 | param { 1877 | lr_mult: 1 1878 | decay_mult: 1 1879 | } 1880 | convolution_param { 1881 | num_output: 256 1882 | kernel_size: 1 1883 | stride: 1 1884 | pad: 0 1885 | weight_filler { 1886 | type: "xavier" 1887 | } 1888 | bias_term:false 1889 | } 1890 | } 1891 | 1892 | layer { 1893 | name: "conv3_4_ex/bn" 1894 | type: "BatchNorm" 1895 | bottom: "conv3_4_ex" 1896 | top: "conv3_4_ex" 1897 | param { 1898 | lr_mult: 0 1899 | decay_mult: 0 1900 | } 1901 | param { 1902 | lr_mult: 0 1903 | decay_mult: 0 1904 | } 1905 | param { 1906 | lr_mult: 0 1907 | decay_mult: 0 1908 | } 1909 | } 1910 | layer { 1911 | name: "conv3_4_ex/scale" 1912 | type: "Scale" 1913 | bottom: "conv3_4_ex" 1914 | top: "conv3_4_ex" 1915 | param { 1916 | lr_mult: 1 1917 | decay_mult: 0 1918 | } 1919 | param { 1920 | lr_mult: 1 1921 | decay_mult: 0 1922 | } 1923 | scale_param { 1924 | bias_term: true 1925 | } 1926 | } 1927 | layer { 1928 | name: "relu3_4_ex" 1929 | type: "PReLU" 1930 | bottom: "conv3_4_ex" 1931 | top: "conv3_4_ex" 1932 | } 1933 | 1934 | 1935 | layer { 1936 | name: "conv3_4_dw" 1937 | type: "DepthwiseConvolution" 1938 | bottom: "conv3_4_ex" 1939 | top: "conv3_4_dw" 1940 | param { 1941 | lr_mult: 1 1942 | decay_mult: 1 1943 | } 1944 | convolution_param { 1945 | num_output: 256 1946 | group:256 1947 | kernel_size: 3 1948 | stride: 1 1949 | pad: 1 1950 | weight_filler { 1951 | type: "xavier" 1952 | } 1953 | bias_term:false 1954 | engine: CAFFE 1955 | } 1956 | } 1957 | 1958 | layer { 1959 | name: "conv3_4_dw/bn" 1960 | type: "BatchNorm" 1961 | bottom: "conv3_4_dw" 1962 | top: "conv3_4_dw" 1963 | param { 1964 | lr_mult: 0 1965 | decay_mult: 0 1966 | } 1967 | param { 1968 | lr_mult: 0 1969 | decay_mult: 0 1970 | } 1971 | param { 1972 | lr_mult: 0 1973 | decay_mult: 0 1974 | } 1975 | } 1976 | layer { 1977 | name: "conv3_4_dw/scale" 1978 | type: "Scale" 1979 | bottom: "conv3_4_dw" 1980 | top: "conv3_4_dw" 1981 | param { 1982 | lr_mult: 1 1983 | decay_mult: 0 1984 | } 1985 | param { 1986 | lr_mult: 1 1987 | decay_mult: 0 1988 | } 1989 | scale_param { 1990 | bias_term: true 1991 | } 1992 | } 1993 | layer { 1994 | name: "relu3_4_dw" 1995 | type: "PReLU" 1996 | bottom: "conv3_4_dw" 1997 | top: "conv3_4_dw" 1998 | } 1999 | 2000 | layer { 2001 | name: "conv3_4_em" 2002 | type: "Convolution" 2003 | bottom: "conv3_4_dw" 2004 | top: "conv3_4_em" 2005 | param { 2006 | lr_mult: 1 2007 | decay_mult: 1 2008 | } 2009 | convolution_param { 2010 | num_output: 128 2011 | kernel_size: 1 2012 | stride: 1 2013 | pad: 0 2014 | weight_filler { 2015 | type: "xavier" 2016 | } 2017 | bias_term:false 2018 | } 2019 | } 2020 | 2021 | 2022 | layer { 2023 | name: "conv3_4_em/bn" 2024 | type: "BatchNorm" 2025 | bottom: "conv3_4_em" 2026 | top: "conv3_4_em" 2027 | param { 2028 | lr_mult: 0 2029 | decay_mult: 0 2030 | } 2031 | param { 2032 | lr_mult: 0 2033 | decay_mult: 0 2034 | } 2035 | param { 2036 | lr_mult: 0 2037 | decay_mult: 0 2038 | } 2039 | } 2040 | layer { 2041 | name: "conv3_4_em/scale" 2042 | type: "Scale" 2043 | bottom: "conv3_4_em" 2044 | top: "conv3_4_em" 2045 | param { 2046 | lr_mult: 1 2047 | decay_mult: 0 2048 | } 2049 | param { 2050 | lr_mult: 1 2051 | decay_mult: 0 2052 | } 2053 | scale_param { 2054 | bias_term: true 2055 | } 2056 | } 2057 | 2058 | layer { 2059 | name: "res3_4" 2060 | type: "Eltwise" 2061 | bottom: "res3_3" 2062 | bottom: "conv3_4_em" 2063 | top: "res3_4" 2064 | } 2065 | 2066 | 2067 | layer { 2068 | name: "conv3_5_ex" 2069 | type: "Convolution" 2070 | bottom: "res3_4" 2071 | top: "conv3_5_ex" 2072 | param { 2073 | lr_mult: 1 2074 | decay_mult: 1 2075 | } 2076 | convolution_param { 2077 | num_output: 256 2078 | kernel_size: 1 2079 | stride: 1 2080 | pad: 0 2081 | weight_filler { 2082 | type: "xavier" 2083 | } 2084 | bias_term:false 2085 | } 2086 | } 2087 | 2088 | layer { 2089 | name: "conv3_5_ex/bn" 2090 | type: "BatchNorm" 2091 | bottom: "conv3_5_ex" 2092 | top: "conv3_5_ex" 2093 | param { 2094 | lr_mult: 0 2095 | decay_mult: 0 2096 | } 2097 | param { 2098 | lr_mult: 0 2099 | decay_mult: 0 2100 | } 2101 | param { 2102 | lr_mult: 0 2103 | decay_mult: 0 2104 | } 2105 | } 2106 | layer { 2107 | name: "conv3_5_ex/scale" 2108 | type: "Scale" 2109 | bottom: "conv3_5_ex" 2110 | top: "conv3_5_ex" 2111 | param { 2112 | lr_mult: 1 2113 | decay_mult: 0 2114 | } 2115 | param { 2116 | lr_mult: 1 2117 | decay_mult: 0 2118 | } 2119 | scale_param { 2120 | bias_term: true 2121 | } 2122 | } 2123 | layer { 2124 | name: "relu3_5_ex" 2125 | type: "PReLU" 2126 | bottom: "conv3_5_ex" 2127 | top: "conv3_5_ex" 2128 | } 2129 | 2130 | 2131 | layer { 2132 | name: "conv3_5_dw" 2133 | type: "DepthwiseConvolution" 2134 | bottom: "conv3_5_ex" 2135 | top: "conv3_5_dw" 2136 | param { 2137 | lr_mult: 1 2138 | decay_mult: 1 2139 | } 2140 | convolution_param { 2141 | num_output: 256 2142 | group:256 2143 | kernel_size: 3 2144 | stride: 1 2145 | pad: 1 2146 | weight_filler { 2147 | type: "xavier" 2148 | } 2149 | bias_term:false 2150 | engine: CAFFE 2151 | } 2152 | } 2153 | 2154 | layer { 2155 | name: "conv3_5_dw/bn" 2156 | type: "BatchNorm" 2157 | bottom: "conv3_5_dw" 2158 | top: "conv3_5_dw" 2159 | param { 2160 | lr_mult: 0 2161 | decay_mult: 0 2162 | } 2163 | param { 2164 | lr_mult: 0 2165 | decay_mult: 0 2166 | } 2167 | param { 2168 | lr_mult: 0 2169 | decay_mult: 0 2170 | } 2171 | } 2172 | layer { 2173 | name: "conv3_5_dw/scale" 2174 | type: "Scale" 2175 | bottom: "conv3_5_dw" 2176 | top: "conv3_5_dw" 2177 | param { 2178 | lr_mult: 1 2179 | decay_mult: 0 2180 | } 2181 | param { 2182 | lr_mult: 1 2183 | decay_mult: 0 2184 | } 2185 | scale_param { 2186 | bias_term: true 2187 | } 2188 | } 2189 | layer { 2190 | name: "relu3_5_dw" 2191 | type: "PReLU" 2192 | bottom: "conv3_5_dw" 2193 | top: "conv3_5_dw" 2194 | } 2195 | 2196 | layer { 2197 | name: "conv3_5_em" 2198 | type: "Convolution" 2199 | bottom: "conv3_5_dw" 2200 | top: "conv3_5_em" 2201 | param { 2202 | lr_mult: 1 2203 | decay_mult: 1 2204 | } 2205 | convolution_param { 2206 | num_output: 128 2207 | kernel_size: 1 2208 | stride: 1 2209 | pad: 0 2210 | weight_filler { 2211 | type: "xavier" 2212 | } 2213 | bias_term:false 2214 | } 2215 | } 2216 | 2217 | 2218 | layer { 2219 | name: "conv3_5_em/bn" 2220 | type: "BatchNorm" 2221 | bottom: "conv3_5_em" 2222 | top: "conv3_5_em" 2223 | param { 2224 | lr_mult: 0 2225 | decay_mult: 0 2226 | } 2227 | param { 2228 | lr_mult: 0 2229 | decay_mult: 0 2230 | } 2231 | param { 2232 | lr_mult: 0 2233 | decay_mult: 0 2234 | } 2235 | } 2236 | layer { 2237 | name: "conv3_5_em/scale" 2238 | type: "Scale" 2239 | bottom: "conv3_5_em" 2240 | top: "conv3_5_em" 2241 | param { 2242 | lr_mult: 1 2243 | decay_mult: 0 2244 | } 2245 | param { 2246 | lr_mult: 1 2247 | decay_mult: 0 2248 | } 2249 | scale_param { 2250 | bias_term: true 2251 | } 2252 | } 2253 | 2254 | layer { 2255 | name: "res3_5" 2256 | type: "Eltwise" 2257 | bottom: "res3_4" 2258 | bottom: "conv3_5_em" 2259 | top: "res3_5" 2260 | } 2261 | 2262 | 2263 | layer { 2264 | name: "conv3_6_ex" 2265 | type: "Convolution" 2266 | bottom: "res3_5" 2267 | top: "conv3_6_ex" 2268 | param { 2269 | lr_mult: 1 2270 | decay_mult: 1 2271 | } 2272 | convolution_param { 2273 | num_output: 256 2274 | kernel_size: 1 2275 | stride: 1 2276 | pad: 0 2277 | weight_filler { 2278 | type: "xavier" 2279 | } 2280 | bias_term:false 2281 | } 2282 | } 2283 | 2284 | layer { 2285 | name: "conv3_6_ex/bn" 2286 | type: "BatchNorm" 2287 | bottom: "conv3_6_ex" 2288 | top: "conv3_6_ex" 2289 | param { 2290 | lr_mult: 0 2291 | decay_mult: 0 2292 | } 2293 | param { 2294 | lr_mult: 0 2295 | decay_mult: 0 2296 | } 2297 | param { 2298 | lr_mult: 0 2299 | decay_mult: 0 2300 | } 2301 | } 2302 | layer { 2303 | name: "conv3_6_ex/scale" 2304 | type: "Scale" 2305 | bottom: "conv3_6_ex" 2306 | top: "conv3_6_ex" 2307 | param { 2308 | lr_mult: 1 2309 | decay_mult: 0 2310 | } 2311 | param { 2312 | lr_mult: 1 2313 | decay_mult: 0 2314 | } 2315 | scale_param { 2316 | bias_term: true 2317 | } 2318 | } 2319 | layer { 2320 | name: "relu3_6_ex" 2321 | type: "PReLU" 2322 | bottom: "conv3_6_ex" 2323 | top: "conv3_6_ex" 2324 | } 2325 | 2326 | 2327 | layer { 2328 | name: "conv3_6_dw" 2329 | type: "DepthwiseConvolution" 2330 | bottom: "conv3_6_ex" 2331 | top: "conv3_6_dw" 2332 | param { 2333 | lr_mult: 1 2334 | decay_mult: 1 2335 | } 2336 | convolution_param { 2337 | num_output: 256 2338 | group:256 2339 | kernel_size: 3 2340 | stride: 1 2341 | pad: 1 2342 | weight_filler { 2343 | type: "xavier" 2344 | } 2345 | bias_term:false 2346 | engine: CAFFE 2347 | } 2348 | } 2349 | 2350 | layer { 2351 | name: "conv3_6_dw/bn" 2352 | type: "BatchNorm" 2353 | bottom: "conv3_6_dw" 2354 | top: "conv3_6_dw" 2355 | param { 2356 | lr_mult: 0 2357 | decay_mult: 0 2358 | } 2359 | param { 2360 | lr_mult: 0 2361 | decay_mult: 0 2362 | } 2363 | param { 2364 | lr_mult: 0 2365 | decay_mult: 0 2366 | } 2367 | } 2368 | layer { 2369 | name: "conv3_6_dw/scale" 2370 | type: "Scale" 2371 | bottom: "conv3_6_dw" 2372 | top: "conv3_6_dw" 2373 | param { 2374 | lr_mult: 1 2375 | decay_mult: 0 2376 | } 2377 | param { 2378 | lr_mult: 1 2379 | decay_mult: 0 2380 | } 2381 | scale_param { 2382 | bias_term: true 2383 | } 2384 | } 2385 | layer { 2386 | name: "relu3_6_dw" 2387 | type: "PReLU" 2388 | bottom: "conv3_6_dw" 2389 | top: "conv3_6_dw" 2390 | } 2391 | 2392 | layer { 2393 | name: "conv3_6_em" 2394 | type: "Convolution" 2395 | bottom: "conv3_6_dw" 2396 | top: "conv3_6_em" 2397 | param { 2398 | lr_mult: 1 2399 | decay_mult: 1 2400 | } 2401 | convolution_param { 2402 | num_output: 128 2403 | kernel_size: 1 2404 | stride: 1 2405 | pad: 0 2406 | weight_filler { 2407 | type: "xavier" 2408 | } 2409 | bias_term:false 2410 | } 2411 | } 2412 | 2413 | 2414 | layer { 2415 | name: "conv3_6_em/bn" 2416 | type: "BatchNorm" 2417 | bottom: "conv3_6_em" 2418 | top: "conv3_6_em" 2419 | param { 2420 | lr_mult: 0 2421 | decay_mult: 0 2422 | } 2423 | param { 2424 | lr_mult: 0 2425 | decay_mult: 0 2426 | } 2427 | param { 2428 | lr_mult: 0 2429 | decay_mult: 0 2430 | } 2431 | } 2432 | layer { 2433 | name: "conv3_6_em/scale" 2434 | type: "Scale" 2435 | bottom: "conv3_6_em" 2436 | top: "conv3_6_em" 2437 | param { 2438 | lr_mult: 1 2439 | decay_mult: 0 2440 | } 2441 | param { 2442 | lr_mult: 1 2443 | decay_mult: 0 2444 | } 2445 | scale_param { 2446 | bias_term: true 2447 | } 2448 | } 2449 | 2450 | layer { 2451 | name: "res3_6" 2452 | type: "Eltwise" 2453 | bottom: "res3_5" 2454 | bottom: "conv3_6_em" 2455 | top: "res3_6" 2456 | } 2457 | 2458 | layer { 2459 | name: "conv4_ex" 2460 | type: "Convolution" 2461 | bottom: "res3_6" 2462 | top: "conv4_ex" 2463 | param { 2464 | lr_mult: 1 2465 | decay_mult: 1 2466 | } 2467 | convolution_param { 2468 | num_output: 512 2469 | kernel_size: 1 2470 | stride: 1 2471 | pad: 0 2472 | weight_filler { 2473 | type: "xavier" 2474 | } 2475 | bias_term:false 2476 | } 2477 | } 2478 | 2479 | layer { 2480 | name: "conv4_ex/bn" 2481 | type: "BatchNorm" 2482 | bottom: "conv4_ex" 2483 | top: "conv4_ex" 2484 | param { 2485 | lr_mult: 0 2486 | decay_mult: 0 2487 | } 2488 | param { 2489 | lr_mult: 0 2490 | decay_mult: 0 2491 | } 2492 | param { 2493 | lr_mult: 0 2494 | decay_mult: 0 2495 | } 2496 | } 2497 | layer { 2498 | name: "conv4_ex/scale" 2499 | type: "Scale" 2500 | bottom: "conv4_ex" 2501 | top: "conv4_ex" 2502 | param { 2503 | lr_mult: 1 2504 | decay_mult: 0 2505 | } 2506 | param { 2507 | lr_mult: 1 2508 | decay_mult: 0 2509 | } 2510 | scale_param { 2511 | bias_term: true 2512 | } 2513 | } 2514 | layer { 2515 | name: "relu4_ex" 2516 | type: "PReLU" 2517 | bottom: "conv4_ex" 2518 | top: "conv4_ex" 2519 | } 2520 | 2521 | 2522 | layer { 2523 | name: "conv4_dw" 2524 | type: "DepthwiseConvolution" 2525 | bottom: "conv4_ex" 2526 | top: "conv4_dw" 2527 | param { 2528 | lr_mult: 1 2529 | decay_mult: 1 2530 | } 2531 | convolution_param { 2532 | num_output: 512 2533 | group:512 2534 | kernel_size: 3 2535 | stride: 2 2536 | pad: 1 2537 | weight_filler { 2538 | type: "xavier" 2539 | } 2540 | bias_term:false 2541 | engine: CAFFE 2542 | } 2543 | } 2544 | 2545 | layer { 2546 | name: "conv4_dw/bn" 2547 | type: "BatchNorm" 2548 | bottom: "conv4_dw" 2549 | top: "conv4_dw" 2550 | param { 2551 | lr_mult: 0 2552 | decay_mult: 0 2553 | } 2554 | param { 2555 | lr_mult: 0 2556 | decay_mult: 0 2557 | } 2558 | param { 2559 | lr_mult: 0 2560 | decay_mult: 0 2561 | } 2562 | } 2563 | layer { 2564 | name: "conv4_dw/scale" 2565 | type: "Scale" 2566 | bottom: "conv4_dw" 2567 | top: "conv4_dw" 2568 | param { 2569 | lr_mult: 1 2570 | decay_mult: 0 2571 | } 2572 | param { 2573 | lr_mult: 1 2574 | decay_mult: 0 2575 | } 2576 | scale_param { 2577 | bias_term: true 2578 | } 2579 | } 2580 | layer { 2581 | name: "relu4_dw" 2582 | type: "PReLU" 2583 | bottom: "conv4_dw" 2584 | top: "conv4_dw" 2585 | } 2586 | 2587 | layer { 2588 | name: "conv4_em" 2589 | type: "Convolution" 2590 | bottom: "conv4_dw" 2591 | top: "conv4_em" 2592 | param { 2593 | lr_mult: 1 2594 | decay_mult: 1 2595 | } 2596 | convolution_param { 2597 | num_output: 128 2598 | kernel_size: 1 2599 | stride: 1 2600 | pad: 0 2601 | weight_filler { 2602 | type: "xavier" 2603 | } 2604 | bias_term:false 2605 | } 2606 | } 2607 | 2608 | 2609 | layer { 2610 | name: "conv4_em/bn" 2611 | type: "BatchNorm" 2612 | bottom: "conv4_em" 2613 | top: "conv4_em" 2614 | param { 2615 | lr_mult: 0 2616 | decay_mult: 0 2617 | } 2618 | param { 2619 | lr_mult: 0 2620 | decay_mult: 0 2621 | } 2622 | param { 2623 | lr_mult: 0 2624 | decay_mult: 0 2625 | } 2626 | } 2627 | layer { 2628 | name: "conv4_em/scale" 2629 | type: "Scale" 2630 | bottom: "conv4_em" 2631 | top: "conv4_em" 2632 | param { 2633 | lr_mult: 1 2634 | decay_mult: 0 2635 | } 2636 | param { 2637 | lr_mult: 1 2638 | decay_mult: 0 2639 | } 2640 | scale_param { 2641 | bias_term: true 2642 | } 2643 | } 2644 | 2645 | layer { 2646 | name: "conv4_1_ex" 2647 | type: "Convolution" 2648 | bottom: "conv4_em" 2649 | top: "conv4_1_ex" 2650 | param { 2651 | lr_mult: 1 2652 | decay_mult: 1 2653 | } 2654 | convolution_param { 2655 | num_output: 256 2656 | kernel_size: 1 2657 | stride: 1 2658 | pad: 0 2659 | weight_filler { 2660 | type: "xavier" 2661 | } 2662 | bias_term:false 2663 | } 2664 | } 2665 | 2666 | layer { 2667 | name: "conv4_1_ex/bn" 2668 | type: "BatchNorm" 2669 | bottom: "conv4_1_ex" 2670 | top: "conv4_1_ex" 2671 | param { 2672 | lr_mult: 0 2673 | decay_mult: 0 2674 | } 2675 | param { 2676 | lr_mult: 0 2677 | decay_mult: 0 2678 | } 2679 | param { 2680 | lr_mult: 0 2681 | decay_mult: 0 2682 | } 2683 | } 2684 | layer { 2685 | name: "conv4_1_ex/scale" 2686 | type: "Scale" 2687 | bottom: "conv4_1_ex" 2688 | top: "conv4_1_ex" 2689 | param { 2690 | lr_mult: 1 2691 | decay_mult: 0 2692 | } 2693 | param { 2694 | lr_mult: 1 2695 | decay_mult: 0 2696 | } 2697 | scale_param { 2698 | bias_term: true 2699 | } 2700 | } 2701 | layer { 2702 | name: "relu4_1_ex" 2703 | type: "PReLU" 2704 | bottom: "conv4_1_ex" 2705 | top: "conv4_1_ex" 2706 | } 2707 | 2708 | 2709 | layer { 2710 | name: "conv4_1_dw" 2711 | type: "DepthwiseConvolution" 2712 | bottom: "conv4_1_ex" 2713 | top: "conv4_1_dw" 2714 | param { 2715 | lr_mult: 1 2716 | decay_mult: 1 2717 | } 2718 | convolution_param { 2719 | num_output: 256 2720 | group:256 2721 | kernel_size: 3 2722 | stride: 1 2723 | pad: 1 2724 | weight_filler { 2725 | type: "xavier" 2726 | } 2727 | bias_term:false 2728 | engine: CAFFE 2729 | } 2730 | } 2731 | 2732 | layer { 2733 | name: "conv4_1_dw/bn" 2734 | type: "BatchNorm" 2735 | bottom: "conv4_1_dw" 2736 | top: "conv4_1_dw" 2737 | param { 2738 | lr_mult: 0 2739 | decay_mult: 0 2740 | } 2741 | param { 2742 | lr_mult: 0 2743 | decay_mult: 0 2744 | } 2745 | param { 2746 | lr_mult: 0 2747 | decay_mult: 0 2748 | } 2749 | } 2750 | layer { 2751 | name: "conv4_1_dw/scale" 2752 | type: "Scale" 2753 | bottom: "conv4_1_dw" 2754 | top: "conv4_1_dw" 2755 | param { 2756 | lr_mult: 1 2757 | decay_mult: 0 2758 | } 2759 | param { 2760 | lr_mult: 1 2761 | decay_mult: 0 2762 | } 2763 | scale_param { 2764 | bias_term: true 2765 | } 2766 | } 2767 | layer { 2768 | name: "relu4_1_dw" 2769 | type: "PReLU" 2770 | bottom: "conv4_1_dw" 2771 | top: "conv4_1_dw" 2772 | } 2773 | 2774 | layer { 2775 | name: "conv4_1_em" 2776 | type: "Convolution" 2777 | bottom: "conv4_1_dw" 2778 | top: "conv4_1_em" 2779 | param { 2780 | lr_mult: 1 2781 | decay_mult: 1 2782 | } 2783 | convolution_param { 2784 | num_output: 128 2785 | kernel_size: 1 2786 | stride: 1 2787 | pad: 0 2788 | weight_filler { 2789 | type: "xavier" 2790 | } 2791 | bias_term:false 2792 | } 2793 | } 2794 | 2795 | 2796 | layer { 2797 | name: "conv4_1_em/bn" 2798 | type: "BatchNorm" 2799 | bottom: "conv4_1_em" 2800 | top: "conv4_1_em" 2801 | param { 2802 | lr_mult: 0 2803 | decay_mult: 0 2804 | } 2805 | param { 2806 | lr_mult: 0 2807 | decay_mult: 0 2808 | } 2809 | param { 2810 | lr_mult: 0 2811 | decay_mult: 0 2812 | } 2813 | } 2814 | layer { 2815 | name: "conv4_1_em/scale" 2816 | type: "Scale" 2817 | bottom: "conv4_1_em" 2818 | top: "conv4_1_em" 2819 | param { 2820 | lr_mult: 1 2821 | decay_mult: 0 2822 | } 2823 | param { 2824 | lr_mult: 1 2825 | decay_mult: 0 2826 | } 2827 | scale_param { 2828 | bias_term: true 2829 | } 2830 | } 2831 | 2832 | layer { 2833 | name: "res4_1" 2834 | type: "Eltwise" 2835 | bottom: "conv4_em" 2836 | bottom: "conv4_1_em" 2837 | top: "res4_1" 2838 | } 2839 | 2840 | 2841 | layer { 2842 | name: "conv4_2_ex" 2843 | type: "Convolution" 2844 | bottom: "res4_1" 2845 | top: "conv4_2_ex" 2846 | param { 2847 | lr_mult: 1 2848 | decay_mult: 1 2849 | } 2850 | convolution_param { 2851 | num_output: 256 2852 | kernel_size: 1 2853 | stride: 1 2854 | pad: 0 2855 | weight_filler { 2856 | type: "xavier" 2857 | } 2858 | bias_term:false 2859 | } 2860 | } 2861 | 2862 | layer { 2863 | name: "conv4_2_ex/bn" 2864 | type: "BatchNorm" 2865 | bottom: "conv4_2_ex" 2866 | top: "conv4_2_ex" 2867 | param { 2868 | lr_mult: 0 2869 | decay_mult: 0 2870 | } 2871 | param { 2872 | lr_mult: 0 2873 | decay_mult: 0 2874 | } 2875 | param { 2876 | lr_mult: 0 2877 | decay_mult: 0 2878 | } 2879 | } 2880 | layer { 2881 | name: "conv4_2_ex/scale" 2882 | type: "Scale" 2883 | bottom: "conv4_2_ex" 2884 | top: "conv4_2_ex" 2885 | param { 2886 | lr_mult: 1 2887 | decay_mult: 0 2888 | } 2889 | param { 2890 | lr_mult: 1 2891 | decay_mult: 0 2892 | } 2893 | scale_param { 2894 | bias_term: true 2895 | } 2896 | } 2897 | layer { 2898 | name: "relu4_2_ex" 2899 | type: "PReLU" 2900 | bottom: "conv4_2_ex" 2901 | top: "conv4_2_ex" 2902 | } 2903 | 2904 | 2905 | layer { 2906 | name: "conv4_2_dw" 2907 | type: "DepthwiseConvolution" 2908 | bottom: "conv4_2_ex" 2909 | top: "conv4_2_dw" 2910 | param { 2911 | lr_mult: 1 2912 | decay_mult: 1 2913 | } 2914 | convolution_param { 2915 | num_output: 256 2916 | group:256 2917 | kernel_size: 3 2918 | stride: 1 2919 | pad: 1 2920 | weight_filler { 2921 | type: "xavier" 2922 | } 2923 | bias_term:false 2924 | engine: CAFFE 2925 | } 2926 | } 2927 | 2928 | layer { 2929 | name: "conv4_2_dw/bn" 2930 | type: "BatchNorm" 2931 | bottom: "conv4_2_dw" 2932 | top: "conv4_2_dw" 2933 | param { 2934 | lr_mult: 0 2935 | decay_mult: 0 2936 | } 2937 | param { 2938 | lr_mult: 0 2939 | decay_mult: 0 2940 | } 2941 | param { 2942 | lr_mult: 0 2943 | decay_mult: 0 2944 | } 2945 | } 2946 | layer { 2947 | name: "conv4_2_dw/scale" 2948 | type: "Scale" 2949 | bottom: "conv4_2_dw" 2950 | top: "conv4_2_dw" 2951 | param { 2952 | lr_mult: 1 2953 | decay_mult: 0 2954 | } 2955 | param { 2956 | lr_mult: 1 2957 | decay_mult: 0 2958 | } 2959 | scale_param { 2960 | bias_term: true 2961 | } 2962 | } 2963 | layer { 2964 | name: "relu4_2_dw" 2965 | type: "PReLU" 2966 | bottom: "conv4_2_dw" 2967 | top: "conv4_2_dw" 2968 | } 2969 | 2970 | layer { 2971 | name: "conv4_2_em" 2972 | type: "Convolution" 2973 | bottom: "conv4_2_dw" 2974 | top: "conv4_2_em" 2975 | param { 2976 | lr_mult: 1 2977 | decay_mult: 1 2978 | } 2979 | convolution_param { 2980 | num_output: 128 2981 | kernel_size: 1 2982 | stride: 1 2983 | pad: 0 2984 | weight_filler { 2985 | type: "xavier" 2986 | } 2987 | bias_term:false 2988 | } 2989 | } 2990 | 2991 | 2992 | layer { 2993 | name: "conv4_2_em/bn" 2994 | type: "BatchNorm" 2995 | bottom: "conv4_2_em" 2996 | top: "conv4_2_em" 2997 | param { 2998 | lr_mult: 0 2999 | decay_mult: 0 3000 | } 3001 | param { 3002 | lr_mult: 0 3003 | decay_mult: 0 3004 | } 3005 | param { 3006 | lr_mult: 0 3007 | decay_mult: 0 3008 | } 3009 | } 3010 | layer { 3011 | name: "conv4_2_em/scale" 3012 | type: "Scale" 3013 | bottom: "conv4_2_em" 3014 | top: "conv4_2_em" 3015 | param { 3016 | lr_mult: 1 3017 | decay_mult: 0 3018 | } 3019 | param { 3020 | lr_mult: 1 3021 | decay_mult: 0 3022 | } 3023 | scale_param { 3024 | bias_term: true 3025 | } 3026 | } 3027 | 3028 | layer { 3029 | name: "res4_2" 3030 | type: "Eltwise" 3031 | bottom: "res4_1" 3032 | bottom: "conv4_2_em" 3033 | top: "res4_2" 3034 | } 3035 | 3036 | layer { 3037 | name: "conv5_ex" 3038 | type: "Convolution" 3039 | bottom: "res4_2" 3040 | top: "conv5_ex" 3041 | param { 3042 | lr_mult: 1 3043 | decay_mult: 1 3044 | } 3045 | convolution_param { 3046 | num_output: 512 3047 | kernel_size: 1 3048 | stride: 1 3049 | pad: 0 3050 | weight_filler { 3051 | type: "xavier" 3052 | } 3053 | bias_term:false 3054 | } 3055 | } 3056 | 3057 | 3058 | layer { 3059 | name: "conv5_ex/bn" 3060 | type: "BatchNorm" 3061 | bottom: "conv5_ex" 3062 | top: "conv5_ex" 3063 | param { 3064 | lr_mult: 0 3065 | decay_mult: 0 3066 | } 3067 | param { 3068 | lr_mult: 0 3069 | decay_mult: 0 3070 | } 3071 | param { 3072 | lr_mult: 0 3073 | decay_mult: 0 3074 | } 3075 | } 3076 | layer { 3077 | name: "conv5_ex/scale" 3078 | type: "Scale" 3079 | bottom: "conv5_ex" 3080 | top: "conv5_ex" 3081 | param { 3082 | lr_mult: 1 3083 | decay_mult: 0 3084 | } 3085 | param { 3086 | lr_mult: 1 3087 | decay_mult: 0 3088 | } 3089 | scale_param { 3090 | bias_term: true 3091 | } 3092 | } 3093 | layer { 3094 | name: "relu5_ex" 3095 | type: "PReLU" 3096 | bottom: "conv5_ex" 3097 | top: "conv5_ex" 3098 | } 3099 | 3100 | layer { 3101 | name: "conv5_dw" 3102 | type: "DepthwiseConvolution" 3103 | bottom: "conv5_ex" 3104 | top: "conv5_dw" 3105 | param { 3106 | lr_mult: 1 3107 | decay_mult: 1 3108 | } 3109 | convolution_param { 3110 | num_output: 512 3111 | group:512 3112 | kernel_h: 7 3113 | kernel_w:6 3114 | stride: 1 3115 | pad: 0 3116 | weight_filler { 3117 | type: "xavier" 3118 | } 3119 | bias_term:false 3120 | engine: CAFFE 3121 | } 3122 | } 3123 | 3124 | layer { 3125 | name: "conv5_dw/bn" 3126 | type: "BatchNorm" 3127 | bottom: "conv5_dw" 3128 | top: "conv5_dw" 3129 | param { 3130 | lr_mult: 0 3131 | decay_mult: 0 3132 | } 3133 | param { 3134 | lr_mult: 0 3135 | decay_mult: 0 3136 | } 3137 | param { 3138 | lr_mult: 0 3139 | decay_mult: 0 3140 | } 3141 | } 3142 | layer { 3143 | name: "conv5_dw/scale" 3144 | type: "Scale" 3145 | bottom: "conv5_dw" 3146 | top: "conv5_dw" 3147 | param { 3148 | lr_mult: 1 3149 | decay_mult: 0 3150 | } 3151 | param { 3152 | lr_mult: 1 3153 | decay_mult: 0 3154 | } 3155 | scale_param { 3156 | bias_term: true 3157 | } 3158 | } 3159 | 3160 | 3161 | layer { 3162 | name: "fc5" 3163 | type: "InnerProduct" 3164 | bottom: "conv5_dw" 3165 | top: "fc5" 3166 | param { 3167 | lr_mult: 1 3168 | decay_mult: 1 3169 | } 3170 | inner_product_param { 3171 | num_output: 128 3172 | weight_filler { 3173 | type: "xavier" 3174 | } 3175 | bias_term:false 3176 | } 3177 | } 3178 | 3179 | 3180 | 3181 | 3182 | 3183 | 3184 | 3185 | 3186 | 3187 | 3188 | 3189 | 3190 | 3191 | 3192 | 3193 | 3194 | 3195 | 3196 | 3197 | 3198 | 3199 | 3200 | 3201 | 3202 | 3203 | 3204 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MobileFaceNet 2 | 论文 : [MobileFaceNets: Efficient CNNs for Accurate Real-time Face Verification on Mobile Devices](https://arxiv.org/abs/1804.07573) 的AMsoftmaxLoss实现 3 | 4 | ## 环境需要 5 | 6 | - Amsoftmax的配置 7 | 8 | - DepthwiseConvolution层的添加 9 | 10 | ## 训练数据集 11 | 12 | VggFace2数据集,图像size:112X96 13 | 14 | ## LFW准确率 15 | 16 | ![](https://github.com/zhanglaplace/MobileFaceNet/blob/master/result.png) 17 | 18 | ## 参考: 19 | 20 | [mobilefacenet-caffe](https://github.com/KaleidoZhouYN/mobilefacenet-caffe) 21 | 22 | [AMSoftmax](https://github.com/happynear/AMSoftmax) 23 | 24 | [depthwise convolution](https://github.com/yonghenglh6/DepthwiseConvolution) 25 | 26 | [mobilenetv2-caffe](https://github.com/shicai/MobileNet-Caffe) 27 | 28 | [MobileFaceNet-caffe](https://github.com/imistyrain/MobileFaceNet) -------------------------------------------------------------------------------- /face_snapshot/MobileFaceNet.caffemodel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhanglaplace/MobileFaceNet/14ed6328989eecacceca8906e242148361ab5a2c/face_snapshot/MobileFaceNet.caffemodel -------------------------------------------------------------------------------- /face_solver.prototxt: -------------------------------------------------------------------------------- 1 | net: "MobileFaceNet.prototxt" 2 | #test_iter: 100 3 | #test_interval: 500 4 | #test_iter: 10 5 | #test_interval: 500000 6 | #test_initialization: false 7 | 8 | base_lr: 0.1 9 | lr_policy: "multistep" 10 | gamma: 0.1 11 | 12 | stepvalue: 80000 13 | stepvalue: 120000 14 | stepvalue: 140000 15 | max_iter: 160000 16 | iter_size: 1 17 | 18 | display: 100 19 | momentum: 0.9 20 | weight_decay: 0.0005 21 | snapshot: 5000 22 | snapshot_prefix: "face_snapshot/MobileFaceNet_16w_0pt3_model" 23 | 24 | solver_mode: GPU 25 | -------------------------------------------------------------------------------- /result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhanglaplace/MobileFaceNet/14ed6328989eecacceca8906e242148361ab5a2c/result.png -------------------------------------------------------------------------------- /start_train.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Usage: 3 | # ./start_train.sh 4 | # 5 | # Example: 6 | # ./start_train.sh 7 | mkdir -p face_snapshot 8 | mkdir -p result 9 | ../../../../build/tools/caffe train -solver face_solver.prototxt -gpu all 2>&1 | tee result/mobileFaceNet_20180507_0pt3.log 10 | --------------------------------------------------------------------------------