Page boundary detection in historical documents
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

846 lines
12KB

  1. input: "data"
  2. input_dim: 1
  3. # change to input_dim: 1 if not using color inputs
  4. input_dim: 3
  5. input_dim: 256
  6. input_dim: 256
  7. input: "gt"
  8. input_dim: 1
  9. input_dim: 1
  10. input_dim: 256
  11. input_dim: 256
  12. layer {
  13. name: "Convolution1"
  14. type: "Convolution"
  15. bottom: "data"
  16. top: "Convolution1"
  17. param {
  18. lr_mult: 1
  19. }
  20. param {
  21. lr_mult: 2
  22. }
  23. convolution_param {
  24. num_output: 32
  25. pad: 3
  26. kernel_size: 7
  27. stride: 1
  28. weight_filler {
  29. type: "msra"
  30. }
  31. }
  32. }
  33. layer {
  34. name: "conv_0_0"
  35. type: "ReLU"
  36. bottom: "Convolution1"
  37. top: "Convolution1"
  38. }
  39. layer {
  40. name: "Convolution2"
  41. type: "Convolution"
  42. bottom: "Convolution1"
  43. top: "Convolution2"
  44. param {
  45. lr_mult: 1
  46. }
  47. param {
  48. lr_mult: 2
  49. }
  50. convolution_param {
  51. num_output: 32
  52. pad: 3
  53. kernel_size: 7
  54. stride: 1
  55. weight_filler {
  56. type: "msra"
  57. }
  58. }
  59. }
  60. layer {
  61. name: "conv_0_1"
  62. type: "ReLU"
  63. bottom: "Convolution2"
  64. top: "Convolution2"
  65. }
  66. layer {
  67. name: "Convolution3"
  68. type: "Convolution"
  69. bottom: "Convolution2"
  70. top: "Convolution3"
  71. param {
  72. lr_mult: 1
  73. }
  74. param {
  75. lr_mult: 2
  76. }
  77. convolution_param {
  78. num_output: 32
  79. pad: 3
  80. kernel_size: 7
  81. stride: 1
  82. weight_filler {
  83. type: "msra"
  84. }
  85. }
  86. }
  87. layer {
  88. name: "conv_0_2"
  89. type: "ReLU"
  90. bottom: "Convolution3"
  91. top: "Convolution3"
  92. }
  93. layer {
  94. name: "Convolution4"
  95. type: "Convolution"
  96. bottom: "Convolution3"
  97. top: "Convolution4"
  98. param {
  99. lr_mult: 1
  100. }
  101. param {
  102. lr_mult: 2
  103. }
  104. convolution_param {
  105. num_output: 32
  106. pad: 3
  107. kernel_size: 7
  108. stride: 1
  109. weight_filler {
  110. type: "msra"
  111. }
  112. }
  113. }
  114. layer {
  115. name: "conv_0_3"
  116. type: "ReLU"
  117. bottom: "Convolution4"
  118. top: "Convolution4"
  119. }
  120. layer {
  121. name: "Convolution5"
  122. type: "Convolution"
  123. bottom: "Convolution4"
  124. top: "Convolution5"
  125. param {
  126. lr_mult: 1
  127. }
  128. param {
  129. lr_mult: 2
  130. }
  131. convolution_param {
  132. num_output: 32
  133. pad: 3
  134. kernel_size: 7
  135. stride: 1
  136. weight_filler {
  137. type: "msra"
  138. }
  139. }
  140. }
  141. layer {
  142. name: "conv_0_4"
  143. type: "ReLU"
  144. bottom: "Convolution5"
  145. top: "Convolution5"
  146. }
  147. layer {
  148. name: "Convolution6"
  149. type: "Convolution"
  150. bottom: "Convolution5"
  151. top: "Convolution6"
  152. param {
  153. lr_mult: 1
  154. }
  155. param {
  156. lr_mult: 2
  157. }
  158. convolution_param {
  159. num_output: 32
  160. pad: 3
  161. kernel_size: 7
  162. stride: 1
  163. weight_filler {
  164. type: "msra"
  165. }
  166. }
  167. }
  168. layer {
  169. name: "conv_0_5"
  170. type: "ReLU"
  171. bottom: "Convolution6"
  172. top: "Convolution6"
  173. }
  174. layer {
  175. name: "Convolution7"
  176. type: "Convolution"
  177. bottom: "Convolution6"
  178. top: "Convolution7"
  179. param {
  180. lr_mult: 1
  181. }
  182. param {
  183. lr_mult: 2
  184. }
  185. convolution_param {
  186. num_output: 32
  187. pad: 3
  188. kernel_size: 7
  189. stride: 1
  190. weight_filler {
  191. type: "msra"
  192. }
  193. }
  194. }
  195. layer {
  196. name: "conv_0_6"
  197. type: "ReLU"
  198. bottom: "Convolution7"
  199. top: "Convolution7"
  200. }
  201. layer {
  202. name: "Pooling1"
  203. type: "Pooling"
  204. bottom: "Convolution1"
  205. top: "Pooling1"
  206. pooling_param {
  207. pool: AVE
  208. kernel_size: 2
  209. stride: 2
  210. }
  211. }
  212. layer {
  213. name: "Convolution8"
  214. type: "Convolution"
  215. bottom: "Pooling1"
  216. top: "Convolution8"
  217. param {
  218. lr_mult: 1
  219. }
  220. param {
  221. lr_mult: 2
  222. }
  223. convolution_param {
  224. num_output: 32
  225. pad: 3
  226. kernel_size: 7
  227. stride: 1
  228. weight_filler {
  229. type: "msra"
  230. }
  231. }
  232. }
  233. layer {
  234. name: "conv_1_0"
  235. type: "ReLU"
  236. bottom: "Convolution8"
  237. top: "Convolution8"
  238. }
  239. layer {
  240. name: "Convolution9"
  241. type: "Convolution"
  242. bottom: "Convolution8"
  243. top: "Convolution9"
  244. param {
  245. lr_mult: 1
  246. }
  247. param {
  248. lr_mult: 2
  249. }
  250. convolution_param {
  251. num_output: 32
  252. pad: 3
  253. kernel_size: 7
  254. stride: 1
  255. weight_filler {
  256. type: "msra"
  257. }
  258. }
  259. }
  260. layer {
  261. name: "conv_1_1"
  262. type: "ReLU"
  263. bottom: "Convolution9"
  264. top: "Convolution9"
  265. }
  266. layer {
  267. name: "Convolution10"
  268. type: "Convolution"
  269. bottom: "Convolution9"
  270. top: "Convolution10"
  271. param {
  272. lr_mult: 1
  273. }
  274. param {
  275. lr_mult: 2
  276. }
  277. convolution_param {
  278. num_output: 32
  279. pad: 3
  280. kernel_size: 7
  281. stride: 1
  282. weight_filler {
  283. type: "msra"
  284. }
  285. }
  286. }
  287. layer {
  288. name: "conv_1_2"
  289. type: "ReLU"
  290. bottom: "Convolution10"
  291. top: "Convolution10"
  292. }
  293. layer {
  294. name: "Convolution11"
  295. type: "Convolution"
  296. bottom: "Convolution10"
  297. top: "Convolution11"
  298. param {
  299. lr_mult: 1
  300. }
  301. param {
  302. lr_mult: 2
  303. }
  304. convolution_param {
  305. num_output: 32
  306. pad: 3
  307. kernel_size: 7
  308. stride: 1
  309. weight_filler {
  310. type: "msra"
  311. }
  312. }
  313. }
  314. layer {
  315. name: "conv_1_3"
  316. type: "ReLU"
  317. bottom: "Convolution11"
  318. top: "Convolution11"
  319. }
  320. layer {
  321. name: "Convolution12"
  322. type: "Convolution"
  323. bottom: "Convolution11"
  324. top: "Convolution12"
  325. param {
  326. lr_mult: 1
  327. }
  328. param {
  329. lr_mult: 2
  330. }
  331. convolution_param {
  332. num_output: 32
  333. pad: 3
  334. kernel_size: 7
  335. stride: 1
  336. weight_filler {
  337. type: "msra"
  338. }
  339. }
  340. }
  341. layer {
  342. name: "conv_1_4"
  343. type: "ReLU"
  344. bottom: "Convolution12"
  345. top: "Convolution12"
  346. }
  347. layer {
  348. name: "Convolution13"
  349. type: "Convolution"
  350. bottom: "Convolution12"
  351. top: "Convolution13"
  352. param {
  353. lr_mult: 1
  354. }
  355. param {
  356. lr_mult: 2
  357. }
  358. convolution_param {
  359. num_output: 32
  360. pad: 3
  361. kernel_size: 7
  362. stride: 1
  363. weight_filler {
  364. type: "msra"
  365. }
  366. }
  367. }
  368. layer {
  369. name: "conv_1_5"
  370. type: "ReLU"
  371. bottom: "Convolution13"
  372. top: "Convolution13"
  373. }
  374. layer {
  375. name: "Pooling2"
  376. type: "Pooling"
  377. bottom: "Convolution8"
  378. top: "Pooling2"
  379. pooling_param {
  380. pool: AVE
  381. kernel_size: 2
  382. stride: 2
  383. }
  384. }
  385. layer {
  386. name: "Convolution14"
  387. type: "Convolution"
  388. bottom: "Pooling2"
  389. top: "Convolution14"
  390. param {
  391. lr_mult: 1
  392. }
  393. param {
  394. lr_mult: 2
  395. }
  396. convolution_param {
  397. num_output: 32
  398. pad: 2
  399. kernel_size: 5
  400. stride: 1
  401. weight_filler {
  402. type: "msra"
  403. }
  404. }
  405. }
  406. layer {
  407. name: "conv_2_0"
  408. type: "ReLU"
  409. bottom: "Convolution14"
  410. top: "Convolution14"
  411. }
  412. layer {
  413. name: "Convolution15"
  414. type: "Convolution"
  415. bottom: "Convolution14"
  416. top: "Convolution15"
  417. param {
  418. lr_mult: 1
  419. }
  420. param {
  421. lr_mult: 2
  422. }
  423. convolution_param {
  424. num_output: 32
  425. pad: 2
  426. kernel_size: 5
  427. stride: 1
  428. weight_filler {
  429. type: "msra"
  430. }
  431. }
  432. }
  433. layer {
  434. name: "conv_2_1"
  435. type: "ReLU"
  436. bottom: "Convolution15"
  437. top: "Convolution15"
  438. }
  439. layer {
  440. name: "Convolution16"
  441. type: "Convolution"
  442. bottom: "Convolution15"
  443. top: "Convolution16"
  444. param {
  445. lr_mult: 1
  446. }
  447. param {
  448. lr_mult: 2
  449. }
  450. convolution_param {
  451. num_output: 32
  452. pad: 2
  453. kernel_size: 5
  454. stride: 1
  455. weight_filler {
  456. type: "msra"
  457. }
  458. }
  459. }
  460. layer {
  461. name: "conv_2_2"
  462. type: "ReLU"
  463. bottom: "Convolution16"
  464. top: "Convolution16"
  465. }
  466. layer {
  467. name: "Convolution17"
  468. type: "Convolution"
  469. bottom: "Convolution16"
  470. top: "Convolution17"
  471. param {
  472. lr_mult: 1
  473. }
  474. param {
  475. lr_mult: 2
  476. }
  477. convolution_param {
  478. num_output: 32
  479. pad: 2
  480. kernel_size: 5
  481. stride: 1
  482. weight_filler {
  483. type: "msra"
  484. }
  485. }
  486. }
  487. layer {
  488. name: "conv_2_3"
  489. type: "ReLU"
  490. bottom: "Convolution17"
  491. top: "Convolution17"
  492. }
  493. layer {
  494. name: "Convolution18"
  495. type: "Convolution"
  496. bottom: "Convolution17"
  497. top: "Convolution18"
  498. param {
  499. lr_mult: 1
  500. }
  501. param {
  502. lr_mult: 2
  503. }
  504. convolution_param {
  505. num_output: 32
  506. pad: 2
  507. kernel_size: 5
  508. stride: 1
  509. weight_filler {
  510. type: "msra"
  511. }
  512. }
  513. }
  514. layer {
  515. name: "conv_2_4"
  516. type: "ReLU"
  517. bottom: "Convolution18"
  518. top: "Convolution18"
  519. }
  520. layer {
  521. name: "Pooling3"
  522. type: "Pooling"
  523. bottom: "Convolution14"
  524. top: "Pooling3"
  525. pooling_param {
  526. pool: AVE
  527. kernel_size: 2
  528. stride: 2
  529. }
  530. }
  531. layer {
  532. name: "Convolution19"
  533. type: "Convolution"
  534. bottom: "Pooling3"
  535. top: "Convolution19"
  536. param {
  537. lr_mult: 1
  538. }
  539. param {
  540. lr_mult: 2
  541. }
  542. convolution_param {
  543. num_output: 32
  544. pad: 2
  545. kernel_size: 5
  546. stride: 1
  547. weight_filler {
  548. type: "msra"
  549. }
  550. }
  551. }
  552. layer {
  553. name: "conv_3_0"
  554. type: "ReLU"
  555. bottom: "Convolution19"
  556. top: "Convolution19"
  557. }
  558. layer {
  559. name: "Convolution20"
  560. type: "Convolution"
  561. bottom: "Convolution19"
  562. top: "Convolution20"
  563. param {
  564. lr_mult: 1
  565. }
  566. param {
  567. lr_mult: 2
  568. }
  569. convolution_param {
  570. num_output: 32
  571. pad: 2
  572. kernel_size: 5
  573. stride: 1
  574. weight_filler {
  575. type: "msra"
  576. }
  577. }
  578. }
  579. layer {
  580. name: "conv_3_1"
  581. type: "ReLU"
  582. bottom: "Convolution20"
  583. top: "Convolution20"
  584. }
  585. layer {
  586. name: "Convolution21"
  587. type: "Convolution"
  588. bottom: "Convolution20"
  589. top: "Convolution21"
  590. param {
  591. lr_mult: 1
  592. }
  593. param {
  594. lr_mult: 2
  595. }
  596. convolution_param {
  597. num_output: 32
  598. pad: 2
  599. kernel_size: 5
  600. stride: 1
  601. weight_filler {
  602. type: "msra"
  603. }
  604. }
  605. }
  606. layer {
  607. name: "conv_3_2"
  608. type: "ReLU"
  609. bottom: "Convolution21"
  610. top: "Convolution21"
  611. }
  612. layer {
  613. name: "Convolution22"
  614. type: "Convolution"
  615. bottom: "Convolution21"
  616. top: "Convolution22"
  617. param {
  618. lr_mult: 1
  619. }
  620. param {
  621. lr_mult: 2
  622. }
  623. convolution_param {
  624. num_output: 32
  625. pad: 2
  626. kernel_size: 5
  627. stride: 1
  628. weight_filler {
  629. type: "msra"
  630. }
  631. }
  632. }
  633. layer {
  634. name: "conv_3_3"
  635. type: "ReLU"
  636. bottom: "Convolution22"
  637. top: "Convolution22"
  638. }
  639. layer {
  640. name: "upsample_1"
  641. type: "Deconvolution"
  642. bottom: "Convolution13"
  643. top: "upsample_1"
  644. param {
  645. lr_mult: 0
  646. decay_mult: 0
  647. }
  648. convolution_param {
  649. kernel_size: 4
  650. num_output: 32
  651. group: 32
  652. stride: 2
  653. pad: 1
  654. weight_filler: { type: 'bilinear' }
  655. bias_term: false
  656. }
  657. }
  658. layer {
  659. name: "upsample_2"
  660. type: "Deconvolution"
  661. bottom: "Convolution18"
  662. top: "upsample_2"
  663. param {
  664. lr_mult: 0
  665. decay_mult: 0
  666. }
  667. convolution_param {
  668. kernel_size: 8
  669. num_output: 32
  670. group: 32
  671. stride: 4
  672. pad: 2
  673. weight_filler: { type: 'bilinear' }
  674. bias_term: false
  675. }
  676. }
  677. layer {
  678. name: "upsample_3"
  679. type: "Deconvolution"
  680. bottom: "Convolution22"
  681. top: "upsample_3"
  682. param {
  683. lr_mult: 0
  684. decay_mult: 0
  685. }
  686. convolution_param {
  687. kernel_size: 16
  688. num_output: 32
  689. group: 32
  690. stride: 8
  691. pad: 4
  692. weight_filler: { type: 'bilinear' }
  693. bias_term: false
  694. }
  695. }
  696. layer {
  697. name: "merged"
  698. type: "Concat"
  699. bottom: "Convolution7"
  700. bottom: "upsample_1"
  701. bottom: "upsample_2"
  702. bottom: "upsample_3"
  703. top: "merged"
  704. }
  705. layer {
  706. name: "Convolution26"
  707. type: "Convolution"
  708. bottom: "merged"
  709. top: "Convolution26"
  710. param {
  711. lr_mult: 1
  712. }
  713. param {
  714. lr_mult: 2
  715. }
  716. convolution_param {
  717. num_output: 32
  718. pad: 3
  719. kernel_size: 7
  720. stride: 1
  721. weight_filler {
  722. type: "msra"
  723. }
  724. }
  725. }
  726. layer {
  727. name: "merged_conv"
  728. type: "ReLU"
  729. bottom: "Convolution26"
  730. top: "Convolution26"
  731. }
  732. layer {
  733. name: "Convolution27"
  734. type: "Convolution"
  735. bottom: "Convolution26"
  736. top: "Convolution27"
  737. param {
  738. lr_mult: 1
  739. }
  740. param {
  741. lr_mult: 2
  742. }
  743. convolution_param {
  744. num_output: 32
  745. pad: 2
  746. kernel_size: 5
  747. stride: 1
  748. weight_filler {
  749. type: "msra"
  750. }
  751. }
  752. }
  753. layer {
  754. name: "ReLU1"
  755. type: "ReLU"
  756. bottom: "Convolution27"
  757. top: "Convolution27"
  758. }
  759. layer {
  760. name: "Convolution28"
  761. type: "Convolution"
  762. bottom: "Convolution27"
  763. top: "Convolution28"
  764. param {
  765. lr_mult: 1
  766. }
  767. param {
  768. lr_mult: 2
  769. }
  770. convolution_param {
  771. num_output: 32
  772. pad: 2
  773. kernel_size: 5
  774. stride: 1
  775. weight_filler {
  776. type: "msra"
  777. }
  778. }
  779. }
  780. layer {
  781. name: "rep_layer_0"
  782. type: "ReLU"
  783. bottom: "Convolution28"
  784. top: "Convolution28"
  785. }
  786. layer {
  787. name: "Convolution29"
  788. type: "Convolution"
  789. bottom: "Convolution28"
  790. top: "Convolution29"
  791. param {
  792. lr_mult: 1
  793. }
  794. param {
  795. lr_mult: 2
  796. }
  797. convolution_param {
  798. num_output: 32
  799. pad: 2
  800. kernel_size: 5
  801. stride: 1
  802. weight_filler {
  803. type: "msra"
  804. }
  805. }
  806. }
  807. layer {
  808. name: "ReLU2"
  809. type: "ReLU"
  810. bottom: "Convolution29"
  811. top: "Convolution29"
  812. }
  813. layer {
  814. name: "Convolution30"
  815. type: "Convolution"
  816. bottom: "Convolution29"
  817. top: "out"
  818. param {
  819. lr_mult: 1
  820. }
  821. param {
  822. lr_mult: 2
  823. }
  824. convolution_param {
  825. num_output: 2
  826. pad: 0
  827. kernel_size: 1
  828. stride: 1
  829. weight_filler {
  830. type: "msra"
  831. }
  832. }
  833. }
  834. layer {
  835. name: "baselines_7_loss_0"
  836. type: "SoftmaxWithLoss"
  837. bottom: "out"
  838. bottom: "gt"
  839. top: "loss"
  840. loss_weight: 1.0
  841. }