├── 3rdparty └── readme.txt ├── icon ├── dir.png ├── auto.png ├── last.png ├── logo.png ├── pause.png ├── play.png ├── right.png ├── save.png ├── stop.png ├── camera.png ├── folder.png ├── replay.png └── setting.png ├── media ├── data.png ├── demo.gif ├── test.jpg ├── model_folder.png ├── save_folder.png ├── save_window.png └── train_data_format.png ├── openpose ├── openpose.dll ├── pyopenpose.exp ├── pyopenpose.lib └── pyopenpose.cp36-win_amd64.pyd ├── custom ├── styleSheet.qss ├── dock_media.py ├── label_frame.py ├── camera.py ├── openpose_model.py ├── gesture_model.py ├── dock_filetree.py ├── dock_setting.py └── save_widget.py ├── models ├── gesture │ └── model@acc0.992.pth ├── getModels.sh ├── getModels.bat ├── face │ └── pose_deploy.prototxt ├── hand │ └── pose_deploy.prototxt └── pose │ └── mpi │ └── pose_deploy_linevec_faster_4_stages.prototxt ├── ui ├── dock_media.ui ├── save_widget.ui ├── main_window.ui ├── dock_filetree.ui └── dock_setting.ui ├── dataset ├── hand_dataset.py └── train.py ├── README.md └── main.py /3rdparty/readme.txt: -------------------------------------------------------------------------------- 1 | download 3rdparty.zip and unzip in this folder -------------------------------------------------------------------------------- /icon/dir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/icon/dir.png -------------------------------------------------------------------------------- /icon/auto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/icon/auto.png -------------------------------------------------------------------------------- /icon/last.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/icon/last.png -------------------------------------------------------------------------------- /icon/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/icon/logo.png -------------------------------------------------------------------------------- /icon/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/icon/pause.png -------------------------------------------------------------------------------- /icon/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/icon/play.png -------------------------------------------------------------------------------- /icon/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/icon/right.png -------------------------------------------------------------------------------- /icon/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/icon/save.png -------------------------------------------------------------------------------- /icon/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/icon/stop.png -------------------------------------------------------------------------------- /media/data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/media/data.png -------------------------------------------------------------------------------- /media/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/media/demo.gif -------------------------------------------------------------------------------- /media/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/media/test.jpg -------------------------------------------------------------------------------- /icon/camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/icon/camera.png -------------------------------------------------------------------------------- /icon/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/icon/folder.png -------------------------------------------------------------------------------- /icon/replay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/icon/replay.png -------------------------------------------------------------------------------- /icon/setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/icon/setting.png -------------------------------------------------------------------------------- /media/model_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/media/model_folder.png -------------------------------------------------------------------------------- /media/save_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/media/save_folder.png -------------------------------------------------------------------------------- /media/save_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/media/save_window.png -------------------------------------------------------------------------------- /openpose/openpose.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/openpose/openpose.dll -------------------------------------------------------------------------------- /openpose/pyopenpose.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/openpose/pyopenpose.exp -------------------------------------------------------------------------------- /openpose/pyopenpose.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/openpose/pyopenpose.lib -------------------------------------------------------------------------------- /media/train_data_format.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/media/train_data_format.png -------------------------------------------------------------------------------- /custom/styleSheet.qss: -------------------------------------------------------------------------------- 1 | /* 设置标签样式 */ 2 | LabelFrame{ 3 | background-color: #000000; 4 | } 5 | 6 | 7 | SettingDock{ 8 | background-color: #3c3f41 9 | } 10 | 11 | -------------------------------------------------------------------------------- /models/gesture/model@acc0.992.pth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/models/gesture/model@acc0.992.pth -------------------------------------------------------------------------------- /openpose/pyopenpose.cp36-win_amd64.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JiageWang/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/HEAD/openpose/pyopenpose.cp36-win_amd64.pyd -------------------------------------------------------------------------------- /models/getModels.sh: -------------------------------------------------------------------------------- 1 | # ------------------------- BODY, FOOT, FACE, AND HAND MODELS ------------------------- 2 | # Downloading body pose (COCO and MPI), face and hand models 3 | OPENPOSE_URL="http://posefs1.perception.cs.cmu.edu/OpenPose/models/" 4 | POSE_FOLDER="pose/" 5 | FACE_FOLDER="face/" 6 | HAND_FOLDER="hand/" 7 | 8 | # ------------------------- POSE (BODY+FOOT) MODELS ------------------------- 9 | # Body (BODY_25) 10 | BODY_25_FOLDER=${POSE_FOLDER}"body_25/" 11 | BODY_25_MODEL=${BODY_25_FOLDER}"pose_iter_584000.caffemodel" 12 | wget -c ${OPENPOSE_URL}${BODY_25_MODEL} -P ${BODY_25_FOLDER} 13 | 14 | # Body (COCO) 15 | COCO_FOLDER=${POSE_FOLDER}"coco/" 16 | COCO_MODEL=${COCO_FOLDER}"pose_iter_440000.caffemodel" 17 | wget -c ${OPENPOSE_URL}${COCO_MODEL} -P ${COCO_FOLDER} 18 | # Alternative: it will not check whether file was fully downloaded 19 | # if [ ! -f $COCO_MODEL ]; then 20 | # wget ${OPENPOSE_URL}$COCO_MODEL -P $COCO_FOLDER 21 | # fi 22 | 23 | # Body (MPI) 24 | MPI_FOLDER=${POSE_FOLDER}"mpi/" 25 | MPI_MODEL=${MPI_FOLDER}"pose_iter_160000.caffemodel" 26 | wget -c ${OPENPOSE_URL}${MPI_MODEL} -P ${MPI_FOLDER} 27 | 28 | # "------------------------- FACE MODELS -------------------------" 29 | # Face 30 | FACE_MODEL=${FACE_FOLDER}"pose_iter_116000.caffemodel" 31 | wget -c ${OPENPOSE_URL}${FACE_MODEL} -P ${FACE_FOLDER} 32 | 33 | # "------------------------- HAND MODELS -------------------------" 34 | # Hand 35 | HAND_MODEL=$HAND_FOLDER"pose_iter_102000.caffemodel" 36 | wget -c ${OPENPOSE_URL}${HAND_MODEL} -P ${HAND_FOLDER} 37 | -------------------------------------------------------------------------------- /custom/dock_media.py: -------------------------------------------------------------------------------- 1 | from PyQt5.QtCore import Qt 2 | from PyQt5.QtWidgets import QDockWidget, QLabel 3 | from PyQt5.uic import loadUi 4 | 5 | 6 | class MediaDock(QDockWidget): 7 | def __init__(self, parent=None): 8 | super().__init__(parent=parent) 9 | loadUi("ui/dock_media.ui", self) 10 | self.dock_label = QLabel("Media control") 11 | self.dock_label.setMinimumHeight(25) 12 | self.dock_label.setAlignment(Qt.AlignCenter | Qt.AlignHCenter) 13 | self.setTitleBarWidget(self.dock_label) 14 | 15 | self.play_button.toggled.connect(self.play_media) 16 | self.replay_button.clicked.connect(self.replay_media) 17 | 18 | self.hide() 19 | 20 | def play_media(self): 21 | if self.is_play: 22 | self.parent().camera.begin() 23 | else: 24 | self.parent().camera.pause() 25 | 26 | def replay_media(self): 27 | self.parent().camera.restart() 28 | self.parent().update_frame() 29 | if not self.is_play: 30 | self.parent().camera.pause() 31 | 32 | def update_slider(self, pos, frames): 33 | self.process_slider.setMaximum(frames) 34 | self.process_slider.setValue(pos) 35 | 36 | def reset(self): 37 | self.play_button.setChecked(False) 38 | self.process_slider.setValue(0) 39 | 40 | @property 41 | def frame_pos(self): 42 | return self.process_slider.value() 43 | 44 | @property 45 | def is_play(self): 46 | return self.play_button.isChecked() 47 | -------------------------------------------------------------------------------- /custom/label_frame.py: -------------------------------------------------------------------------------- 1 | from PyQt5.QtCore import Qt 2 | from PyQt5.QtGui import QImage, QPixmap 3 | from PyQt5.QtWidgets import QLabel 4 | import cv2 5 | 6 | 7 | class LabelFrame(QLabel): 8 | def __init__(self, parent=None): 9 | super(LabelFrame, self).__init__(parent=parent) 10 | self.main_window = parent 11 | self.setAlignment(Qt.AlignCenter) # 居中显示 12 | self.setMinimumSize(640, 480) 13 | self.setStyleSheet("background-color: rgb(0, 0, 0);") # 黑底 14 | 15 | def update_frame(self, frame): 16 | pixmap = self.img_to_pixmap(frame) 17 | self.setPixmap(pixmap) 18 | self.resize_pix_map() 19 | 20 | def resize_pix_map(self): 21 | """保证图像等比例缩放""" 22 | pixmap = self.pixmap() 23 | if not pixmap: 24 | return 25 | if self.height() > self.width(): 26 | width = self.width() 27 | height = int(pixmap.height() * (width / pixmap.width())) 28 | else: 29 | height = self.height() 30 | width = int(pixmap.width() * (height / pixmap.height())) 31 | pixmap = pixmap.scaled(width, height, Qt.KeepAspectRatio, Qt.SmoothTransformation) 32 | self.setPixmap(pixmap) 33 | 34 | def resizeEvent(self, *args, **kwargs): 35 | self.resize_pix_map() 36 | 37 | @staticmethod 38 | def img_to_pixmap(frame): 39 | """nparray -> QPixmap""" 40 | frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) # bgr -> rgb 41 | h, w, c = frame.shape # 获取图片形状 42 | image = QImage(frame, w, h, 3 * w, QImage.Format_RGB888) 43 | pixmap = QPixmap.fromImage(image) 44 | return pixmap 45 | -------------------------------------------------------------------------------- /custom/camera.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | from PyQt5.QtCore import QTimer 3 | 4 | 5 | class Camera(object): 6 | def __init__(self): 7 | self.device = 0 8 | self.cap = cv2.VideoCapture() 9 | self.timer = QTimer() 10 | 11 | def stop(self): 12 | self.timer.stop() 13 | self.cap.release() 14 | return True 15 | 16 | def pause(self): 17 | self.timer.stop() 18 | 19 | def begin(self): 20 | self.timer.start(20) 21 | 22 | def start(self, device): 23 | if self.cap.isOpened(): 24 | self.cap.release() 25 | self.timer.start(20) 26 | self.cap.open(device) 27 | self.device = device 28 | return True 29 | 30 | def restart(self): 31 | self.start(self.device) 32 | 33 | @property 34 | def is_pause(self): 35 | return self.cap.isOpened() and not self.timer.isActive() 36 | 37 | @property 38 | def is_open(self): 39 | return self.cap.isOpened() 40 | 41 | @property 42 | def frame(self): 43 | if self.is_open and not self.is_pause: 44 | return self.cap.read()[1] 45 | 46 | @property 47 | def frame_count(self): 48 | if self.is_open: 49 | return self.cap.get(cv2.CAP_PROP_FRAME_COUNT) 50 | 51 | @property 52 | def frame_pos(self): 53 | if self.is_open: 54 | return self.cap.get(cv2.CAP_PROP_POS_FRAMES) 55 | 56 | @frame_pos.setter 57 | def frame_pos(self, value): 58 | if self.is_open: 59 | self.cap.set(cv2.CAP_PROP_POS_FRAMES, value) 60 | 61 | @property 62 | def resolution(self): 63 | if self.is_open: 64 | return self.cap.get(cv2.CAP_PROP_FRAME_WIDTH), self.cap.get(cv2.CAP_PROP_FRAME_HEIGHT) 65 | -------------------------------------------------------------------------------- /models/getModels.bat: -------------------------------------------------------------------------------- 1 | :: Avoid printing all the comments in the Windows cmd 2 | @echo off 3 | 4 | echo ------------------------- BODY, FOOT, FACE, AND HAND MODELS ------------------------- 5 | echo ----- Downloading body pose (COCO and MPI), face and hand models ----- 6 | SET WGET_EXE=..\3rdparty\windows\wget\wget.exe 7 | SET OPENPOSE_URL=http://posefs1.perception.cs.cmu.edu/OpenPose/models/ 8 | SET POSE_FOLDER=pose/ 9 | SET FACE_FOLDER=face/ 10 | SET HAND_FOLDER=hand/ 11 | 12 | echo: 13 | echo ------------------------- POSE (BODY+FOOT) MODELS ------------------------- 14 | echo Body (BODY_25) 15 | set BODY_25_FOLDER=%POSE_FOLDER%body_25/ 16 | set BODY_25_MODEL=%BODY_25_FOLDER%pose_iter_584000.caffemodel 17 | %WGET_EXE% -c %OPENPOSE_URL%%BODY_25_MODEL% -P %BODY_25_FOLDER% 18 | 19 | echo Body (COCO) 20 | SET COCO_FOLDER=%POSE_FOLDER%coco/ 21 | SET COCO_MODEL=%COCO_FOLDER%pose_iter_440000.caffemodel 22 | %WGET_EXE% -c %OPENPOSE_URL%%COCO_MODEL% -P %COCO_FOLDER% 23 | 24 | echo: 25 | echo Body (MPI) 26 | SET MPI_FOLDER=%POSE_FOLDER%mpi/ 27 | SET MPI_MODEL=%MPI_FOLDER%pose_iter_160000.caffemodel 28 | %WGET_EXE% -c %OPENPOSE_URL%%MPI_MODEL% -P %MPI_FOLDER% 29 | echo ----------------------- POSE DOWNLOADED ----------------------- 30 | 31 | echo: 32 | echo ------------------------- FACE MODELS ------------------------- 33 | echo Face 34 | SET FACE_MODEL=%FACE_FOLDER%pose_iter_116000.caffemodel 35 | %WGET_EXE% -c %OPENPOSE_URL%%FACE_MODEL% -P %FACE_FOLDER% 36 | echo ----------------------- FACE DOWNLOADED ----------------------- 37 | 38 | echo: 39 | echo ------------------------- HAND MODELS ------------------------- 40 | echo Hand 41 | SET HAND_MODEL=%HAND_FOLDER%pose_iter_102000.caffemodel 42 | %WGET_EXE% -c %OPENPOSE_URL%%HAND_MODEL% -P %HAND_FOLDER% 43 | echo ----------------------- HAND DOWNLOADED ----------------------- 44 | -------------------------------------------------------------------------------- /ui/dock_media.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | DockWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 67 11 | 12 | 13 | 14 | 15 | 等线 16 | 12 17 | 75 18 | true 19 | 20 | 21 | 22 | Qt::BottomDockWidgetArea|Qt::TopDockWidgetArea 23 | 24 | 25 | DockWidget 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ../icon/play.png 37 | ../icon/pause.png../icon/play.png 38 | 39 | 40 | true 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | ../icon/replay.png../icon/replay.png 52 | 53 | 54 | false 55 | 56 | 57 | 58 | 59 | 60 | 61 | 0 62 | 63 | 64 | 0 65 | 66 | 67 | Qt::Horizontal 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /custom/openpose_model.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | 4 | dir_path = os.path.dirname(os.path.dirname(__file__)) 5 | try: 6 | sys.path.append(dir_path + '/openpose') 7 | os.environ['PATH'] = os.environ['PATH'] + ';' + dir_path + '/openpose;' + dir_path + '/3rdparty;' 8 | import pyopenpose as op 9 | except ImportError as e: 10 | print('Error: OpenPose library could not be found. \ 11 | Did you enable `BUILD_PYTHON` in CMake and \ 12 | have this Python script in the right folder?') 13 | raise e 14 | 15 | 16 | class OpenposeModel(object): 17 | def __init__(self, hand=False, face=False): 18 | self.op_params = { 19 | "model_folder": "models/", 20 | "body": 1, 21 | "render_pose": 1, 22 | "render_threshold": 0.1, 23 | "hand": hand, 24 | "hand_render": 1, 25 | "hand_render_threshold": 0.2, 26 | "face": face, 27 | "face_render": 1, 28 | "face_render_threshold": 0.4, 29 | "disable_blending": False # black blackgroud if True 30 | } 31 | 32 | self.datum = op.Datum() 33 | self.op_wrapper = op.WrapperPython() 34 | self.op_wrapper.configure(self.op_params) 35 | self.op_wrapper.start() 36 | 37 | def update_wrapper(self, key, value): 38 | self.op_params[key] = value 39 | self.op_wrapper.configure(self.op_params) 40 | self.op_wrapper.start() 41 | 42 | def get_keypoints(self): 43 | body_keypoints = self.datum.poseKeypoints 44 | hand_keypoints = self.datum.handKeypoints 45 | face_keypoints = self.datum.faceKeypoints 46 | return body_keypoints, hand_keypoints, face_keypoints 47 | 48 | def get_original_image(self): 49 | return self.datum.cvInputData 50 | 51 | def get_rendered_image(self): 52 | return self.datum.cvOutputData 53 | 54 | def __call__(self, img): 55 | self.datum.cvInputData = img 56 | self.op_wrapper.emplaceAndPop([self.datum]) 57 | result = self.datum.cvOutputData 58 | body = self.datum.poseKeypoints 59 | hand = self.datum.handKeypoints 60 | face = self.datum.faceKeypoints 61 | return result, (body, hand, face) 62 | -------------------------------------------------------------------------------- /ui/save_widget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Snipaste 4 | 5 | 6 | 7 | 0 8 | 0 9 | 658 10 | 533 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | 21 | 0 22 | 0 23 | 24 | 25 | 26 | 27 | 640 28 | 480 29 | 30 | 31 | 32 | 33 | 640 34 | 480 35 | 36 | 37 | 38 | background-color: rgb(0, 0, 0); 39 | 40 | 41 | TextLabel 42 | 43 | 44 | true 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 等线 55 | 12 56 | 75 57 | true 58 | 59 | 60 | 61 | Save 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 等线 70 | 12 71 | 75 72 | true 73 | 74 | 75 | 76 | Cancel 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /ui/main_window.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | OpenposeGUI 4 | 5 | 6 | 7 | 0 8 | 0 9 | 658 10 | 532 11 | 12 | 13 | 14 | OpenposeGUi 15 | 16 | 17 | 18 | 19 | 20 | toolBar 21 | 22 | 23 | false 24 | 25 | 26 | TopToolBarArea 27 | 28 | 29 | false 30 | 31 | 32 | 33 | 34 | true 35 | 36 | 37 | 38 | ../icon/camera.png 39 | ../icon/stop.png../icon/camera.png 40 | 41 | 42 | 打开相机 43 | 44 | 45 | 46 | 47 | 48 | ../icon/save.png../icon/save.png 49 | 50 | 51 | 保存 52 | 53 | 54 | Ctrl+S 55 | 56 | 57 | 58 | 59 | true 60 | 61 | 62 | 63 | ../icon/auto.png../icon/auto.png 64 | 65 | 66 | 自动保存 67 | 68 | 69 | 70 | 71 | true 72 | 73 | 74 | 75 | ../icon/setting.png../icon/setting.png 76 | 77 | 78 | 设置 79 | 80 | 81 | 82 | 83 | true 84 | 85 | 86 | 87 | ../icon/dir.png../icon/dir.png 88 | 89 | 90 | 目录 91 | 92 | 93 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /custom/gesture_model.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | 4 | import torch 5 | import torch.nn as nn 6 | import torch.nn.functional as F 7 | from torchvision.transforms import ToTensor 8 | 9 | 10 | class Model(nn.Module): 11 | """ 12 | 定义了一个简单的三层全连接神经网络,每一层都是线性的 13 | """ 14 | 15 | def __init__(self, in_dim, n_hidden1, out_dim): 16 | super().__init__() 17 | self.layer1 = nn.Linear(in_dim, n_hidden1) 18 | self.layer2 = nn.Linear(n_hidden1, out_dim) 19 | 20 | def forward(self, x): 21 | x = F.relu(self.layer1(x)) 22 | x = self.layer2(x) 23 | return x 24 | 25 | 26 | class GestureModel(object): 27 | def __init__(self, path): 28 | self.gesture_model = self.get_gesture_model(path) 29 | self.idx_to_gesture = {0: 'eight', 1: 'five', 2: 'handssors', 3: 'normal', 4: 'ten'} 30 | # self.idx_to_gesture = {0: 'zero', 1: 'one', 2: 'two', 3: 'three', 4: 'four', 5: 'five', 6:'six', 7:'seven', 8:'eight', 9:'nine'} 31 | self.gesture_threshold = 0.57 32 | 33 | def __call__(self, hand): 34 | hand = hand[:, :2] 35 | hand[:, 0] /= 640 36 | hand[:, 1] /= 480 37 | hand = ToTensor()(hand) 38 | if torch.cuda.is_available(): 39 | hand = hand.cuda() 40 | hand = hand.view(1, -1) 41 | out = self.gesture_model(hand) 42 | out = F.softmax(out, 1) 43 | value, index = torch.max(out, 1) 44 | if value.item() > self.gesture_threshold: 45 | return self.idx_to_gesture[index.item()] 46 | else: 47 | return None 48 | 49 | @staticmethod 50 | def get_gesture_model(weights_path): 51 | model = Model(42, 32, 5) 52 | if torch.cuda.is_available(): 53 | model.load_state_dict(torch.load(weights_path)) 54 | model = model.cuda() 55 | else: 56 | model.load_state_dict(torch.load(weights_path, map_location=lambda storage, loc: storage)) 57 | model.eval() 58 | return model 59 | 60 | @staticmethod 61 | def hand_bbox(hand): 62 | if np.sum(hand[:, 2]) > 21*0.5: 63 | rect = cv2.boundingRect(np.array(hand[:, :2])) 64 | return rect 65 | else: 66 | return None 67 | 68 | 69 | def gesture_recognition(self): 70 | def decorator(func): 71 | def wrapper(*args, **kwargs): 72 | result, keypoints = func(*args, **kwargs) 73 | if self.hand_on and self.setting_widget.gesture_on(): 74 | hands = keypoints[1] 75 | for hand in hands: 76 | gesture = self.gesture_model(hand) 77 | x, y, w, h = self.gesture_model.hand_bbox(hand) 78 | cv2.rectangle(result, (x, y), (x + w, y + h), (255, 255, 255)) 79 | cv2.putText(result, gesture, (x, y), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 255)) 80 | return result, keypoints 81 | return wrapper 82 | 83 | return decorator 84 | -------------------------------------------------------------------------------- /custom/dock_filetree.py: -------------------------------------------------------------------------------- 1 | import os 2 | from PyQt5.QtCore import Qt 3 | from PyQt5.QtWidgets import * 4 | from PyQt5.uic import loadUi 5 | 6 | 7 | class FiletreeDock(QDockWidget): 8 | def __init__(self, parent=None): 9 | super().__init__(parent=parent) 10 | loadUi("ui/dock_filetree.ui", self) 11 | 12 | self.selected_file = None 13 | self.curdir = os.path.abspath('.') 14 | 15 | self.fileSystemModel = QFileSystemModel() 16 | self.dock_label = QLabel("Current Directory") 17 | self.dock_label.setMinimumHeight(30) 18 | self.dock_label.setAlignment(Qt.AlignCenter | Qt.AlignHCenter) 19 | self.setTitleBarWidget(self.dock_label) 20 | self.init_treeview() 21 | 22 | self.treeView.doubleClicked.connect(self.read_file) 23 | self.pushButton_folder.clicked.connect(self.load_folder) 24 | self.pushButton_goto.clicked.connect(self.goto_folder) 25 | self.pushButton_pardir.clicked.connect(self.parent_folder) 26 | 27 | self.hide() 28 | 29 | def init_treeview(self): 30 | self.fileSystemModel.setRootPath('.') 31 | self.treeView.setModel(self.fileSystemModel) 32 | self.treeView.setRootIndex(self.fileSystemModel.index(self.curdir)) 33 | # 隐藏size,date等列 34 | self.treeView.setColumnWidth(0, 200) 35 | self.treeView.setColumnHidden(1, True) 36 | self.treeView.setColumnHidden(2, True) 37 | self.treeView.setColumnHidden(3, True) 38 | # 不显示标题栏 39 | self.treeView.header().hide() 40 | # 设置动画 41 | self.treeView.setAnimated(True) 42 | # 选中不显示虚线 43 | self.treeView.setFocusPolicy(Qt.NoFocus) 44 | self.treeView.setMinimumWidth(200) 45 | self.lineEdit_current.setText(os.path.abspath('.')) 46 | 47 | def change_folder(self, new_folder): 48 | self.curdir = new_folder 49 | self.lineEdit_current.setText(new_folder) 50 | self.treeView.setRootIndex(self.fileSystemModel.index(new_folder)) 51 | self.show() 52 | 53 | def parent_folder(self): 54 | new_folder = os.path.dirname(self.curdir) 55 | self.change_folder(new_folder) 56 | 57 | def load_folder(self): 58 | new_folder = QFileDialog.getExistingDirectory(self, '请选择目录', './') # 可设置默认路径 59 | if not new_folder: 60 | return 61 | self.change_folder(new_folder) 62 | 63 | def goto_folder(self): 64 | new_foler = self.lineEdit_current.text() 65 | if not os.path.exists(new_foler): 66 | QMessageBox.about(self.parent(), u'提示', u"目录不存在") 67 | return 68 | self.change_folder(new_foler) 69 | 70 | def read_file(self, file_index): 71 | file = self.fileSystemModel.filePath(file_index) 72 | if not file: 73 | return False 74 | elif file.endswith((".jpg", ".png", ".JPG", ".PNG")): 75 | self.selected_file = file 76 | self.parent().run_image(file) 77 | elif file.endswith((".avi", ".mp4")): 78 | self.selected_file = file 79 | self.parent().run_video(file) 80 | -------------------------------------------------------------------------------- /dataset/hand_dataset.py: -------------------------------------------------------------------------------- 1 | import os 2 | import random 3 | import numpy as np 4 | from torch.utils.data import Dataset, DataLoader 5 | 6 | 7 | class HandDataset(Dataset): 8 | def __init__(self, path, transform=None, train=True, train_percent=0.7): 9 | super().__init__() 10 | random.seed(10) 11 | self.root = path 12 | self.transform = transform 13 | self.is_trian = train 14 | self.train_percent = train_percent 15 | self.class_to_idx = self._find_classes() 16 | self.train_samples, self.valid_samples = self._make_samples() 17 | 18 | def _make_samples(self): 19 | train_samples = [] 20 | valid_samples = [] 21 | for folder in os.listdir(self.root): 22 | for npy in os.listdir(os.path.join(self.root, folder, "hand")): 23 | npy_file = os.path.join(self.root, folder, "hand", npy) 24 | if random.random() < self.train_percent: 25 | train_samples.append((npy_file, folder)) 26 | else: 27 | valid_samples.append((npy_file, folder)) 28 | 29 | return train_samples, valid_samples 30 | 31 | def _find_classes(self): 32 | classes = [d for d in os.listdir(self.root) if os.path.isdir(os.path.join(self.root, d))] 33 | classes.sort() 34 | class_to_idx = {classes[i]: i for i in range(len(classes))} 35 | return class_to_idx 36 | 37 | def __len__(self): 38 | if self.is_trian: 39 | return len(self.train_samples) 40 | else: 41 | return len(self.valid_samples) 42 | 43 | def __getitem__(self, item): 44 | if self.is_trian: 45 | sample = self.train_samples[item][0] 46 | hand_label = self.class_to_idx[self.train_samples[item][1]] 47 | else: 48 | sample = self.valid_samples[item][0] 49 | hand_label = self.class_to_idx[self.valid_samples[item][1]] 50 | hands_keypoints = np.load(sample)[:, 0, :, :] 51 | 52 | # 单手 53 | # if np.sum(hands_keypoints[0, :, 2]) > np.sum(hands_keypoints[1, :, 2]): 54 | # hands_keypoints = hands_keypoints[0, :, :2] 55 | # else: 56 | # hands_keypoints = hands_keypoints[1, :, :2] 57 | 58 | # 双手 59 | if random.random()>0.5: 60 | hands_keypoints = hands_keypoints[0, :, :2] 61 | else: 62 | hands_keypoints = hands_keypoints[1, :, :2] 63 | 64 | hands_keypoints[:, 0] = hands_keypoints[:, 0] / 640 65 | hands_keypoints[:, 1] = hands_keypoints[:, 1] / 480 66 | if self.transform: 67 | hands_keypoints = self.transform(hands_keypoints) 68 | 69 | return hands_keypoints, hand_label 70 | 71 | @property 72 | def num_classes(self): 73 | return len(self.class_to_idx) 74 | 75 | 76 | if __name__ == "__main__": 77 | dataset1 = HandDataset(r"E:\BaiduNetdiskDownload\dataset", train=True) 78 | dataset2 = HandDataset(r"E:\BaiduNetdiskDownload\dataset", train=False) 79 | dataloader1 = DataLoader(dataset1, 1, shuffle=True) 80 | dataloader2 = DataLoader(dataset2, 1, shuffle=True) 81 | print(next(iter(dataloader1))) 82 | print(next(iter(dataloader2))) 83 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GUI-for-Pose-Estimate-and-Action-Recognition 2 | ![avatar](media/demo.gif) 3 | 4 | ## Introduction 5 | 6 | * This is a GUI program for pose estimation and action recognition based on [Openpose](https://github.com/CMU-Perceptual-Computing-Lab/openpose). 7 | * You can visualize key-points on image or camera and save the key-points data(as npy format) at the same time. 8 | * You can train a deep learning model for action ( or gesture or emotion) recognition through the data collected from this program. 9 | * My platform is windows10. I have complied the openpose with the python api and the complied binary files will be given below. So you don't have to compile the openpose from scratch 10 | 11 | ## Python Dependence 12 | * numpy==1.14.2 13 | * PyQt5==5.11.3 14 | * opencv-python==4.1.0.25 15 | * torch==1.0.1(only for gesture recognition) 16 | 17 | ## Installation 18 | - Install [cuda10](https://developer.nvidia.com/cuda-downloads) and [cudnn7]. Or here is my [BaiduDisk](https://pan.baidu.com/s/1EcVfsA7R4dIkj8kJqc9K9g) password:`4685`. 19 | 20 | - Run `models/getModels.bat` to get model. Or here is my [BaiduDisk](https://pan.baidu.com/s/14SV-v8CXRPMVoMvPoB2Haw) password:`rmkn` and put models in the corresponding position 21 | 22 | ![avatar](media/model_folder.png) 23 | 24 | - Download 3rd-party dlls from my [BaiduDisk](https://pan.baidu.com/s/1Cco38Py2G70s559qDt_g6g) password:`64sg` and unzip in your 3rdparty folder. 25 | 26 | ## Usage 27 | 1. ![avatar](icon/save.png) : save current result 28 | 2. ![avatar](icon/auto.png) : save result every interval while camera or video is opening 29 | 6. ![avatar](icon/camera.png) : open camera 30 | 7. ![avatar](icon/setting.png) : show setting view 31 | 8. ![avatar](icon/dir.png) : show file-tree view 32 | 33 | ## Setting 34 | 1. First, you should select which kind of key-points do you want to visualize or collect by checking the checkbox(`Body`, `Hand`, `Face`). 35 | 2. The threshold of three model can be controled by draging corresponding slider. 36 | 3. Change save interval. 37 | 4. Change net resolution for smaller GPU memery, but it will reduce the accuracy. 38 | 5. The function of `gesture recognition` can only be used when the hand checkbox is on. My model is only a 2 layers MLP, and the data was collected with front camera and left hand. So it may have many limitations. Your can train your own model and replace it. 39 | 40 | ## TODO 41 | 42 | * action recognition 43 | 44 | * emotion recognition 45 | 46 | ## Data format 47 | You will get a output folder like the following figure. The count is set to 0 when the program begins and will automatically increase with the number of images saved. 48 | ![avatar](media/save_folder.png) 49 | ```python 50 | data_body = np.load('body/0001_body.npy') 51 | data_hand = np.load('hand/0001_hand.npy') 52 | data_face = np.load('face/0001_face.npy') 53 | print(data_body.shape) 54 | # (1, 25, 3) : person_num x kep_points_num x x_y_scroe 55 | print(data_hand.shape) 56 | # (2, 1, 21, 3) : left_right x person_num x kep_points_num x x_y_scroe 57 | print(data_face.shape) 58 | # (1, 70, 3) : person_num x kep_points_num x x_y_scroe 59 | ``` 60 | 61 | ## Train your own model 62 | 1. Collect data and make folder for every class. 63 | 64 | ![train_data_format](media/train_data_format.png) 65 | 66 | 2. run `python train.py -p C:\Users\Administrator\Desktop\自建数据集\hand` to train your model(replace path with your dataset path) 67 | 68 | ## References 69 | [Openpose](https://github.com/CMU-Perceptual-Computing-Lab/openpose) 70 | -------------------------------------------------------------------------------- /custom/dock_setting.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from PyQt5.QtCore import Qt 4 | from PyQt5.QtWidgets import QDockWidget, QLabel 5 | from PyQt5.uic import loadUi 6 | 7 | print(os.path.dirname(__file__)) 8 | 9 | 10 | class SettingDock(QDockWidget): 11 | def __init__(self, parent=None): 12 | super().__init__(parent=parent) 13 | loadUi("ui/dock_setting.ui", self) 14 | self.dock_label = QLabel("Openpose Settings") 15 | self.dock_label.setMinimumHeight(30) 16 | self.dock_label.setAlignment(Qt.AlignCenter | Qt.AlignHCenter) 17 | self.setTitleBarWidget(self.dock_label) 18 | 19 | # 信号与槽 20 | self.horizontalSlider_Body.sliderReleased.connect(self.change_body_threshold) 21 | self.horizontalSlider_Face.sliderReleased.connect(self.change_face_threshold) 22 | self.horizontalSlider_Hand.sliderReleased.connect(self.change_hand_threshold) 23 | self.checkBox_body.stateChanged.connect(self.check_body) # 状态改变触发check_box_changed函数 24 | self.checkBox_hand.stateChanged.connect(self.check_hand) # 状态改变触发check_box_changed函数 25 | self.checkBox_face.stateChanged.connect(self.check_face) # 状态改变触发check_box_changed函数 26 | self.radioButton_black.toggled.connect(self.change_background) 27 | self.comboBox_resolution.currentIndexChanged.connect(self.change_resolution) 28 | 29 | self.hide() 30 | 31 | def check_body(self, status): 32 | # 姿态估计 33 | flag = True if status == Qt.Checked else False 34 | render_pose = 1 if status == Qt.Checked else 0 35 | self.horizontalSlider_Body.setEnabled(flag) 36 | self.radioButton_black.setEnabled(flag) 37 | self.radioButton_rgb.setEnabled(flag) 38 | self.parent().openpose_model.update_wrapper("render_pose", render_pose) 39 | 40 | def check_hand(self, status): 41 | # 手部估计 42 | flag = True if status == Qt.Checked else False 43 | self.horizontalSlider_Hand.setEnabled(flag) 44 | self.checkBox_gesture.setEnabled(flag) 45 | self.parent().openpose_model.update_wrapper("hand", flag) 46 | 47 | def check_face(self, status): 48 | # 脸部估计 49 | flag = True if status == Qt.Checked else False 50 | self.horizontalSlider_Face.setEnabled(flag) 51 | self.checkBox_emotion.setEnabled(flag) 52 | self.parent().openpose_model.update_wrapper("face", flag) 53 | 54 | def change_body_threshold(self): 55 | # 姿态估计阈值 56 | value = self.body_threshold 57 | self.label_threshold_body.setText(str(value * 100)) 58 | self.parent().openpose_model.update_wrapper("render_threshold", value) 59 | 60 | def change_hand_threshold(self): 61 | # 手部估计阈值 62 | value = self.hand_threshold 63 | self.label_threshold_hand.setText(str(value * 100)) 64 | self.parent().update_wrapper("hand_render_threshold", value) 65 | 66 | def change_face_threshold(self): 67 | # 脸部估计阈值 68 | value = self.face_threshold 69 | self.label_threshold_face.setText(str(value * 100)) 70 | self.parent().openpose_model.update_wrapper("face_render_threshold", value) 71 | 72 | def change_resolution(self): 73 | resolution = self.net_resolution 74 | self.parent().openpose_model.update_wrapper("net_resolution", resolution) 75 | 76 | def change_background(self): 77 | black_background = self.black_background 78 | self.parent().openpose_model.update_wrapper("disable_blending", black_background) 79 | 80 | @property 81 | def save_interval(self): 82 | return self.doubleSpinBox_interval.value() 83 | 84 | @property 85 | def body_on(self): 86 | return self.checkBox_body.isChecked() 87 | 88 | @property 89 | def hand_on(self): 90 | return self.checkBox_hand.isChecked() 91 | 92 | @property 93 | def face_on(self): 94 | return self.checkBox_face.isChecked() 95 | 96 | @property 97 | def body_threshold(self): 98 | return self.horizontalSlider_Body.value() / 100 99 | 100 | @property 101 | def hand_threshold(self): 102 | return self.horizontalSlider_Hand.value() / 100 103 | 104 | @property 105 | def face_threshold(self): 106 | return self.horizontalSlider_Face.value() / 100 107 | 108 | @property 109 | def net_resolution(self): 110 | return self.comboBox_resolution.currentText() 111 | 112 | @property 113 | def gesture_on(self): 114 | return self.checkBox_gesture.isChecked() 115 | 116 | @property 117 | def black_background(self): 118 | return self.radioButton_black.isChecked() 119 | 120 | -------------------------------------------------------------------------------- /custom/save_widget.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | import numpy as np 4 | from PyQt5.QtGui import QIcon, QPixmap 5 | 6 | from PyQt5.QtWidgets import QWidget 7 | from PyQt5.uic import loadUi 8 | 9 | 10 | class SaveWidget(QWidget): 11 | def __init__(self, parent=None): 12 | super().__init__(parent=parent) 13 | self.main_window = parent 14 | loadUi("ui/save_widget.ui", self) 15 | self.setWindowIcon(QIcon('media/snipaste.png')) 16 | self.setWindowTitle("Snipaste") 17 | self.body_keypoint = None 18 | self.hand_keypoint = None 19 | self.face_keypoint = None 20 | 21 | self.pushButton_save.clicked.connect(self.save_current) 22 | self.pushButton_cancel.clicked.connect(self.cancel_snipaste) 23 | 24 | self.init_out_path() 25 | self.count = 0 26 | self.hide() 27 | 28 | def init_out_path(self): 29 | self.output_path = "output" 30 | self.output_img_path = os.path.join(self.output_path, "img") 31 | self.output_body_path = os.path.join(self.output_path, "body") 32 | self.output_hand_path = os.path.join(self.output_path, "hand") 33 | self.output_face_path = os.path.join(self.output_path, "face") 34 | if not os.path.exists(self.output_img_path): 35 | os.makedirs(self.output_img_path) 36 | if not os.path.exists(self.output_hand_path): 37 | os.makedirs(self.output_hand_path) 38 | if not os.path.exists(self.output_body_path): 39 | os.makedirs(self.output_body_path) 40 | if not os.path.exists(self.output_face_path): 41 | os.makedirs(self.output_face_path) 42 | 43 | def save_current(self): 44 | self.save(self.label_frame.pixmap(), self.body_keypoint, self.hand_keypoint, self.face_keypoint) 45 | self.hide() 46 | 47 | def cancel_snipaste(self): 48 | self.setHidden(True) 49 | self.close() 50 | 51 | def set_frame(self, pixmap, body_keypoint, hand_keypoint, face_keypoint, message=None): 52 | self.setWindowTitle(message) 53 | self.label_frame.setPixmap(pixmap) 54 | self.body_keypoint = body_keypoint 55 | self.hand_keypoint = hand_keypoint 56 | self.face_keypoint = face_keypoint 57 | self.show() 58 | 59 | def save(self, pixmap, body_keypoints, hand_keypoints, face_keypoints): 60 | pixmap.save(os.path.join(self.output_img_path, "{:0>4d}.jpg".format(self.count))) 61 | w = pixmap.width() 62 | h = pixmap.height() 63 | if body_keypoints is not None: 64 | np.save(os.path.join(self.output_body_path, "{:0>4d}_body.json".format(self.count)), body_keypoints) 65 | self.body_npy2json(body_keypoints, w, h) 66 | if hand_keypoints is not None: 67 | np.save(os.path.join(self.output_hand_path, "{:0>4d}_hand.json".format(self.count)), hand_keypoints) 68 | self.hand_npy2json(hand_keypoints, w, h) 69 | if face_keypoints is not None: 70 | np.save(os.path.join(self.output_face_path, "{:0>4d}_face.json".format(self.count)), face_keypoints) 71 | self.face_npy2json(face_keypoints, w, h) 72 | self.count += 1 73 | 74 | def hand_npy2json(self, npy, w, h): 75 | file = os.path.join(self.output_hand_path, "{:0>4d}_hand.json".format(self.count)) 76 | dic = {} 77 | person_number = npy[0].shape[0] 78 | dic["person_number"] = person_number 79 | dic["width"] = w 80 | dic["height"] = h 81 | dic["hand_keypoints"] = [] 82 | for i in range(person_number): 83 | dic["hand_keypoints"].append({"left_hand_keypoints": npy[0][i].tolist()}) 84 | dic["hand_keypoints"].append({"right_hand_keypoints": npy[1][i].tolist()}) 85 | with open(file, 'w') as f: 86 | json.dump(dic, f) 87 | 88 | def body_npy2json(self, npy, w, h): 89 | file = os.path.join(self.output_body_path, "{:0>4d}_body.json".format(self.count)) 90 | dic = {} 91 | person_number = npy.shape[0] 92 | dic["person_number"] = person_number 93 | dic["width"] = w 94 | dic["height"] = h 95 | dic["body_keypoints"] = [] 96 | for i in range(person_number): 97 | dic["body_keypoints"].append(npy[i].tolist()) 98 | with open(file, 'w') as f: 99 | json.dump(dic, f) 100 | 101 | def face_npy2json(self, npy, w, h): 102 | file = os.path.join(self.output_face_path, "{:0>4d}_face.json".format(self.count)) 103 | dic = {} 104 | person_number = npy.shape[0] 105 | dic["person_number"] = person_number 106 | dic["width"] = w 107 | dic["height"] = h 108 | dic["face_keypoints"] = [] 109 | for i in range(person_number): 110 | dic["face_keypoints"].append(npy[i].tolist()) 111 | with open(file, 'w') as f: 112 | json.dump(dic, f) 113 | -------------------------------------------------------------------------------- /dataset/train.py: -------------------------------------------------------------------------------- 1 | import time 2 | import argparse 3 | 4 | import torch 5 | import torch.nn as nn 6 | from torchsummary import summary 7 | import torch.nn.functional as F 8 | from torch.utils.data import DataLoader 9 | 10 | from dataset.hand_dataset import HandDataset 11 | 12 | 13 | # class Model(nn.Module): 14 | # """ 15 | # 定义了一个简单的三层全连接神经网络,每一层都是线性的 16 | # """ 17 | # 18 | # def __init__(self, in_dim, n_hidden1, out_dim): 19 | # super().__init__() 20 | # self.layer1 = nn.Linear(in_dim, n_hidden1) 21 | # self.layer2 = nn.Linear(n_hidden1, out_dim) 22 | # 23 | # def forward(self, x): 24 | # x = F.relu(self.layer1(x)) 25 | # x = self.layer2(x) 26 | # return x 27 | 28 | class Model(nn.Module): 29 | """ 30 | 定义了一个简单的三层全连接神经网络,每一层都是线性的 31 | """ 32 | 33 | def __init__(self, in_dim, n_hidden1, out_dim): 34 | super().__init__() 35 | self.layer1 = nn.Linear(in_dim, n_hidden1) 36 | self.layer2 = nn.Linear(n_hidden1, n_hidden1) 37 | self.layer3 = nn.Linear(n_hidden1, out_dim) 38 | 39 | def forward(self, x): 40 | x = F.relu(self.layer1(x)) 41 | x = F.relu(self.layer2(x)) 42 | x = self.layer3(x) 43 | return x 44 | 45 | 46 | # class Model(nn.Module): 47 | # def __init__(self, input_size, num_classes=10, hidden=64, expand=2): 48 | # super().__init__() 49 | # self.input_size = input_size 50 | # self.input_layer = nn.Linear(input_size, hidden) 51 | # self.hidden_layer1 = ResLinear(hidden, expand) 52 | # self.hidden_layer2 = ResLinear(hidden, expand) 53 | # self.output_layer = nn.Linear(hidden, num_classes) 54 | # self.sigmoid = nn.Sigmoid() 55 | # 56 | # def forward(self, x): 57 | # out = self.input_layer(x) 58 | # out = self.hidden_layer1(out) 59 | # out = self.hidden_layer2(out) 60 | # out = self.output_layer(out) 61 | # # out = self.sigmoid(out + x) 62 | # return out 63 | # 64 | # 65 | # class ResLinear(nn.Module): 66 | # def __init__(self, number, expand=2): 67 | # super().__init__() 68 | # self.linear1 = nn.Linear(number, expand * number) 69 | # self.linear2 = nn.Linear(expand * number, number) 70 | # self.activate = nn.ReLU() 71 | # 72 | # def forward(self, x): 73 | # out = self.linear1(x) 74 | # out = self.linear2(out) 75 | # out = self.activate(out + x) 76 | # return out 77 | 78 | 79 | def valid(epoch): 80 | global best_valid_acc 81 | global model 82 | model = model.eval() 83 | num_correct = 0 84 | for inputs, targets in test_dataloader: 85 | # 前向传播 86 | inputs, targets = inputs.cuda(), targets.cuda() 87 | inputs = inputs.view(inputs.shape[0], -1) 88 | outputs = model(inputs) 89 | # print(outputs) 90 | # 统计正确个数 91 | _, preds = torch.max(outputs.data, 1) 92 | num_correct += torch.sum(preds == targets.data).item() 93 | acc_epoch = num_correct / len(test_dataset) 94 | writer.add_scalar("test_acc", acc_epoch, epoch) 95 | print('test_acc : %.4f' % acc_epoch) 96 | # 保存模型 97 | if acc_epoch > 0.78 and acc_epoch > best_valid_acc: 98 | torch.save(model.state_dict(), 'model_epoch{:0>3d}@acc{:.3}.pth'.format(epoch, acc_epoch)) 99 | best_valid_acc = acc_epoch 100 | 101 | 102 | def train(epoch): 103 | global model 104 | model = model.train() 105 | num_correct = 0 106 | total_loss = 0 107 | for inputs, targets in train_dataloader: 108 | # 前向传播 109 | inputs, targets = inputs.cuda(), targets.cuda() 110 | inputs = inputs.view(inputs.shape[0], -1) 111 | outputs = model(inputs) 112 | # 计算损失 113 | loss = criterion(outputs, targets) 114 | total_loss += loss.item() 115 | # 统计正确个数 116 | _, preds = torch.max(outputs.data, 1) 117 | num_correct += torch.sum(preds == targets.data).item() 118 | # 优化 119 | optimizer.zero_grad() 120 | loss.backward() 121 | optimizer.step() 122 | loss_epoch = total_loss / len(train_dataloader) 123 | writer.add_scalar("train_loss", loss_epoch, epoch) 124 | acc_epoch = num_correct / len(train_dataset) 125 | writer.add_scalar("train_acc", acc_epoch, epoch) 126 | print('loss : %.4f | train_acc : %.4f' % (loss_epoch, acc_epoch), end=" | ") 127 | 128 | 129 | def inference(): 130 | global model 131 | model.load_state_dict(torch.load("model@acc0.937.pth")) 132 | model = model.eval() 133 | for inputs, targets in test_dataloader: 134 | # 前向传播 135 | inputs, targets = inputs.cuda(), targets.cuda() 136 | inputs = inputs.view(inputs.shape[0], -1) 137 | outputs = model(inputs) 138 | print(torch.max(outputs, 1)[1]) 139 | print(targets) 140 | 141 | 142 | if __name__ == "__main__": 143 | from tensorboardX import SummaryWriter 144 | 145 | parser = argparse.ArgumentParser() 146 | parser.add_argument('--path', '-p', help='dataset path') 147 | parser.add_argument('--batch_size', '-b', default=500) 148 | parser.add_argument('--hidden', default=64, help='hidden layer neural number') 149 | parser.add_argument('--lr', '-l', default=1e-3, help='learning rate') 150 | args = parser.parse_args() 151 | 152 | # init dataloader 153 | train_dataset = HandDataset(args.path, train=True) 154 | train_dataloader = DataLoader(train_dataset, args.batch_size, shuffle=True) 155 | test_dataset = HandDataset(args.path, train=False) 156 | test_dataloader = DataLoader(test_dataset, args.batch_size, shuffle=True) 157 | 158 | # init model 159 | num_classes = train_dataset.num_classes 160 | 161 | model = Model(42, args.hidden, num_classes) 162 | model = model.cuda() 163 | summary(model, (1, 42)) 164 | 165 | for layer in model.modules(): 166 | if isinstance(layer, nn.Linear): 167 | torch.nn.init.normal_(layer.weight.data, 0, 0.5) 168 | 169 | optimizer = torch.optim.Adam(model.parameters(), lr=args.lr, weight_decay=1e-4) 170 | criterion = nn.CrossEntropyLoss() 171 | writer = SummaryWriter( 172 | "logs/model_res3L_{}_class{}_batch{}_lr{}_{}".format(args.hidden, num_classes, args.batch_size, args.lr, 173 | str(int(time.time())))) 174 | best_valid_acc = 0 175 | 176 | 177 | for i in range(10000): 178 | print("epoch ", i, end=" | ") 179 | train(i) 180 | valid(i) 181 | -------------------------------------------------------------------------------- /ui/dock_filetree.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | filetree_DockWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 349 10 | 379 11 | 12 | 13 | 14 | 15 | 524287 16 | 524287 17 | 18 | 19 | 20 | 21 | 等线 22 | 12 23 | 75 24 | true 25 | 26 | 27 | 28 | 29 | 30 | 31 | Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea 32 | 33 | 34 | DockWidget 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 0 45 | 0 46 | 47 | 48 | 49 | 50 | 25 51 | 25 52 | 53 | 54 | 55 | 56 | 25 57 | 25 58 | 59 | 60 | 61 | 62 | 等线 63 | 12 64 | 75 65 | true 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | ../icon/folder.png../icon/folder.png 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 0 85 | 0 86 | 87 | 88 | 89 | 90 | 25 91 | 25 92 | 93 | 94 | 95 | 96 | 25 97 | 25 98 | 99 | 100 | 101 | 102 | 等线 103 | 12 104 | 75 105 | true 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | ../icon/last.png../icon/last.png 117 | 118 | 119 | 120 | 16 121 | 16 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 0 131 | 25 132 | 133 | 134 | 135 | 136 | 16777215 137 | 25 138 | 139 | 140 | 141 | 142 | 等线 143 | 12 144 | 75 145 | true 146 | 147 | 148 | 149 | margin: 0px; 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 0 158 | 0 159 | 160 | 161 | 162 | 163 | 25 164 | 25 165 | 166 | 167 | 168 | 169 | 25 170 | 25 171 | 172 | 173 | 174 | 175 | 等线 176 | 12 177 | 75 178 | true 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | ../icon/right.png../icon/right.png 190 | 191 | 192 | 193 | 16 194 | 16 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 0 206 | 20 207 | 208 | 209 | 210 | 211 | 等线 212 | 12 213 | 75 214 | true 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import cv2 3 | import copy 4 | import time 5 | import numpy as np 6 | 7 | from PyQt5.QtCore import Qt, QTimer 8 | from PyQt5.QtGui import QIcon 9 | from PyQt5.QtWidgets import QMainWindow, QMessageBox, QLabel, \ 10 | QStatusBar, QToolBar, QApplication 11 | from PyQt5.uic import loadUi 12 | 13 | from custom.camera import Camera 14 | from custom.label_frame import LabelFrame 15 | from custom.dock_filetree import FiletreeDock 16 | from custom.dock_setting import SettingDock 17 | from custom.openpose_model import OpenposeModel 18 | from custom.save_widget import SaveWidget 19 | from custom.gesture_model import GestureModel 20 | from custom.dock_media import MediaDock 21 | 22 | 23 | class OpenposeGUI(QMainWindow): 24 | def __init__(self): 25 | super().__init__() 26 | loadUi("ui/main_window.ui", self) 27 | self.setWindowTitle("OpencvGUI") 28 | self.setWindowIcon(QIcon("icon/logo.png")) 29 | 30 | # 工具栏 31 | # 所有动作定义在ui文件中 32 | self.tool_bar = QToolBar() 33 | self.tool_bar.addAction(self.action_camera) 34 | self.tool_bar.addSeparator() 35 | self.tool_bar.addAction(self.action_save) 36 | self.tool_bar.addAction(self.action_autosave) 37 | self.tool_bar.addSeparator() 38 | self.tool_bar.addAction(self.action_setting) 39 | self.tool_bar.addAction(self.action_filetree) 40 | self.addToolBar(self.tool_bar) 41 | 42 | # 状态栏 43 | self.status_bar = QStatusBar() 44 | self.status_fps = QLabel("FPS:00.0") 45 | self.status_bar.addPermanentWidget(self.status_fps) 46 | self.setStatusBar(self.status_bar) 47 | 48 | # 组件 49 | self.label_frame = LabelFrame(self) # 用于显示画面 50 | 51 | self.dock_setting = SettingDock(self) # 设置 52 | self.dock_filetree = FiletreeDock(self) # 目录 53 | self.dock_media = MediaDock(self) # 视频播放控制 54 | 55 | self.timer = QTimer() 56 | self.camera = Camera() # 视频控制器 57 | self.openpose_model = OpenposeModel() # openpose模型 58 | self.save_widget = SaveWidget() # 保存窗口 59 | self.gesture_model = GestureModel(r'models/gesture/model@acc0.992.pth') 60 | 61 | # 设置dock 62 | self.setCentralWidget(self.label_frame) 63 | self.addDockWidget(Qt.LeftDockWidgetArea, self.dock_setting) 64 | self.addDockWidget(Qt.LeftDockWidgetArea, self.dock_filetree) 65 | self.addDockWidget(Qt.BottomDockWidgetArea, self.dock_media) 66 | 67 | # 工具栏动作 68 | self.action_camera.triggered.connect(self.run_camera) 69 | self.action_filetree.triggered.connect(self.show_filetree) 70 | self.action_setting.triggered.connect(self.show_setting) 71 | self.action_save.triggered.connect(self.save) 72 | self.action_autosave.triggered.connect(self.auto_save) 73 | 74 | # 相机计时器 75 | self.camera.timer.timeout.connect(self.update_frame) 76 | # 自动保存计时器 77 | self.timer.timeout.connect(self.save) 78 | 79 | def update_frame(self): 80 | """更新frame画面""" 81 | start_time = time.time() 82 | self.dock_media.update_slider(self.frame_pos, self.frame_count) 83 | frame = self.frame 84 | if frame is None: 85 | return None 86 | result, keypoints = self.openpose_model(frame) 87 | result, keypoints = self.gesture_recognition(result, keypoints) 88 | 89 | message = self.generate_message(keypoints) 90 | self.label_frame.update_frame(result) 91 | fps = 1 / (time.time() - start_time) 92 | self.status_fps.setText("FPS:{:.1f}".format(fps)) 93 | self.status_bar.showMessage(message) 94 | return result, keypoints 95 | 96 | def save(self): 97 | """执行保存操作""" 98 | if not self.label_frame.pixmap(): 99 | QMessageBox.warning(self, "Note", "No data in frame", QMessageBox.Yes) 100 | return 101 | 102 | pixmap = self.label_frame.img_to_pixmap(self.openpose_model.get_rendered_image()) 103 | body, hand, face = self.openpose_model.get_keypoints() 104 | message = self.generate_message((body, hand, face)) 105 | body = copy.deepcopy(body) if self.body_on else None 106 | hand = copy.deepcopy(hand) if self.hand_on else None 107 | face = copy.deepcopy(face) if self.face_on else None 108 | keypoints = (body, hand, face) 109 | 110 | if self.timer.isActive(): 111 | self.save_widget.save(pixmap.copy(), *keypoints) 112 | else: 113 | self.save_widget.set_frame(pixmap.copy(), *keypoints, message) 114 | self.save_widget.show() 115 | 116 | def auto_save(self): 117 | """开启或关闭自动保存""" 118 | if not self.camera.is_open: 119 | self.action_autosave.setChecked(False) 120 | if self.action_autosave.isChecked(): 121 | self.timer.start(self.save_interval * 1000) 122 | else: 123 | self.timer.stop() 124 | 125 | # 功能 126 | def show_setting(self): 127 | """隐藏或显示设置""" 128 | if self.dock_setting.isHidden(): 129 | self.dock_setting.show() 130 | else: 131 | self.dock_setting.hide() 132 | 133 | def show_filetree(self): 134 | """隐藏或显示目录树""" 135 | if self.dock_filetree.isHidden(): 136 | self.dock_filetree.show() 137 | else: 138 | self.dock_filetree.hide() 139 | 140 | def run_image(self, img_path): 141 | """图片""" 142 | image = cv2.imdecode(np.fromfile(img_path, dtype=np.uint8), -1) 143 | if image is None: 144 | QMessageBox.warning(self, "Note", "Read Image error", QMessageBox.Yes) 145 | return 146 | result, keypoints = self.openpose_model(image) 147 | message = self.generate_message(keypoints) 148 | self.label_frame.update_frame(result) 149 | self.status_bar.showMessage(message) 150 | self.dock_media.hide() 151 | 152 | def run_video(self, video_path): 153 | """视频""" 154 | self.camera.start(video_path) 155 | self.label_frame.resize(*self.resolution) 156 | self.update_frame() # 初始化画面 157 | self.camera.pause() 158 | self.dock_media.reset() 159 | self.dock_media.show() 160 | 161 | def run_camera(self): 162 | """相机""" 163 | if self.action_camera.isChecked(): 164 | self.camera.start(0) 165 | self.label_frame.resize(*self.resolution) 166 | else: 167 | self.label_frame.clear() 168 | self.camera.stop() 169 | self.status_fps.setText("FPS:00.0") 170 | self.dock_media.hide() 171 | 172 | def gesture_recognition(self, result, keypoints): 173 | """实现手势识别""" 174 | if self.gesture_on: 175 | hands = keypoints[1] 176 | if hands[0].size == 1: 177 | return result, keypoints 178 | person_num = hands[0].shape[0] 179 | for i in range(person_num): # 每个人 180 | for hand in hands: # 每只手 181 | rect = self.gesture_model.hand_bbox(hand[i]) 182 | gesture = self.gesture_model(hand[i]) 183 | if rect: 184 | print(rect) 185 | x, y, w, h = rect 186 | cv2.rectangle(result, (x, y), (x + w, y + h), (255, 255, 255), 2) 187 | cv2.putText(result, gesture, (x, y), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 255)) 188 | return result, keypoints 189 | 190 | def generate_message(self, keypoints): 191 | """获取识别结果信息""" 192 | if keypoints[0].size != 1: 193 | person_num = keypoints[0].shape[0] 194 | message = "person: {}".format(person_num) 195 | for i in range(person_num): 196 | message += " | person{}(".format(i + 1) 197 | if self.body_on: 198 | pose_keypoints = keypoints[0][i, :, 2] 199 | pose_detected = pose_keypoints[pose_keypoints > self.body_threshold] 200 | message += "pose: {:>2d}/{}".format(pose_detected.size, 25) 201 | 202 | if self.hand_on: 203 | right_hand_keypoinys = keypoints[1][0][i, :, 2] 204 | left_hand_keypoinys = keypoints[1][1][i, :, 2] 205 | 206 | right_hand_detected = right_hand_keypoinys[ 207 | right_hand_keypoinys > self.hand_threshold] 208 | left_hand_detected = left_hand_keypoinys[left_hand_keypoinys > self.hand_threshold] 209 | message += " | right hand: {:>2d}/{}".format(right_hand_detected.size, 21) 210 | message += " | left hand: {:>2d}/{}".format(left_hand_detected.size, 21) 211 | message += ")" 212 | else: 213 | message = "person: {}".format(0) 214 | return message 215 | 216 | @property 217 | def body_on(self): 218 | return self.dock_setting.body_on 219 | 220 | @property 221 | def hand_on(self): 222 | return self.dock_setting.hand_on 223 | 224 | @property 225 | def face_on(self): 226 | return self.dock_setting.face_on 227 | 228 | @property 229 | def body_threshold(self): 230 | return self.dock_setting.body_threshold 231 | 232 | @property 233 | def hand_threshold(self): 234 | return self.dock_setting.hand_threshold 235 | 236 | @property 237 | def face_threshold(self): 238 | return self.dock_setting.face_threshold 239 | 240 | @property 241 | def gesture_on(self): 242 | return self.dock_setting.gesture_on 243 | 244 | @property 245 | def save_interval(self): 246 | return self.dock_setting.save_interval 247 | 248 | @property 249 | def frame(self): 250 | return self.camera.frame 251 | 252 | @property 253 | def frame_pos(self): 254 | return self.camera.frame_pos 255 | 256 | @property 257 | def frame_count(self): 258 | return self.camera.frame_count 259 | 260 | @property 261 | def resolution(self): 262 | return self.camera.resolution 263 | 264 | 265 | if __name__ == "__main__": 266 | app = QApplication(sys.argv) 267 | window = OpenposeGUI() 268 | window.show() 269 | sys.exit(app.exec_()) 270 | -------------------------------------------------------------------------------- /ui/dock_setting.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | setting_DockWidget 4 | 5 | 6 | Qt::NonModal 7 | 8 | 9 | true 10 | 11 | 12 | 13 | 0 14 | 0 15 | 398 16 | 505 17 | 18 | 19 | 20 | 21 | 等线 22 | 12 23 | 75 24 | true 25 | 26 | 27 | 28 | Qt::LeftToRight 29 | 30 | 31 | false 32 | 33 | 34 | Qt::ImhNone 35 | 36 | 37 | false 38 | 39 | 40 | Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea 41 | 42 | 43 | setting 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 0 54 | 0 55 | 56 | 57 | 58 | 59 | 等线 60 | 12 61 | 75 62 | true 63 | 64 | 65 | 66 | Body 67 | 68 | 69 | true 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 0 78 | 0 79 | 80 | 81 | 82 | 83 | 等线 84 | 12 85 | 75 86 | true 87 | 88 | 89 | 90 | Hand 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 0 99 | 0 100 | 101 | 102 | 103 | 104 | 等线 105 | 12 106 | 75 107 | true 108 | 109 | 110 | 111 | Face 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 0 124 | 0 125 | 126 | 127 | 128 | 129 | 40 130 | 0 131 | 132 | 133 | 134 | 135 | 30 136 | 16777215 137 | 138 | 139 | 140 | 141 | 等线 142 | 12 143 | 75 144 | true 145 | 146 | 147 | 148 | Body 149 | 150 | 151 | true 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 0 160 | 0 161 | 162 | 163 | 164 | 165 | 16777215 166 | 16777215 167 | 168 | 169 | 170 | 171 | 等线 172 | 12 173 | 75 174 | true 175 | 176 | 177 | 178 | 1 179 | 180 | 181 | Qt::Horizontal 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 0 190 | 0 191 | 192 | 193 | 194 | 195 | 20 196 | 16777215 197 | 198 | 199 | 200 | 201 | 等线 202 | 12 203 | 75 204 | true 205 | 206 | 207 | 208 | 01 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 0 221 | 0 222 | 223 | 224 | 225 | 226 | 40 227 | 0 228 | 229 | 230 | 231 | 232 | 30 233 | 16777215 234 | 235 | 236 | 237 | 238 | 等线 239 | 12 240 | 75 241 | true 242 | 243 | 244 | 245 | Hand 246 | 247 | 248 | true 249 | 250 | 251 | 252 | 253 | 254 | 255 | false 256 | 257 | 258 | 259 | 0 260 | 0 261 | 262 | 263 | 264 | 265 | 等线 266 | 12 267 | 75 268 | true 269 | 270 | 271 | 272 | 20 273 | 274 | 275 | Qt::Horizontal 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 0 284 | 0 285 | 286 | 287 | 288 | 289 | 20 290 | 16777215 291 | 292 | 293 | 294 | 295 | 等线 296 | 12 297 | 75 298 | true 299 | 300 | 301 | 302 | 20 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 0 315 | 0 316 | 317 | 318 | 319 | 320 | 40 321 | 0 322 | 323 | 324 | 325 | 326 | 30 327 | 16777215 328 | 329 | 330 | 331 | 332 | 等线 333 | 12 334 | 75 335 | true 336 | 337 | 338 | 339 | Face 340 | 341 | 342 | true 343 | 344 | 345 | 346 | 347 | 348 | 349 | false 350 | 351 | 352 | 353 | 0 354 | 0 355 | 356 | 357 | 358 | 359 | 等线 360 | 12 361 | 75 362 | true 363 | 364 | 365 | 366 | 40 367 | 368 | 369 | Qt::Horizontal 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 0 378 | 0 379 | 380 | 381 | 382 | 383 | 20 384 | 16777215 385 | 386 | 387 | 388 | 389 | 等线 390 | 12 391 | 75 392 | true 393 | 394 | 395 | 396 | 40 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 等线 409 | 12 410 | 75 411 | true 412 | 413 | 414 | 415 | Save interval 416 | 417 | 418 | true 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 0 427 | 0 428 | 429 | 430 | 431 | 432 | 等线 433 | 12 434 | 75 435 | true 436 | 437 | 438 | 439 | s 440 | 441 | 442 | 1 443 | 444 | 445 | 5.000000000000000 446 | 447 | 448 | 0.100000000000000 449 | 450 | 451 | 0.200000000000000 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 等线 464 | 12 465 | 75 466 | true 467 | 468 | 469 | 470 | Net Resolution 471 | 472 | 473 | true 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 0 482 | 0 483 | 484 | 485 | 486 | 487 | 90 488 | 0 489 | 490 | 491 | 492 | 493 | 等线 494 | 12 495 | 75 496 | true 497 | 498 | 499 | 500 | 501 | 640x480 502 | 503 | 504 | 505 | 506 | 320x240 507 | 508 | 509 | 510 | 511 | 128x96 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 0 525 | 0 526 | 527 | 528 | 529 | 530 | 100 531 | 0 532 | 533 | 534 | 535 | 536 | 0 537 | 16777215 538 | 539 | 540 | 541 | 542 | 等线 543 | 12 544 | 75 545 | true 546 | 547 | 548 | 549 | Blackgound: 550 | 551 | 552 | true 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 0 561 | 0 562 | 563 | 564 | 565 | 566 | 等线 567 | 12 568 | 75 569 | true 570 | 571 | 572 | 573 | RGB 574 | 575 | 576 | true 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 0 585 | 0 586 | 587 | 588 | 589 | 590 | 等线 591 | 12 592 | 75 593 | true 594 | 595 | 596 | 597 | BLACK 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 0 608 | 0 609 | 610 | 611 | 612 | 613 | 等线 614 | 12 615 | 75 616 | true 617 | 618 | 619 | 620 | action recognition 621 | 622 | 623 | 624 | 625 | 626 | 627 | false 628 | 629 | 630 | 631 | 0 632 | 0 633 | 634 | 635 | 636 | 637 | 等线 638 | 12 639 | 75 640 | true 641 | 642 | 643 | 644 | gesture recognition 645 | 646 | 647 | 648 | 649 | 650 | 651 | false 652 | 653 | 654 | 655 | 0 656 | 0 657 | 658 | 659 | 660 | 661 | 等线 662 | 12 663 | 75 664 | true 665 | 666 | 667 | 668 | emotion recognition 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | -------------------------------------------------------------------------------- /models/face/pose_deploy.prototxt: -------------------------------------------------------------------------------- 1 | input: "image" 2 | input_dim: 1 3 | input_dim: 3 4 | input_dim: 1 # Original: 368 5 | input_dim: 1 # Original: 368 6 | # input: "weights" 7 | # input_dim: 1 8 | # input_dim: 71 9 | # input_dim: 184 10 | # input_dim: 184 11 | # input: "labels" 12 | # input_dim: 1 13 | # input_dim: 71 14 | # input_dim: 184 15 | # input_dim: 184 16 | 17 | layer { 18 | name: "conv1_1" 19 | type: "Convolution" 20 | bottom: "image" 21 | top: "conv1_1" 22 | param { 23 | lr_mult: 1 24 | decay_mult: 1 25 | } 26 | param { 27 | lr_mult: 2 28 | decay_mult: 0 29 | } 30 | convolution_param { 31 | num_output: 64 32 | pad: 1 33 | kernel_size: 3 34 | weight_filler { 35 | type: "gaussian" 36 | std: 0.01 37 | } 38 | bias_filler { 39 | type: "constant" 40 | } 41 | } 42 | } 43 | layer { 44 | name: "conv1_1_re" 45 | type: "ReLU" 46 | bottom: "conv1_1" 47 | top: "conv1_1" 48 | } 49 | layer { 50 | name: "conv1_2" 51 | type: "Convolution" 52 | bottom: "conv1_1" 53 | top: "conv1_2" 54 | param { 55 | lr_mult: 1 56 | decay_mult: 1 57 | } 58 | param { 59 | lr_mult: 2 60 | decay_mult: 0 61 | } 62 | convolution_param { 63 | num_output: 64 64 | pad: 1 65 | kernel_size: 3 66 | weight_filler { 67 | type: "gaussian" 68 | std: 0.01 69 | } 70 | bias_filler { 71 | type: "constant" 72 | } 73 | } 74 | } 75 | layer { 76 | name: "conv1_2_re" 77 | type: "ReLU" 78 | bottom: "conv1_2" 79 | top: "conv1_2" 80 | } 81 | layer { 82 | name: "pool1" 83 | type: "Pooling" 84 | bottom: "conv1_2" 85 | top: "pool1" 86 | pooling_param { 87 | pool: MAX 88 | kernel_size: 2 89 | stride: 2 90 | } 91 | } 92 | layer { 93 | name: "conv2_1" 94 | type: "Convolution" 95 | bottom: "pool1" 96 | top: "conv2_1" 97 | param { 98 | lr_mult: 1 99 | decay_mult: 1 100 | } 101 | param { 102 | lr_mult: 2 103 | decay_mult: 0 104 | } 105 | convolution_param { 106 | num_output: 128 107 | pad: 1 108 | kernel_size: 3 109 | weight_filler { 110 | type: "gaussian" 111 | std: 0.01 112 | } 113 | bias_filler { 114 | type: "constant" 115 | } 116 | } 117 | } 118 | layer { 119 | name: "conv2_1_re" 120 | type: "ReLU" 121 | bottom: "conv2_1" 122 | top: "conv2_1" 123 | } 124 | layer { 125 | name: "conv2_2" 126 | type: "Convolution" 127 | bottom: "conv2_1" 128 | top: "conv2_2" 129 | param { 130 | lr_mult: 1 131 | decay_mult: 1 132 | } 133 | param { 134 | lr_mult: 2 135 | decay_mult: 0 136 | } 137 | convolution_param { 138 | num_output: 128 139 | pad: 1 140 | kernel_size: 3 141 | weight_filler { 142 | type: "gaussian" 143 | std: 0.01 144 | } 145 | bias_filler { 146 | type: "constant" 147 | } 148 | } 149 | } 150 | layer { 151 | name: "conv2_2_re" 152 | type: "ReLU" 153 | bottom: "conv2_2" 154 | top: "conv2_2" 155 | } 156 | layer { 157 | name: "pool2" 158 | type: "Pooling" 159 | bottom: "conv2_2" 160 | top: "pool2" 161 | pooling_param { 162 | pool: MAX 163 | kernel_size: 2 164 | stride: 2 165 | } 166 | } 167 | layer { 168 | name: "conv3_1" 169 | type: "Convolution" 170 | bottom: "pool2" 171 | top: "conv3_1" 172 | param { 173 | lr_mult: 1 174 | decay_mult: 1 175 | } 176 | param { 177 | lr_mult: 2 178 | decay_mult: 0 179 | } 180 | convolution_param { 181 | num_output: 256 182 | pad: 1 183 | kernel_size: 3 184 | weight_filler { 185 | type: "gaussian" 186 | std: 0.01 187 | } 188 | bias_filler { 189 | type: "constant" 190 | } 191 | } 192 | } 193 | layer { 194 | name: "conv3_1_re" 195 | type: "ReLU" 196 | bottom: "conv3_1" 197 | top: "conv3_1" 198 | } 199 | layer { 200 | name: "conv3_2" 201 | type: "Convolution" 202 | bottom: "conv3_1" 203 | top: "conv3_2" 204 | param { 205 | lr_mult: 1 206 | decay_mult: 1 207 | } 208 | param { 209 | lr_mult: 2 210 | decay_mult: 0 211 | } 212 | convolution_param { 213 | num_output: 256 214 | pad: 1 215 | kernel_size: 3 216 | weight_filler { 217 | type: "gaussian" 218 | std: 0.01 219 | } 220 | bias_filler { 221 | type: "constant" 222 | } 223 | } 224 | } 225 | layer { 226 | name: "conv3_2_re" 227 | type: "ReLU" 228 | bottom: "conv3_2" 229 | top: "conv3_2" 230 | } 231 | layer { 232 | name: "conv3_3" 233 | type: "Convolution" 234 | bottom: "conv3_2" 235 | top: "conv3_3" 236 | param { 237 | lr_mult: 1 238 | decay_mult: 1 239 | } 240 | param { 241 | lr_mult: 2 242 | decay_mult: 0 243 | } 244 | convolution_param { 245 | num_output: 256 246 | pad: 1 247 | kernel_size: 3 248 | weight_filler { 249 | type: "gaussian" 250 | std: 0.01 251 | } 252 | bias_filler { 253 | type: "constant" 254 | } 255 | } 256 | } 257 | layer { 258 | name: "conv3_3_re" 259 | type: "ReLU" 260 | bottom: "conv3_3" 261 | top: "conv3_3" 262 | } 263 | layer { 264 | name: "conv3_4" 265 | type: "Convolution" 266 | bottom: "conv3_3" 267 | top: "conv3_4" 268 | param { 269 | lr_mult: 1 270 | decay_mult: 1 271 | } 272 | param { 273 | lr_mult: 2 274 | decay_mult: 0 275 | } 276 | convolution_param { 277 | num_output: 256 278 | pad: 1 279 | kernel_size: 3 280 | weight_filler { 281 | type: "gaussian" 282 | std: 0.01 283 | } 284 | bias_filler { 285 | type: "constant" 286 | } 287 | } 288 | } 289 | layer { 290 | name: "conv3_4_re" 291 | type: "ReLU" 292 | bottom: "conv3_4" 293 | top: "conv3_4" 294 | } 295 | layer { 296 | name: "pool3" 297 | type: "Pooling" 298 | bottom: "conv3_4" 299 | top: "pool3" 300 | pooling_param { 301 | pool: MAX 302 | kernel_size: 2 303 | stride: 2 304 | } 305 | } 306 | layer { 307 | name: "conv4_1" 308 | type: "Convolution" 309 | bottom: "pool3" 310 | top: "conv4_1" 311 | param { 312 | lr_mult: 1 313 | decay_mult: 1 314 | } 315 | param { 316 | lr_mult: 2 317 | decay_mult: 0 318 | } 319 | convolution_param { 320 | num_output: 512 321 | pad: 1 322 | kernel_size: 3 323 | weight_filler { 324 | type: "gaussian" 325 | std: 0.01 326 | } 327 | bias_filler { 328 | type: "constant" 329 | } 330 | } 331 | } 332 | layer { 333 | name: "conv4_1_re" 334 | type: "ReLU" 335 | bottom: "conv4_1" 336 | top: "conv4_1" 337 | } 338 | layer { 339 | name: "conv4_2" 340 | type: "Convolution" 341 | bottom: "conv4_1" 342 | top: "conv4_2" 343 | param { 344 | lr_mult: 1 345 | decay_mult: 1 346 | } 347 | param { 348 | lr_mult: 2 349 | decay_mult: 0 350 | } 351 | convolution_param { 352 | num_output: 512 353 | pad: 1 354 | kernel_size: 3 355 | weight_filler { 356 | type: "gaussian" 357 | std: 0.01 358 | } 359 | bias_filler { 360 | type: "constant" 361 | } 362 | } 363 | } 364 | layer { 365 | name: "conv4_2_re" 366 | type: "ReLU" 367 | bottom: "conv4_2" 368 | top: "conv4_2" 369 | } 370 | layer { 371 | name: "conv4_3" 372 | type: "Convolution" 373 | bottom: "conv4_2" 374 | top: "conv4_3" 375 | param { 376 | lr_mult: 1 377 | decay_mult: 1 378 | } 379 | param { 380 | lr_mult: 2 381 | decay_mult: 0 382 | } 383 | convolution_param { 384 | num_output: 512 385 | pad: 1 386 | kernel_size: 3 387 | weight_filler { 388 | type: "gaussian" 389 | std: 0.01 390 | } 391 | bias_filler { 392 | type: "constant" 393 | } 394 | } 395 | } 396 | layer { 397 | name: "conv4_3_re" 398 | type: "ReLU" 399 | bottom: "conv4_3" 400 | top: "conv4_3" 401 | } 402 | layer { 403 | name: "conv4_4" 404 | type: "Convolution" 405 | bottom: "conv4_3" 406 | top: "conv4_4" 407 | param { 408 | lr_mult: 1 409 | decay_mult: 1 410 | } 411 | param { 412 | lr_mult: 2 413 | decay_mult: 0 414 | } 415 | convolution_param { 416 | num_output: 512 417 | pad: 1 418 | kernel_size: 3 419 | weight_filler { 420 | type: "gaussian" 421 | std: 0.01 422 | } 423 | bias_filler { 424 | type: "constant" 425 | } 426 | } 427 | } 428 | layer { 429 | name: "conv4_4_re" 430 | type: "ReLU" 431 | bottom: "conv4_4" 432 | top: "conv4_4" 433 | } 434 | layer { 435 | name: "conv5_1" 436 | type: "Convolution" 437 | bottom: "conv4_4" 438 | top: "conv5_1" 439 | param { 440 | lr_mult: 1 441 | decay_mult: 1 442 | } 443 | param { 444 | lr_mult: 2 445 | decay_mult: 0 446 | } 447 | convolution_param { 448 | num_output: 512 449 | pad: 1 450 | kernel_size: 3 451 | weight_filler { 452 | type: "gaussian" 453 | std: 0.01 454 | } 455 | bias_filler { 456 | type: "constant" 457 | } 458 | } 459 | } 460 | layer { 461 | name: "conv5_1_re" 462 | type: "ReLU" 463 | bottom: "conv5_1" 464 | top: "conv5_1" 465 | } 466 | layer { 467 | name: "conv5_2" 468 | type: "Convolution" 469 | bottom: "conv5_1" 470 | top: "conv5_2" 471 | param { 472 | lr_mult: 1 473 | decay_mult: 1 474 | } 475 | param { 476 | lr_mult: 2 477 | decay_mult: 0 478 | } 479 | convolution_param { 480 | num_output: 512 481 | pad: 1 482 | kernel_size: 3 483 | weight_filler { 484 | type: "gaussian" 485 | std: 0.01 486 | } 487 | bias_filler { 488 | type: "constant" 489 | } 490 | } 491 | } 492 | layer { 493 | name: "conv5_2_re" 494 | type: "ReLU" 495 | bottom: "conv5_2" 496 | top: "conv5_2" 497 | } 498 | layer { 499 | name: "conv5_3_CPM" 500 | type: "Convolution" 501 | bottom: "conv5_2" 502 | top: "conv5_3_CPM" 503 | param { 504 | lr_mult: 1 505 | decay_mult: 1 506 | } 507 | param { 508 | lr_mult: 2 509 | decay_mult: 0 510 | } 511 | convolution_param { 512 | num_output: 128 513 | pad: 1 514 | kernel_size: 3 515 | weight_filler { 516 | type: "gaussian" 517 | std: 0.01 518 | } 519 | bias_filler { 520 | type: "constant" 521 | } 522 | } 523 | } 524 | layer { 525 | name: "conv5_3_CPM_re" 526 | type: "ReLU" 527 | bottom: "conv5_3_CPM" 528 | top: "conv5_3_CPM" 529 | } 530 | layer { 531 | name: "conv6_1_CPM" 532 | type: "Convolution" 533 | bottom: "conv5_3_CPM" 534 | top: "conv6_1_CPM" 535 | param { 536 | lr_mult: 1 537 | decay_mult: 1 538 | } 539 | param { 540 | lr_mult: 2 541 | decay_mult: 0 542 | } 543 | convolution_param { 544 | num_output: 512 545 | pad: 0 546 | kernel_size: 1 547 | weight_filler { 548 | type: "gaussian" 549 | std: 0.01 550 | } 551 | bias_filler { 552 | type: "constant" 553 | } 554 | } 555 | } 556 | layer { 557 | name: "conv6_1_CPM_re" 558 | type: "ReLU" 559 | bottom: "conv6_1_CPM" 560 | top: "conv6_1_CPM" 561 | } 562 | layer { 563 | name: "conv6_2_CPM" 564 | type: "Convolution" 565 | bottom: "conv6_1_CPM" 566 | top: "conv6_2_CPM" 567 | param { 568 | lr_mult: 1 569 | decay_mult: 1 570 | } 571 | param { 572 | lr_mult: 2 573 | decay_mult: 0 574 | } 575 | convolution_param { 576 | num_output: 71 577 | pad: 0 578 | kernel_size: 1 579 | weight_filler { 580 | type: "gaussian" 581 | std: 0.01 582 | } 583 | bias_filler { 584 | type: "constant" 585 | } 586 | } 587 | } 588 | layer { 589 | name: "features_in_stage_2" 590 | type: "Concat" 591 | bottom: "conv6_2_CPM" 592 | bottom: "conv5_3_CPM" 593 | top: "features_in_stage_2" 594 | concat_param { 595 | axis: 1 596 | } 597 | } 598 | layer { 599 | name: "Mconv1_stage2" 600 | type: "Convolution" 601 | bottom: "features_in_stage_2" 602 | top: "Mconv1_stage2" 603 | param { 604 | lr_mult: 4.0 605 | decay_mult: 1 606 | } 607 | param { 608 | lr_mult: 8.0 609 | decay_mult: 0 610 | } 611 | convolution_param { 612 | num_output: 128 613 | pad: 3 614 | kernel_size: 7 615 | weight_filler { 616 | type: "gaussian" 617 | std: 0.01 618 | } 619 | bias_filler { 620 | type: "constant" 621 | } 622 | } 623 | } 624 | layer { 625 | name: "Mconv1_stage2_re" 626 | type: "ReLU" 627 | bottom: "Mconv1_stage2" 628 | top: "Mconv1_stage2" 629 | } 630 | layer { 631 | name: "Mconv2_stage2" 632 | type: "Convolution" 633 | bottom: "Mconv1_stage2" 634 | top: "Mconv2_stage2" 635 | param { 636 | lr_mult: 4.0 637 | decay_mult: 1 638 | } 639 | param { 640 | lr_mult: 8.0 641 | decay_mult: 0 642 | } 643 | convolution_param { 644 | num_output: 128 645 | pad: 3 646 | kernel_size: 7 647 | weight_filler { 648 | type: "gaussian" 649 | std: 0.01 650 | } 651 | bias_filler { 652 | type: "constant" 653 | } 654 | } 655 | } 656 | layer { 657 | name: "Mconv2_stage2_re" 658 | type: "ReLU" 659 | bottom: "Mconv2_stage2" 660 | top: "Mconv2_stage2" 661 | } 662 | layer { 663 | name: "Mconv3_stage2" 664 | type: "Convolution" 665 | bottom: "Mconv2_stage2" 666 | top: "Mconv3_stage2" 667 | param { 668 | lr_mult: 4.0 669 | decay_mult: 1 670 | } 671 | param { 672 | lr_mult: 8.0 673 | decay_mult: 0 674 | } 675 | convolution_param { 676 | num_output: 128 677 | pad: 3 678 | kernel_size: 7 679 | weight_filler { 680 | type: "gaussian" 681 | std: 0.01 682 | } 683 | bias_filler { 684 | type: "constant" 685 | } 686 | } 687 | } 688 | layer { 689 | name: "Mconv3_stage2_re" 690 | type: "ReLU" 691 | bottom: "Mconv3_stage2" 692 | top: "Mconv3_stage2" 693 | } 694 | layer { 695 | name: "Mconv4_stage2" 696 | type: "Convolution" 697 | bottom: "Mconv3_stage2" 698 | top: "Mconv4_stage2" 699 | param { 700 | lr_mult: 4.0 701 | decay_mult: 1 702 | } 703 | param { 704 | lr_mult: 8.0 705 | decay_mult: 0 706 | } 707 | convolution_param { 708 | num_output: 128 709 | pad: 3 710 | kernel_size: 7 711 | weight_filler { 712 | type: "gaussian" 713 | std: 0.01 714 | } 715 | bias_filler { 716 | type: "constant" 717 | } 718 | } 719 | } 720 | layer { 721 | name: "Mconv4_stage2_re" 722 | type: "ReLU" 723 | bottom: "Mconv4_stage2" 724 | top: "Mconv4_stage2" 725 | } 726 | layer { 727 | name: "Mconv5_stage2" 728 | type: "Convolution" 729 | bottom: "Mconv4_stage2" 730 | top: "Mconv5_stage2" 731 | param { 732 | lr_mult: 4.0 733 | decay_mult: 1 734 | } 735 | param { 736 | lr_mult: 8.0 737 | decay_mult: 0 738 | } 739 | convolution_param { 740 | num_output: 128 741 | pad: 3 742 | kernel_size: 7 743 | weight_filler { 744 | type: "gaussian" 745 | std: 0.01 746 | } 747 | bias_filler { 748 | type: "constant" 749 | } 750 | } 751 | } 752 | layer { 753 | name: "Mconv5_stage2_re" 754 | type: "ReLU" 755 | bottom: "Mconv5_stage2" 756 | top: "Mconv5_stage2" 757 | } 758 | layer { 759 | name: "Mconv6_stage2" 760 | type: "Convolution" 761 | bottom: "Mconv5_stage2" 762 | top: "Mconv6_stage2" 763 | param { 764 | lr_mult: 4.0 765 | decay_mult: 1 766 | } 767 | param { 768 | lr_mult: 8.0 769 | decay_mult: 0 770 | } 771 | convolution_param { 772 | num_output: 128 773 | pad: 0 774 | kernel_size: 1 775 | weight_filler { 776 | type: "gaussian" 777 | std: 0.01 778 | } 779 | bias_filler { 780 | type: "constant" 781 | } 782 | } 783 | } 784 | layer { 785 | name: "Mconv6_stage2_re" 786 | type: "ReLU" 787 | bottom: "Mconv6_stage2" 788 | top: "Mconv6_stage2" 789 | } 790 | layer { 791 | name: "Mconv7_stage2" 792 | type: "Convolution" 793 | bottom: "Mconv6_stage2" 794 | top: "Mconv7_stage2" 795 | param { 796 | lr_mult: 4.0 797 | decay_mult: 1 798 | } 799 | param { 800 | lr_mult: 8.0 801 | decay_mult: 0 802 | } 803 | convolution_param { 804 | num_output: 71 805 | pad: 0 806 | kernel_size: 1 807 | weight_filler { 808 | type: "gaussian" 809 | std: 0.01 810 | } 811 | bias_filler { 812 | type: "constant" 813 | } 814 | } 815 | } 816 | layer { 817 | name: "features_in_stage_3" 818 | type: "Concat" 819 | bottom: "Mconv7_stage2" 820 | bottom: "conv5_3_CPM" 821 | top: "features_in_stage_3" 822 | concat_param { 823 | axis: 1 824 | } 825 | } 826 | layer { 827 | name: "Mconv1_stage3" 828 | type: "Convolution" 829 | bottom: "features_in_stage_3" 830 | top: "Mconv1_stage3" 831 | param { 832 | lr_mult: 4.0 833 | decay_mult: 1 834 | } 835 | param { 836 | lr_mult: 8.0 837 | decay_mult: 0 838 | } 839 | convolution_param { 840 | num_output: 128 841 | pad: 3 842 | kernel_size: 7 843 | weight_filler { 844 | type: "gaussian" 845 | std: 0.01 846 | } 847 | bias_filler { 848 | type: "constant" 849 | } 850 | } 851 | } 852 | layer { 853 | name: "Mconv1_stage3_re" 854 | type: "ReLU" 855 | bottom: "Mconv1_stage3" 856 | top: "Mconv1_stage3" 857 | } 858 | layer { 859 | name: "Mconv2_stage3" 860 | type: "Convolution" 861 | bottom: "Mconv1_stage3" 862 | top: "Mconv2_stage3" 863 | param { 864 | lr_mult: 4.0 865 | decay_mult: 1 866 | } 867 | param { 868 | lr_mult: 8.0 869 | decay_mult: 0 870 | } 871 | convolution_param { 872 | num_output: 128 873 | pad: 3 874 | kernel_size: 7 875 | weight_filler { 876 | type: "gaussian" 877 | std: 0.01 878 | } 879 | bias_filler { 880 | type: "constant" 881 | } 882 | } 883 | } 884 | layer { 885 | name: "Mconv2_stage3_re" 886 | type: "ReLU" 887 | bottom: "Mconv2_stage3" 888 | top: "Mconv2_stage3" 889 | } 890 | layer { 891 | name: "Mconv3_stage3" 892 | type: "Convolution" 893 | bottom: "Mconv2_stage3" 894 | top: "Mconv3_stage3" 895 | param { 896 | lr_mult: 4.0 897 | decay_mult: 1 898 | } 899 | param { 900 | lr_mult: 8.0 901 | decay_mult: 0 902 | } 903 | convolution_param { 904 | num_output: 128 905 | pad: 3 906 | kernel_size: 7 907 | weight_filler { 908 | type: "gaussian" 909 | std: 0.01 910 | } 911 | bias_filler { 912 | type: "constant" 913 | } 914 | } 915 | } 916 | layer { 917 | name: "Mconv3_stage3_re" 918 | type: "ReLU" 919 | bottom: "Mconv3_stage3" 920 | top: "Mconv3_stage3" 921 | } 922 | layer { 923 | name: "Mconv4_stage3" 924 | type: "Convolution" 925 | bottom: "Mconv3_stage3" 926 | top: "Mconv4_stage3" 927 | param { 928 | lr_mult: 4.0 929 | decay_mult: 1 930 | } 931 | param { 932 | lr_mult: 8.0 933 | decay_mult: 0 934 | } 935 | convolution_param { 936 | num_output: 128 937 | pad: 3 938 | kernel_size: 7 939 | weight_filler { 940 | type: "gaussian" 941 | std: 0.01 942 | } 943 | bias_filler { 944 | type: "constant" 945 | } 946 | } 947 | } 948 | layer { 949 | name: "Mconv4_stage3_re" 950 | type: "ReLU" 951 | bottom: "Mconv4_stage3" 952 | top: "Mconv4_stage3" 953 | } 954 | layer { 955 | name: "Mconv5_stage3" 956 | type: "Convolution" 957 | bottom: "Mconv4_stage3" 958 | top: "Mconv5_stage3" 959 | param { 960 | lr_mult: 4.0 961 | decay_mult: 1 962 | } 963 | param { 964 | lr_mult: 8.0 965 | decay_mult: 0 966 | } 967 | convolution_param { 968 | num_output: 128 969 | pad: 3 970 | kernel_size: 7 971 | weight_filler { 972 | type: "gaussian" 973 | std: 0.01 974 | } 975 | bias_filler { 976 | type: "constant" 977 | } 978 | } 979 | } 980 | layer { 981 | name: "Mconv5_stage3_re" 982 | type: "ReLU" 983 | bottom: "Mconv5_stage3" 984 | top: "Mconv5_stage3" 985 | } 986 | layer { 987 | name: "Mconv6_stage3" 988 | type: "Convolution" 989 | bottom: "Mconv5_stage3" 990 | top: "Mconv6_stage3" 991 | param { 992 | lr_mult: 4.0 993 | decay_mult: 1 994 | } 995 | param { 996 | lr_mult: 8.0 997 | decay_mult: 0 998 | } 999 | convolution_param { 1000 | num_output: 128 1001 | pad: 0 1002 | kernel_size: 1 1003 | weight_filler { 1004 | type: "gaussian" 1005 | std: 0.01 1006 | } 1007 | bias_filler { 1008 | type: "constant" 1009 | } 1010 | } 1011 | } 1012 | layer { 1013 | name: "Mconv6_stage3_re" 1014 | type: "ReLU" 1015 | bottom: "Mconv6_stage3" 1016 | top: "Mconv6_stage3" 1017 | } 1018 | layer { 1019 | name: "Mconv7_stage3" 1020 | type: "Convolution" 1021 | bottom: "Mconv6_stage3" 1022 | top: "Mconv7_stage3" 1023 | param { 1024 | lr_mult: 4.0 1025 | decay_mult: 1 1026 | } 1027 | param { 1028 | lr_mult: 8.0 1029 | decay_mult: 0 1030 | } 1031 | convolution_param { 1032 | num_output: 71 1033 | pad: 0 1034 | kernel_size: 1 1035 | weight_filler { 1036 | type: "gaussian" 1037 | std: 0.01 1038 | } 1039 | bias_filler { 1040 | type: "constant" 1041 | } 1042 | } 1043 | } 1044 | layer { 1045 | name: "features_in_stage_4" 1046 | type: "Concat" 1047 | bottom: "Mconv7_stage3" 1048 | bottom: "conv5_3_CPM" 1049 | top: "features_in_stage_4" 1050 | concat_param { 1051 | axis: 1 1052 | } 1053 | } 1054 | layer { 1055 | name: "Mconv1_stage4" 1056 | type: "Convolution" 1057 | bottom: "features_in_stage_4" 1058 | top: "Mconv1_stage4" 1059 | param { 1060 | lr_mult: 4.0 1061 | decay_mult: 1 1062 | } 1063 | param { 1064 | lr_mult: 8.0 1065 | decay_mult: 0 1066 | } 1067 | convolution_param { 1068 | num_output: 128 1069 | pad: 3 1070 | kernel_size: 7 1071 | weight_filler { 1072 | type: "gaussian" 1073 | std: 0.01 1074 | } 1075 | bias_filler { 1076 | type: "constant" 1077 | } 1078 | } 1079 | } 1080 | layer { 1081 | name: "Mconv1_stage4_re" 1082 | type: "ReLU" 1083 | bottom: "Mconv1_stage4" 1084 | top: "Mconv1_stage4" 1085 | } 1086 | layer { 1087 | name: "Mconv2_stage4" 1088 | type: "Convolution" 1089 | bottom: "Mconv1_stage4" 1090 | top: "Mconv2_stage4" 1091 | param { 1092 | lr_mult: 4.0 1093 | decay_mult: 1 1094 | } 1095 | param { 1096 | lr_mult: 8.0 1097 | decay_mult: 0 1098 | } 1099 | convolution_param { 1100 | num_output: 128 1101 | pad: 3 1102 | kernel_size: 7 1103 | weight_filler { 1104 | type: "gaussian" 1105 | std: 0.01 1106 | } 1107 | bias_filler { 1108 | type: "constant" 1109 | } 1110 | } 1111 | } 1112 | layer { 1113 | name: "Mconv2_stage4_re" 1114 | type: "ReLU" 1115 | bottom: "Mconv2_stage4" 1116 | top: "Mconv2_stage4" 1117 | } 1118 | layer { 1119 | name: "Mconv3_stage4" 1120 | type: "Convolution" 1121 | bottom: "Mconv2_stage4" 1122 | top: "Mconv3_stage4" 1123 | param { 1124 | lr_mult: 4.0 1125 | decay_mult: 1 1126 | } 1127 | param { 1128 | lr_mult: 8.0 1129 | decay_mult: 0 1130 | } 1131 | convolution_param { 1132 | num_output: 128 1133 | pad: 3 1134 | kernel_size: 7 1135 | weight_filler { 1136 | type: "gaussian" 1137 | std: 0.01 1138 | } 1139 | bias_filler { 1140 | type: "constant" 1141 | } 1142 | } 1143 | } 1144 | layer { 1145 | name: "Mconv3_stage4_re" 1146 | type: "ReLU" 1147 | bottom: "Mconv3_stage4" 1148 | top: "Mconv3_stage4" 1149 | } 1150 | layer { 1151 | name: "Mconv4_stage4" 1152 | type: "Convolution" 1153 | bottom: "Mconv3_stage4" 1154 | top: "Mconv4_stage4" 1155 | param { 1156 | lr_mult: 4.0 1157 | decay_mult: 1 1158 | } 1159 | param { 1160 | lr_mult: 8.0 1161 | decay_mult: 0 1162 | } 1163 | convolution_param { 1164 | num_output: 128 1165 | pad: 3 1166 | kernel_size: 7 1167 | weight_filler { 1168 | type: "gaussian" 1169 | std: 0.01 1170 | } 1171 | bias_filler { 1172 | type: "constant" 1173 | } 1174 | } 1175 | } 1176 | layer { 1177 | name: "Mconv4_stage4_re" 1178 | type: "ReLU" 1179 | bottom: "Mconv4_stage4" 1180 | top: "Mconv4_stage4" 1181 | } 1182 | layer { 1183 | name: "Mconv5_stage4" 1184 | type: "Convolution" 1185 | bottom: "Mconv4_stage4" 1186 | top: "Mconv5_stage4" 1187 | param { 1188 | lr_mult: 4.0 1189 | decay_mult: 1 1190 | } 1191 | param { 1192 | lr_mult: 8.0 1193 | decay_mult: 0 1194 | } 1195 | convolution_param { 1196 | num_output: 128 1197 | pad: 3 1198 | kernel_size: 7 1199 | weight_filler { 1200 | type: "gaussian" 1201 | std: 0.01 1202 | } 1203 | bias_filler { 1204 | type: "constant" 1205 | } 1206 | } 1207 | } 1208 | layer { 1209 | name: "Mconv5_stage4_re" 1210 | type: "ReLU" 1211 | bottom: "Mconv5_stage4" 1212 | top: "Mconv5_stage4" 1213 | } 1214 | layer { 1215 | name: "Mconv6_stage4" 1216 | type: "Convolution" 1217 | bottom: "Mconv5_stage4" 1218 | top: "Mconv6_stage4" 1219 | param { 1220 | lr_mult: 4.0 1221 | decay_mult: 1 1222 | } 1223 | param { 1224 | lr_mult: 8.0 1225 | decay_mult: 0 1226 | } 1227 | convolution_param { 1228 | num_output: 128 1229 | pad: 0 1230 | kernel_size: 1 1231 | weight_filler { 1232 | type: "gaussian" 1233 | std: 0.01 1234 | } 1235 | bias_filler { 1236 | type: "constant" 1237 | } 1238 | } 1239 | } 1240 | layer { 1241 | name: "Mconv6_stage4_re" 1242 | type: "ReLU" 1243 | bottom: "Mconv6_stage4" 1244 | top: "Mconv6_stage4" 1245 | } 1246 | layer { 1247 | name: "Mconv7_stage4" 1248 | type: "Convolution" 1249 | bottom: "Mconv6_stage4" 1250 | top: "Mconv7_stage4" 1251 | param { 1252 | lr_mult: 4.0 1253 | decay_mult: 1 1254 | } 1255 | param { 1256 | lr_mult: 8.0 1257 | decay_mult: 0 1258 | } 1259 | convolution_param { 1260 | num_output: 71 1261 | pad: 0 1262 | kernel_size: 1 1263 | weight_filler { 1264 | type: "gaussian" 1265 | std: 0.01 1266 | } 1267 | bias_filler { 1268 | type: "constant" 1269 | } 1270 | } 1271 | } 1272 | layer { 1273 | name: "features_in_stage_5" 1274 | type: "Concat" 1275 | bottom: "Mconv7_stage4" 1276 | bottom: "conv5_3_CPM" 1277 | top: "features_in_stage_5" 1278 | concat_param { 1279 | axis: 1 1280 | } 1281 | } 1282 | layer { 1283 | name: "Mconv1_stage5" 1284 | type: "Convolution" 1285 | bottom: "features_in_stage_5" 1286 | top: "Mconv1_stage5" 1287 | param { 1288 | lr_mult: 4.0 1289 | decay_mult: 1 1290 | } 1291 | param { 1292 | lr_mult: 8.0 1293 | decay_mult: 0 1294 | } 1295 | convolution_param { 1296 | num_output: 128 1297 | pad: 3 1298 | kernel_size: 7 1299 | weight_filler { 1300 | type: "gaussian" 1301 | std: 0.01 1302 | } 1303 | bias_filler { 1304 | type: "constant" 1305 | } 1306 | } 1307 | } 1308 | layer { 1309 | name: "Mconv1_stage5_re" 1310 | type: "ReLU" 1311 | bottom: "Mconv1_stage5" 1312 | top: "Mconv1_stage5" 1313 | } 1314 | layer { 1315 | name: "Mconv2_stage5" 1316 | type: "Convolution" 1317 | bottom: "Mconv1_stage5" 1318 | top: "Mconv2_stage5" 1319 | param { 1320 | lr_mult: 4.0 1321 | decay_mult: 1 1322 | } 1323 | param { 1324 | lr_mult: 8.0 1325 | decay_mult: 0 1326 | } 1327 | convolution_param { 1328 | num_output: 128 1329 | pad: 3 1330 | kernel_size: 7 1331 | weight_filler { 1332 | type: "gaussian" 1333 | std: 0.01 1334 | } 1335 | bias_filler { 1336 | type: "constant" 1337 | } 1338 | } 1339 | } 1340 | layer { 1341 | name: "Mconv2_stage5_re" 1342 | type: "ReLU" 1343 | bottom: "Mconv2_stage5" 1344 | top: "Mconv2_stage5" 1345 | } 1346 | layer { 1347 | name: "Mconv3_stage5" 1348 | type: "Convolution" 1349 | bottom: "Mconv2_stage5" 1350 | top: "Mconv3_stage5" 1351 | param { 1352 | lr_mult: 4.0 1353 | decay_mult: 1 1354 | } 1355 | param { 1356 | lr_mult: 8.0 1357 | decay_mult: 0 1358 | } 1359 | convolution_param { 1360 | num_output: 128 1361 | pad: 3 1362 | kernel_size: 7 1363 | weight_filler { 1364 | type: "gaussian" 1365 | std: 0.01 1366 | } 1367 | bias_filler { 1368 | type: "constant" 1369 | } 1370 | } 1371 | } 1372 | layer { 1373 | name: "Mconv3_stage5_re" 1374 | type: "ReLU" 1375 | bottom: "Mconv3_stage5" 1376 | top: "Mconv3_stage5" 1377 | } 1378 | layer { 1379 | name: "Mconv4_stage5" 1380 | type: "Convolution" 1381 | bottom: "Mconv3_stage5" 1382 | top: "Mconv4_stage5" 1383 | param { 1384 | lr_mult: 4.0 1385 | decay_mult: 1 1386 | } 1387 | param { 1388 | lr_mult: 8.0 1389 | decay_mult: 0 1390 | } 1391 | convolution_param { 1392 | num_output: 128 1393 | pad: 3 1394 | kernel_size: 7 1395 | weight_filler { 1396 | type: "gaussian" 1397 | std: 0.01 1398 | } 1399 | bias_filler { 1400 | type: "constant" 1401 | } 1402 | } 1403 | } 1404 | layer { 1405 | name: "Mconv4_stage5_re" 1406 | type: "ReLU" 1407 | bottom: "Mconv4_stage5" 1408 | top: "Mconv4_stage5" 1409 | } 1410 | layer { 1411 | name: "Mconv5_stage5" 1412 | type: "Convolution" 1413 | bottom: "Mconv4_stage5" 1414 | top: "Mconv5_stage5" 1415 | param { 1416 | lr_mult: 4.0 1417 | decay_mult: 1 1418 | } 1419 | param { 1420 | lr_mult: 8.0 1421 | decay_mult: 0 1422 | } 1423 | convolution_param { 1424 | num_output: 128 1425 | pad: 3 1426 | kernel_size: 7 1427 | weight_filler { 1428 | type: "gaussian" 1429 | std: 0.01 1430 | } 1431 | bias_filler { 1432 | type: "constant" 1433 | } 1434 | } 1435 | } 1436 | layer { 1437 | name: "Mconv5_stage5_re" 1438 | type: "ReLU" 1439 | bottom: "Mconv5_stage5" 1440 | top: "Mconv5_stage5" 1441 | } 1442 | layer { 1443 | name: "Mconv6_stage5" 1444 | type: "Convolution" 1445 | bottom: "Mconv5_stage5" 1446 | top: "Mconv6_stage5" 1447 | param { 1448 | lr_mult: 4.0 1449 | decay_mult: 1 1450 | } 1451 | param { 1452 | lr_mult: 8.0 1453 | decay_mult: 0 1454 | } 1455 | convolution_param { 1456 | num_output: 128 1457 | pad: 0 1458 | kernel_size: 1 1459 | weight_filler { 1460 | type: "gaussian" 1461 | std: 0.01 1462 | } 1463 | bias_filler { 1464 | type: "constant" 1465 | } 1466 | } 1467 | } 1468 | layer { 1469 | name: "Mconv6_stage5_re" 1470 | type: "ReLU" 1471 | bottom: "Mconv6_stage5" 1472 | top: "Mconv6_stage5" 1473 | } 1474 | layer { 1475 | name: "Mconv7_stage5" 1476 | type: "Convolution" 1477 | bottom: "Mconv6_stage5" 1478 | top: "Mconv7_stage5" 1479 | param { 1480 | lr_mult: 4.0 1481 | decay_mult: 1 1482 | } 1483 | param { 1484 | lr_mult: 8.0 1485 | decay_mult: 0 1486 | } 1487 | convolution_param { 1488 | num_output: 71 1489 | pad: 0 1490 | kernel_size: 1 1491 | weight_filler { 1492 | type: "gaussian" 1493 | std: 0.01 1494 | } 1495 | bias_filler { 1496 | type: "constant" 1497 | } 1498 | } 1499 | } 1500 | layer { 1501 | name: "features_in_stage_6" 1502 | type: "Concat" 1503 | bottom: "Mconv7_stage5" 1504 | bottom: "conv5_3_CPM" 1505 | top: "features_in_stage_6" 1506 | concat_param { 1507 | axis: 1 1508 | } 1509 | } 1510 | layer { 1511 | name: "Mconv1_stage6" 1512 | type: "Convolution" 1513 | bottom: "features_in_stage_6" 1514 | top: "Mconv1_stage6" 1515 | param { 1516 | lr_mult: 4.0 1517 | decay_mult: 1 1518 | } 1519 | param { 1520 | lr_mult: 8.0 1521 | decay_mult: 0 1522 | } 1523 | convolution_param { 1524 | num_output: 128 1525 | pad: 3 1526 | kernel_size: 7 1527 | weight_filler { 1528 | type: "gaussian" 1529 | std: 0.01 1530 | } 1531 | bias_filler { 1532 | type: "constant" 1533 | } 1534 | } 1535 | } 1536 | layer { 1537 | name: "Mconv1_stage6_re" 1538 | type: "ReLU" 1539 | bottom: "Mconv1_stage6" 1540 | top: "Mconv1_stage6" 1541 | } 1542 | layer { 1543 | name: "Mconv2_stage6" 1544 | type: "Convolution" 1545 | bottom: "Mconv1_stage6" 1546 | top: "Mconv2_stage6" 1547 | param { 1548 | lr_mult: 4.0 1549 | decay_mult: 1 1550 | } 1551 | param { 1552 | lr_mult: 8.0 1553 | decay_mult: 0 1554 | } 1555 | convolution_param { 1556 | num_output: 128 1557 | pad: 3 1558 | kernel_size: 7 1559 | weight_filler { 1560 | type: "gaussian" 1561 | std: 0.01 1562 | } 1563 | bias_filler { 1564 | type: "constant" 1565 | } 1566 | } 1567 | } 1568 | layer { 1569 | name: "Mconv2_stage6_re" 1570 | type: "ReLU" 1571 | bottom: "Mconv2_stage6" 1572 | top: "Mconv2_stage6" 1573 | } 1574 | layer { 1575 | name: "Mconv3_stage6" 1576 | type: "Convolution" 1577 | bottom: "Mconv2_stage6" 1578 | top: "Mconv3_stage6" 1579 | param { 1580 | lr_mult: 4.0 1581 | decay_mult: 1 1582 | } 1583 | param { 1584 | lr_mult: 8.0 1585 | decay_mult: 0 1586 | } 1587 | convolution_param { 1588 | num_output: 128 1589 | pad: 3 1590 | kernel_size: 7 1591 | weight_filler { 1592 | type: "gaussian" 1593 | std: 0.01 1594 | } 1595 | bias_filler { 1596 | type: "constant" 1597 | } 1598 | } 1599 | } 1600 | layer { 1601 | name: "Mconv3_stage6_re" 1602 | type: "ReLU" 1603 | bottom: "Mconv3_stage6" 1604 | top: "Mconv3_stage6" 1605 | } 1606 | layer { 1607 | name: "Mconv4_stage6" 1608 | type: "Convolution" 1609 | bottom: "Mconv3_stage6" 1610 | top: "Mconv4_stage6" 1611 | param { 1612 | lr_mult: 4.0 1613 | decay_mult: 1 1614 | } 1615 | param { 1616 | lr_mult: 8.0 1617 | decay_mult: 0 1618 | } 1619 | convolution_param { 1620 | num_output: 128 1621 | pad: 3 1622 | kernel_size: 7 1623 | weight_filler { 1624 | type: "gaussian" 1625 | std: 0.01 1626 | } 1627 | bias_filler { 1628 | type: "constant" 1629 | } 1630 | } 1631 | } 1632 | layer { 1633 | name: "Mconv4_stage6_re" 1634 | type: "ReLU" 1635 | bottom: "Mconv4_stage6" 1636 | top: "Mconv4_stage6" 1637 | } 1638 | layer { 1639 | name: "Mconv5_stage6" 1640 | type: "Convolution" 1641 | bottom: "Mconv4_stage6" 1642 | top: "Mconv5_stage6" 1643 | param { 1644 | lr_mult: 4.0 1645 | decay_mult: 1 1646 | } 1647 | param { 1648 | lr_mult: 8.0 1649 | decay_mult: 0 1650 | } 1651 | convolution_param { 1652 | num_output: 128 1653 | pad: 3 1654 | kernel_size: 7 1655 | weight_filler { 1656 | type: "gaussian" 1657 | std: 0.01 1658 | } 1659 | bias_filler { 1660 | type: "constant" 1661 | } 1662 | } 1663 | } 1664 | layer { 1665 | name: "Mconv5_stage6_re" 1666 | type: "ReLU" 1667 | bottom: "Mconv5_stage6" 1668 | top: "Mconv5_stage6" 1669 | } 1670 | layer { 1671 | name: "Mconv6_stage6" 1672 | type: "Convolution" 1673 | bottom: "Mconv5_stage6" 1674 | top: "Mconv6_stage6" 1675 | param { 1676 | lr_mult: 4.0 1677 | decay_mult: 1 1678 | } 1679 | param { 1680 | lr_mult: 8.0 1681 | decay_mult: 0 1682 | } 1683 | convolution_param { 1684 | num_output: 128 1685 | pad: 0 1686 | kernel_size: 1 1687 | weight_filler { 1688 | type: "gaussian" 1689 | std: 0.01 1690 | } 1691 | bias_filler { 1692 | type: "constant" 1693 | } 1694 | } 1695 | } 1696 | layer { 1697 | name: "Mconv6_stage6_re" 1698 | type: "ReLU" 1699 | bottom: "Mconv6_stage6" 1700 | top: "Mconv6_stage6" 1701 | } 1702 | layer { 1703 | name: "Mconv7_stage6" 1704 | type: "Convolution" 1705 | bottom: "Mconv6_stage6" 1706 | # top: "Mconv7_stage6" 1707 | top: "net_output" 1708 | param { 1709 | lr_mult: 4.0 1710 | decay_mult: 1 1711 | } 1712 | param { 1713 | lr_mult: 8.0 1714 | decay_mult: 0 1715 | } 1716 | convolution_param { 1717 | num_output: 71 1718 | pad: 0 1719 | kernel_size: 1 1720 | weight_filler { 1721 | type: "gaussian" 1722 | std: 0.01 1723 | } 1724 | bias_filler { 1725 | type: "constant" 1726 | } 1727 | } 1728 | } 1729 | -------------------------------------------------------------------------------- /models/hand/pose_deploy.prototxt: -------------------------------------------------------------------------------- 1 | input: "image" 2 | input_dim: 1 # Original: 2 3 | input_dim: 3 # It crashes if not left to 3 4 | input_dim: 1 # Original: 368 5 | input_dim: 1 # Original: 368 6 | layer { 7 | name: "conv1_1" 8 | type: "Convolution" 9 | bottom: "image" 10 | top: "conv1_1" 11 | param { 12 | lr_mult: 1.0 13 | decay_mult: 1 14 | } 15 | param { 16 | lr_mult: 2.0 17 | decay_mult: 0 18 | } 19 | convolution_param { 20 | num_output: 64 21 | pad: 1 22 | kernel_size: 3 23 | weight_filler { 24 | type: "xavier" 25 | } 26 | bias_filler { 27 | type: "constant" 28 | } 29 | dilation: 1 30 | } 31 | } 32 | layer { 33 | name: "relu1_1" 34 | type: "ReLU" 35 | bottom: "conv1_1" 36 | top: "conv1_1" 37 | } 38 | layer { 39 | name: "conv1_2" 40 | type: "Convolution" 41 | bottom: "conv1_1" 42 | top: "conv1_2" 43 | param { 44 | lr_mult: 1.0 45 | decay_mult: 1 46 | } 47 | param { 48 | lr_mult: 2.0 49 | decay_mult: 0 50 | } 51 | convolution_param { 52 | num_output: 64 53 | pad: 1 54 | kernel_size: 3 55 | weight_filler { 56 | type: "xavier" 57 | } 58 | bias_filler { 59 | type: "constant" 60 | } 61 | dilation: 1 62 | } 63 | } 64 | layer { 65 | name: "relu1_2" 66 | type: "ReLU" 67 | bottom: "conv1_2" 68 | top: "conv1_2" 69 | } 70 | layer { 71 | name: "pool1_stage1" 72 | type: "Pooling" 73 | bottom: "conv1_2" 74 | top: "pool1_stage1" 75 | pooling_param { 76 | pool: MAX 77 | kernel_size: 2 78 | stride: 2 79 | } 80 | } 81 | layer { 82 | name: "conv2_1" 83 | type: "Convolution" 84 | bottom: "pool1_stage1" 85 | top: "conv2_1" 86 | param { 87 | lr_mult: 1.0 88 | decay_mult: 1 89 | } 90 | param { 91 | lr_mult: 2.0 92 | decay_mult: 0 93 | } 94 | convolution_param { 95 | num_output: 128 96 | pad: 1 97 | kernel_size: 3 98 | weight_filler { 99 | type: "xavier" 100 | } 101 | bias_filler { 102 | type: "constant" 103 | } 104 | dilation: 1 105 | } 106 | } 107 | layer { 108 | name: "relu2_1" 109 | type: "ReLU" 110 | bottom: "conv2_1" 111 | top: "conv2_1" 112 | } 113 | layer { 114 | name: "conv2_2" 115 | type: "Convolution" 116 | bottom: "conv2_1" 117 | top: "conv2_2" 118 | param { 119 | lr_mult: 1.0 120 | decay_mult: 1 121 | } 122 | param { 123 | lr_mult: 2.0 124 | decay_mult: 0 125 | } 126 | convolution_param { 127 | num_output: 128 128 | pad: 1 129 | kernel_size: 3 130 | weight_filler { 131 | type: "xavier" 132 | } 133 | bias_filler { 134 | type: "constant" 135 | } 136 | dilation: 1 137 | } 138 | } 139 | layer { 140 | name: "relu2_2" 141 | type: "ReLU" 142 | bottom: "conv2_2" 143 | top: "conv2_2" 144 | } 145 | layer { 146 | name: "pool2_stage1" 147 | type: "Pooling" 148 | bottom: "conv2_2" 149 | top: "pool2_stage1" 150 | pooling_param { 151 | pool: MAX 152 | kernel_size: 2 153 | stride: 2 154 | } 155 | } 156 | layer { 157 | name: "conv3_1" 158 | type: "Convolution" 159 | bottom: "pool2_stage1" 160 | top: "conv3_1" 161 | param { 162 | lr_mult: 1.0 163 | decay_mult: 1 164 | } 165 | param { 166 | lr_mult: 2.0 167 | decay_mult: 0 168 | } 169 | convolution_param { 170 | num_output: 256 171 | pad: 1 172 | kernel_size: 3 173 | weight_filler { 174 | type: "xavier" 175 | } 176 | bias_filler { 177 | type: "constant" 178 | } 179 | dilation: 1 180 | } 181 | } 182 | layer { 183 | name: "relu3_1" 184 | type: "ReLU" 185 | bottom: "conv3_1" 186 | top: "conv3_1" 187 | } 188 | layer { 189 | name: "conv3_2" 190 | type: "Convolution" 191 | bottom: "conv3_1" 192 | top: "conv3_2" 193 | param { 194 | lr_mult: 1.0 195 | decay_mult: 1 196 | } 197 | param { 198 | lr_mult: 2.0 199 | decay_mult: 0 200 | } 201 | convolution_param { 202 | num_output: 256 203 | pad: 1 204 | kernel_size: 3 205 | weight_filler { 206 | type: "xavier" 207 | } 208 | bias_filler { 209 | type: "constant" 210 | } 211 | dilation: 1 212 | } 213 | } 214 | layer { 215 | name: "relu3_2" 216 | type: "ReLU" 217 | bottom: "conv3_2" 218 | top: "conv3_2" 219 | } 220 | layer { 221 | name: "conv3_3" 222 | type: "Convolution" 223 | bottom: "conv3_2" 224 | top: "conv3_3" 225 | param { 226 | lr_mult: 1.0 227 | decay_mult: 1 228 | } 229 | param { 230 | lr_mult: 2.0 231 | decay_mult: 0 232 | } 233 | convolution_param { 234 | num_output: 256 235 | pad: 1 236 | kernel_size: 3 237 | weight_filler { 238 | type: "xavier" 239 | } 240 | bias_filler { 241 | type: "constant" 242 | } 243 | dilation: 1 244 | } 245 | } 246 | layer { 247 | name: "relu3_3" 248 | type: "ReLU" 249 | bottom: "conv3_3" 250 | top: "conv3_3" 251 | } 252 | layer { 253 | name: "conv3_4" 254 | type: "Convolution" 255 | bottom: "conv3_3" 256 | top: "conv3_4" 257 | param { 258 | lr_mult: 1.0 259 | decay_mult: 1 260 | } 261 | param { 262 | lr_mult: 2.0 263 | decay_mult: 0 264 | } 265 | convolution_param { 266 | num_output: 256 267 | pad: 1 268 | kernel_size: 3 269 | weight_filler { 270 | type: "xavier" 271 | } 272 | bias_filler { 273 | type: "constant" 274 | } 275 | dilation: 1 276 | } 277 | } 278 | layer { 279 | name: "relu3_4" 280 | type: "ReLU" 281 | bottom: "conv3_4" 282 | top: "conv3_4" 283 | } 284 | layer { 285 | name: "pool3_stage1" 286 | type: "Pooling" 287 | bottom: "conv3_4" 288 | top: "pool3_stage1" 289 | pooling_param { 290 | pool: MAX 291 | kernel_size: 2 292 | stride: 2 293 | } 294 | } 295 | layer { 296 | name: "conv4_1" 297 | type: "Convolution" 298 | bottom: "pool3_stage1" 299 | top: "conv4_1" 300 | param { 301 | lr_mult: 1.0 302 | decay_mult: 1 303 | } 304 | param { 305 | lr_mult: 2.0 306 | decay_mult: 0 307 | } 308 | convolution_param { 309 | num_output: 512 310 | pad: 1 311 | kernel_size: 3 312 | weight_filler { 313 | type: "xavier" 314 | } 315 | bias_filler { 316 | type: "constant" 317 | } 318 | dilation: 1 319 | } 320 | } 321 | layer { 322 | name: "relu4_1" 323 | type: "ReLU" 324 | bottom: "conv4_1" 325 | top: "conv4_1" 326 | } 327 | layer { 328 | name: "conv4_2" 329 | type: "Convolution" 330 | bottom: "conv4_1" 331 | top: "conv4_2" 332 | param { 333 | lr_mult: 1.0 334 | decay_mult: 1 335 | } 336 | param { 337 | lr_mult: 2.0 338 | decay_mult: 0 339 | } 340 | convolution_param { 341 | num_output: 512 342 | pad: 1 343 | kernel_size: 3 344 | weight_filler { 345 | type: "xavier" 346 | } 347 | bias_filler { 348 | type: "constant" 349 | } 350 | dilation: 1 351 | } 352 | } 353 | layer { 354 | name: "relu4_2" 355 | type: "ReLU" 356 | bottom: "conv4_2" 357 | top: "conv4_2" 358 | } 359 | layer { 360 | name: "conv4_3" 361 | type: "Convolution" 362 | bottom: "conv4_2" 363 | top: "conv4_3" 364 | param { 365 | lr_mult: 1.0 366 | decay_mult: 1 367 | } 368 | param { 369 | lr_mult: 2.0 370 | decay_mult: 0 371 | } 372 | convolution_param { 373 | num_output: 512 374 | pad: 1 375 | kernel_size: 3 376 | weight_filler { 377 | type: "xavier" 378 | } 379 | bias_filler { 380 | type: "constant" 381 | } 382 | dilation: 1 383 | } 384 | } 385 | layer { 386 | name: "relu4_3" 387 | type: "ReLU" 388 | bottom: "conv4_3" 389 | top: "conv4_3" 390 | } 391 | layer { 392 | name: "conv4_4" 393 | type: "Convolution" 394 | bottom: "conv4_3" 395 | top: "conv4_4" 396 | param { 397 | lr_mult: 1.0 398 | decay_mult: 1 399 | } 400 | param { 401 | lr_mult: 2.0 402 | decay_mult: 0 403 | } 404 | convolution_param { 405 | num_output: 512 406 | pad: 1 407 | kernel_size: 3 408 | weight_filler { 409 | type: "xavier" 410 | } 411 | bias_filler { 412 | type: "constant" 413 | } 414 | dilation: 1 415 | } 416 | } 417 | layer { 418 | name: "relu4_4" 419 | type: "ReLU" 420 | bottom: "conv4_4" 421 | top: "conv4_4" 422 | } 423 | layer { 424 | name: "conv5_1" 425 | type: "Convolution" 426 | bottom: "conv4_4" 427 | top: "conv5_1" 428 | param { 429 | lr_mult: 1.0 430 | decay_mult: 1 431 | } 432 | param { 433 | lr_mult: 2.0 434 | decay_mult: 0 435 | } 436 | convolution_param { 437 | num_output: 512 438 | pad: 1 439 | kernel_size: 3 440 | weight_filler { 441 | type: "xavier" 442 | } 443 | bias_filler { 444 | type: "constant" 445 | } 446 | dilation: 1 447 | } 448 | } 449 | layer { 450 | name: "relu5_1" 451 | type: "ReLU" 452 | bottom: "conv5_1" 453 | top: "conv5_1" 454 | } 455 | layer { 456 | name: "conv5_2" 457 | type: "Convolution" 458 | bottom: "conv5_1" 459 | top: "conv5_2" 460 | param { 461 | lr_mult: 1.0 462 | decay_mult: 1 463 | } 464 | param { 465 | lr_mult: 2.0 466 | decay_mult: 0 467 | } 468 | convolution_param { 469 | num_output: 512 470 | pad: 1 471 | kernel_size: 3 472 | weight_filler { 473 | type: "xavier" 474 | } 475 | bias_filler { 476 | type: "constant" 477 | } 478 | dilation: 1 479 | } 480 | } 481 | layer { 482 | name: "relu5_2" 483 | type: "ReLU" 484 | bottom: "conv5_2" 485 | top: "conv5_2" 486 | } 487 | layer { 488 | name: "conv5_3_CPM" 489 | type: "Convolution" 490 | bottom: "conv5_2" 491 | top: "conv5_3_CPM" 492 | param { 493 | lr_mult: 1.0 494 | decay_mult: 1 495 | } 496 | param { 497 | lr_mult: 2.0 498 | decay_mult: 0 499 | } 500 | convolution_param { 501 | num_output: 128 502 | pad: 1 503 | kernel_size: 3 504 | weight_filler { 505 | type: "gaussian" 506 | std: 0.01 507 | } 508 | bias_filler { 509 | type: "constant" 510 | } 511 | dilation: 1 512 | } 513 | } 514 | layer { 515 | name: "relu5_4_stage1_3" 516 | type: "ReLU" 517 | bottom: "conv5_3_CPM" 518 | top: "conv5_3_CPM" 519 | } 520 | layer { 521 | name: "conv6_1_CPM" 522 | type: "Convolution" 523 | bottom: "conv5_3_CPM" 524 | top: "conv6_1_CPM" 525 | param { 526 | lr_mult: 1.0 527 | decay_mult: 1 528 | } 529 | param { 530 | lr_mult: 2.0 531 | decay_mult: 0 532 | } 533 | convolution_param { 534 | num_output: 512 535 | pad: 0 536 | kernel_size: 1 537 | weight_filler { 538 | type: "gaussian" 539 | std: 0.01 540 | } 541 | bias_filler { 542 | type: "constant" 543 | } 544 | dilation: 1 545 | } 546 | } 547 | layer { 548 | name: "relu6_4_stage1_1" 549 | type: "ReLU" 550 | bottom: "conv6_1_CPM" 551 | top: "conv6_1_CPM" 552 | } 553 | layer { 554 | name: "conv6_2_CPM" 555 | type: "Convolution" 556 | bottom: "conv6_1_CPM" 557 | top: "conv6_2_CPM" 558 | param { 559 | lr_mult: 1.0 560 | decay_mult: 1 561 | } 562 | param { 563 | lr_mult: 2.0 564 | decay_mult: 0 565 | } 566 | convolution_param { 567 | num_output: 22 568 | pad: 0 569 | kernel_size: 1 570 | weight_filler { 571 | type: "gaussian" 572 | std: 0.01 573 | } 574 | bias_filler { 575 | type: "constant" 576 | } 577 | dilation: 1 578 | } 579 | } 580 | layer { 581 | name: "concat_stage2" 582 | type: "Concat" 583 | bottom: "conv6_2_CPM" 584 | bottom: "conv5_3_CPM" 585 | top: "concat_stage2" 586 | concat_param { 587 | axis: 1 588 | } 589 | } 590 | layer { 591 | name: "Mconv1_stage2" 592 | type: "Convolution" 593 | bottom: "concat_stage2" 594 | top: "Mconv1_stage2" 595 | param { 596 | lr_mult: 4.0 597 | decay_mult: 1 598 | } 599 | param { 600 | lr_mult: 8.0 601 | decay_mult: 0 602 | } 603 | convolution_param { 604 | num_output: 128 605 | pad: 3 606 | kernel_size: 7 607 | weight_filler { 608 | type: "gaussian" 609 | std: 0.01 610 | } 611 | bias_filler { 612 | type: "constant" 613 | } 614 | dilation: 1 615 | } 616 | } 617 | layer { 618 | name: "Mrelu1_2_stage2_1" 619 | type: "ReLU" 620 | bottom: "Mconv1_stage2" 621 | top: "Mconv1_stage2" 622 | } 623 | layer { 624 | name: "Mconv2_stage2" 625 | type: "Convolution" 626 | bottom: "Mconv1_stage2" 627 | top: "Mconv2_stage2" 628 | param { 629 | lr_mult: 4.0 630 | decay_mult: 1 631 | } 632 | param { 633 | lr_mult: 8.0 634 | decay_mult: 0 635 | } 636 | convolution_param { 637 | num_output: 128 638 | pad: 3 639 | kernel_size: 7 640 | weight_filler { 641 | type: "gaussian" 642 | std: 0.01 643 | } 644 | bias_filler { 645 | type: "constant" 646 | } 647 | dilation: 1 648 | } 649 | } 650 | layer { 651 | name: "Mrelu1_3_stage2_2" 652 | type: "ReLU" 653 | bottom: "Mconv2_stage2" 654 | top: "Mconv2_stage2" 655 | } 656 | layer { 657 | name: "Mconv3_stage2" 658 | type: "Convolution" 659 | bottom: "Mconv2_stage2" 660 | top: "Mconv3_stage2" 661 | param { 662 | lr_mult: 4.0 663 | decay_mult: 1 664 | } 665 | param { 666 | lr_mult: 8.0 667 | decay_mult: 0 668 | } 669 | convolution_param { 670 | num_output: 128 671 | pad: 3 672 | kernel_size: 7 673 | weight_filler { 674 | type: "gaussian" 675 | std: 0.01 676 | } 677 | bias_filler { 678 | type: "constant" 679 | } 680 | dilation: 1 681 | } 682 | } 683 | layer { 684 | name: "Mrelu1_4_stage2_3" 685 | type: "ReLU" 686 | bottom: "Mconv3_stage2" 687 | top: "Mconv3_stage2" 688 | } 689 | layer { 690 | name: "Mconv4_stage2" 691 | type: "Convolution" 692 | bottom: "Mconv3_stage2" 693 | top: "Mconv4_stage2" 694 | param { 695 | lr_mult: 4.0 696 | decay_mult: 1 697 | } 698 | param { 699 | lr_mult: 8.0 700 | decay_mult: 0 701 | } 702 | convolution_param { 703 | num_output: 128 704 | pad: 3 705 | kernel_size: 7 706 | weight_filler { 707 | type: "gaussian" 708 | std: 0.01 709 | } 710 | bias_filler { 711 | type: "constant" 712 | } 713 | dilation: 1 714 | } 715 | } 716 | layer { 717 | name: "Mrelu1_5_stage2_4" 718 | type: "ReLU" 719 | bottom: "Mconv4_stage2" 720 | top: "Mconv4_stage2" 721 | } 722 | layer { 723 | name: "Mconv5_stage2" 724 | type: "Convolution" 725 | bottom: "Mconv4_stage2" 726 | top: "Mconv5_stage2" 727 | param { 728 | lr_mult: 4.0 729 | decay_mult: 1 730 | } 731 | param { 732 | lr_mult: 8.0 733 | decay_mult: 0 734 | } 735 | convolution_param { 736 | num_output: 128 737 | pad: 3 738 | kernel_size: 7 739 | weight_filler { 740 | type: "gaussian" 741 | std: 0.01 742 | } 743 | bias_filler { 744 | type: "constant" 745 | } 746 | dilation: 1 747 | } 748 | } 749 | layer { 750 | name: "Mrelu1_6_stage2_5" 751 | type: "ReLU" 752 | bottom: "Mconv5_stage2" 753 | top: "Mconv5_stage2" 754 | } 755 | layer { 756 | name: "Mconv6_stage2" 757 | type: "Convolution" 758 | bottom: "Mconv5_stage2" 759 | top: "Mconv6_stage2" 760 | param { 761 | lr_mult: 4.0 762 | decay_mult: 1 763 | } 764 | param { 765 | lr_mult: 8.0 766 | decay_mult: 0 767 | } 768 | convolution_param { 769 | num_output: 128 770 | pad: 0 771 | kernel_size: 1 772 | weight_filler { 773 | type: "gaussian" 774 | std: 0.01 775 | } 776 | bias_filler { 777 | type: "constant" 778 | } 779 | dilation: 1 780 | } 781 | } 782 | layer { 783 | name: "Mrelu1_7_stage2_6" 784 | type: "ReLU" 785 | bottom: "Mconv6_stage2" 786 | top: "Mconv6_stage2" 787 | } 788 | layer { 789 | name: "Mconv7_stage2" 790 | type: "Convolution" 791 | bottom: "Mconv6_stage2" 792 | top: "Mconv7_stage2" 793 | param { 794 | lr_mult: 4.0 795 | decay_mult: 1 796 | } 797 | param { 798 | lr_mult: 8.0 799 | decay_mult: 0 800 | } 801 | convolution_param { 802 | num_output: 22 803 | pad: 0 804 | kernel_size: 1 805 | weight_filler { 806 | type: "gaussian" 807 | std: 0.01 808 | } 809 | bias_filler { 810 | type: "constant" 811 | } 812 | dilation: 1 813 | } 814 | } 815 | layer { 816 | name: "concat_stage3" 817 | type: "Concat" 818 | bottom: "Mconv7_stage2" 819 | bottom: "conv5_3_CPM" 820 | top: "concat_stage3" 821 | concat_param { 822 | axis: 1 823 | } 824 | } 825 | layer { 826 | name: "Mconv1_stage3" 827 | type: "Convolution" 828 | bottom: "concat_stage3" 829 | top: "Mconv1_stage3" 830 | param { 831 | lr_mult: 4.0 832 | decay_mult: 1 833 | } 834 | param { 835 | lr_mult: 8.0 836 | decay_mult: 0 837 | } 838 | convolution_param { 839 | num_output: 128 840 | pad: 3 841 | kernel_size: 7 842 | weight_filler { 843 | type: "gaussian" 844 | std: 0.01 845 | } 846 | bias_filler { 847 | type: "constant" 848 | } 849 | dilation: 1 850 | } 851 | } 852 | layer { 853 | name: "Mrelu1_2_stage3_1" 854 | type: "ReLU" 855 | bottom: "Mconv1_stage3" 856 | top: "Mconv1_stage3" 857 | } 858 | layer { 859 | name: "Mconv2_stage3" 860 | type: "Convolution" 861 | bottom: "Mconv1_stage3" 862 | top: "Mconv2_stage3" 863 | param { 864 | lr_mult: 4.0 865 | decay_mult: 1 866 | } 867 | param { 868 | lr_mult: 8.0 869 | decay_mult: 0 870 | } 871 | convolution_param { 872 | num_output: 128 873 | pad: 3 874 | kernel_size: 7 875 | weight_filler { 876 | type: "gaussian" 877 | std: 0.01 878 | } 879 | bias_filler { 880 | type: "constant" 881 | } 882 | dilation: 1 883 | } 884 | } 885 | layer { 886 | name: "Mrelu1_3_stage3_2" 887 | type: "ReLU" 888 | bottom: "Mconv2_stage3" 889 | top: "Mconv2_stage3" 890 | } 891 | layer { 892 | name: "Mconv3_stage3" 893 | type: "Convolution" 894 | bottom: "Mconv2_stage3" 895 | top: "Mconv3_stage3" 896 | param { 897 | lr_mult: 4.0 898 | decay_mult: 1 899 | } 900 | param { 901 | lr_mult: 8.0 902 | decay_mult: 0 903 | } 904 | convolution_param { 905 | num_output: 128 906 | pad: 3 907 | kernel_size: 7 908 | weight_filler { 909 | type: "gaussian" 910 | std: 0.01 911 | } 912 | bias_filler { 913 | type: "constant" 914 | } 915 | dilation: 1 916 | } 917 | } 918 | layer { 919 | name: "Mrelu1_4_stage3_3" 920 | type: "ReLU" 921 | bottom: "Mconv3_stage3" 922 | top: "Mconv3_stage3" 923 | } 924 | layer { 925 | name: "Mconv4_stage3" 926 | type: "Convolution" 927 | bottom: "Mconv3_stage3" 928 | top: "Mconv4_stage3" 929 | param { 930 | lr_mult: 4.0 931 | decay_mult: 1 932 | } 933 | param { 934 | lr_mult: 8.0 935 | decay_mult: 0 936 | } 937 | convolution_param { 938 | num_output: 128 939 | pad: 3 940 | kernel_size: 7 941 | weight_filler { 942 | type: "gaussian" 943 | std: 0.01 944 | } 945 | bias_filler { 946 | type: "constant" 947 | } 948 | dilation: 1 949 | } 950 | } 951 | layer { 952 | name: "Mrelu1_5_stage3_4" 953 | type: "ReLU" 954 | bottom: "Mconv4_stage3" 955 | top: "Mconv4_stage3" 956 | } 957 | layer { 958 | name: "Mconv5_stage3" 959 | type: "Convolution" 960 | bottom: "Mconv4_stage3" 961 | top: "Mconv5_stage3" 962 | param { 963 | lr_mult: 4.0 964 | decay_mult: 1 965 | } 966 | param { 967 | lr_mult: 8.0 968 | decay_mult: 0 969 | } 970 | convolution_param { 971 | num_output: 128 972 | pad: 3 973 | kernel_size: 7 974 | weight_filler { 975 | type: "gaussian" 976 | std: 0.01 977 | } 978 | bias_filler { 979 | type: "constant" 980 | } 981 | dilation: 1 982 | } 983 | } 984 | layer { 985 | name: "Mrelu1_6_stage3_5" 986 | type: "ReLU" 987 | bottom: "Mconv5_stage3" 988 | top: "Mconv5_stage3" 989 | } 990 | layer { 991 | name: "Mconv6_stage3" 992 | type: "Convolution" 993 | bottom: "Mconv5_stage3" 994 | top: "Mconv6_stage3" 995 | param { 996 | lr_mult: 4.0 997 | decay_mult: 1 998 | } 999 | param { 1000 | lr_mult: 8.0 1001 | decay_mult: 0 1002 | } 1003 | convolution_param { 1004 | num_output: 128 1005 | pad: 0 1006 | kernel_size: 1 1007 | weight_filler { 1008 | type: "gaussian" 1009 | std: 0.01 1010 | } 1011 | bias_filler { 1012 | type: "constant" 1013 | } 1014 | dilation: 1 1015 | } 1016 | } 1017 | layer { 1018 | name: "Mrelu1_7_stage3_6" 1019 | type: "ReLU" 1020 | bottom: "Mconv6_stage3" 1021 | top: "Mconv6_stage3" 1022 | } 1023 | layer { 1024 | name: "Mconv7_stage3" 1025 | type: "Convolution" 1026 | bottom: "Mconv6_stage3" 1027 | top: "Mconv7_stage3" 1028 | param { 1029 | lr_mult: 4.0 1030 | decay_mult: 1 1031 | } 1032 | param { 1033 | lr_mult: 8.0 1034 | decay_mult: 0 1035 | } 1036 | convolution_param { 1037 | num_output: 22 1038 | pad: 0 1039 | kernel_size: 1 1040 | weight_filler { 1041 | type: "gaussian" 1042 | std: 0.01 1043 | } 1044 | bias_filler { 1045 | type: "constant" 1046 | } 1047 | dilation: 1 1048 | } 1049 | } 1050 | layer { 1051 | name: "concat_stage4" 1052 | type: "Concat" 1053 | bottom: "Mconv7_stage3" 1054 | bottom: "conv5_3_CPM" 1055 | top: "concat_stage4" 1056 | concat_param { 1057 | axis: 1 1058 | } 1059 | } 1060 | layer { 1061 | name: "Mconv1_stage4" 1062 | type: "Convolution" 1063 | bottom: "concat_stage4" 1064 | top: "Mconv1_stage4" 1065 | param { 1066 | lr_mult: 4.0 1067 | decay_mult: 1 1068 | } 1069 | param { 1070 | lr_mult: 8.0 1071 | decay_mult: 0 1072 | } 1073 | convolution_param { 1074 | num_output: 128 1075 | pad: 3 1076 | kernel_size: 7 1077 | weight_filler { 1078 | type: "gaussian" 1079 | std: 0.01 1080 | } 1081 | bias_filler { 1082 | type: "constant" 1083 | } 1084 | dilation: 1 1085 | } 1086 | } 1087 | layer { 1088 | name: "Mrelu1_2_stage4_1" 1089 | type: "ReLU" 1090 | bottom: "Mconv1_stage4" 1091 | top: "Mconv1_stage4" 1092 | } 1093 | layer { 1094 | name: "Mconv2_stage4" 1095 | type: "Convolution" 1096 | bottom: "Mconv1_stage4" 1097 | top: "Mconv2_stage4" 1098 | param { 1099 | lr_mult: 4.0 1100 | decay_mult: 1 1101 | } 1102 | param { 1103 | lr_mult: 8.0 1104 | decay_mult: 0 1105 | } 1106 | convolution_param { 1107 | num_output: 128 1108 | pad: 3 1109 | kernel_size: 7 1110 | weight_filler { 1111 | type: "gaussian" 1112 | std: 0.01 1113 | } 1114 | bias_filler { 1115 | type: "constant" 1116 | } 1117 | dilation: 1 1118 | } 1119 | } 1120 | layer { 1121 | name: "Mrelu1_3_stage4_2" 1122 | type: "ReLU" 1123 | bottom: "Mconv2_stage4" 1124 | top: "Mconv2_stage4" 1125 | } 1126 | layer { 1127 | name: "Mconv3_stage4" 1128 | type: "Convolution" 1129 | bottom: "Mconv2_stage4" 1130 | top: "Mconv3_stage4" 1131 | param { 1132 | lr_mult: 4.0 1133 | decay_mult: 1 1134 | } 1135 | param { 1136 | lr_mult: 8.0 1137 | decay_mult: 0 1138 | } 1139 | convolution_param { 1140 | num_output: 128 1141 | pad: 3 1142 | kernel_size: 7 1143 | weight_filler { 1144 | type: "gaussian" 1145 | std: 0.01 1146 | } 1147 | bias_filler { 1148 | type: "constant" 1149 | } 1150 | dilation: 1 1151 | } 1152 | } 1153 | layer { 1154 | name: "Mrelu1_4_stage4_3" 1155 | type: "ReLU" 1156 | bottom: "Mconv3_stage4" 1157 | top: "Mconv3_stage4" 1158 | } 1159 | layer { 1160 | name: "Mconv4_stage4" 1161 | type: "Convolution" 1162 | bottom: "Mconv3_stage4" 1163 | top: "Mconv4_stage4" 1164 | param { 1165 | lr_mult: 4.0 1166 | decay_mult: 1 1167 | } 1168 | param { 1169 | lr_mult: 8.0 1170 | decay_mult: 0 1171 | } 1172 | convolution_param { 1173 | num_output: 128 1174 | pad: 3 1175 | kernel_size: 7 1176 | weight_filler { 1177 | type: "gaussian" 1178 | std: 0.01 1179 | } 1180 | bias_filler { 1181 | type: "constant" 1182 | } 1183 | dilation: 1 1184 | } 1185 | } 1186 | layer { 1187 | name: "Mrelu1_5_stage4_4" 1188 | type: "ReLU" 1189 | bottom: "Mconv4_stage4" 1190 | top: "Mconv4_stage4" 1191 | } 1192 | layer { 1193 | name: "Mconv5_stage4" 1194 | type: "Convolution" 1195 | bottom: "Mconv4_stage4" 1196 | top: "Mconv5_stage4" 1197 | param { 1198 | lr_mult: 4.0 1199 | decay_mult: 1 1200 | } 1201 | param { 1202 | lr_mult: 8.0 1203 | decay_mult: 0 1204 | } 1205 | convolution_param { 1206 | num_output: 128 1207 | pad: 3 1208 | kernel_size: 7 1209 | weight_filler { 1210 | type: "gaussian" 1211 | std: 0.01 1212 | } 1213 | bias_filler { 1214 | type: "constant" 1215 | } 1216 | dilation: 1 1217 | } 1218 | } 1219 | layer { 1220 | name: "Mrelu1_6_stage4_5" 1221 | type: "ReLU" 1222 | bottom: "Mconv5_stage4" 1223 | top: "Mconv5_stage4" 1224 | } 1225 | layer { 1226 | name: "Mconv6_stage4" 1227 | type: "Convolution" 1228 | bottom: "Mconv5_stage4" 1229 | top: "Mconv6_stage4" 1230 | param { 1231 | lr_mult: 4.0 1232 | decay_mult: 1 1233 | } 1234 | param { 1235 | lr_mult: 8.0 1236 | decay_mult: 0 1237 | } 1238 | convolution_param { 1239 | num_output: 128 1240 | pad: 0 1241 | kernel_size: 1 1242 | weight_filler { 1243 | type: "gaussian" 1244 | std: 0.01 1245 | } 1246 | bias_filler { 1247 | type: "constant" 1248 | } 1249 | dilation: 1 1250 | } 1251 | } 1252 | layer { 1253 | name: "Mrelu1_7_stage4_6" 1254 | type: "ReLU" 1255 | bottom: "Mconv6_stage4" 1256 | top: "Mconv6_stage4" 1257 | } 1258 | layer { 1259 | name: "Mconv7_stage4" 1260 | type: "Convolution" 1261 | bottom: "Mconv6_stage4" 1262 | top: "Mconv7_stage4" 1263 | param { 1264 | lr_mult: 4.0 1265 | decay_mult: 1 1266 | } 1267 | param { 1268 | lr_mult: 8.0 1269 | decay_mult: 0 1270 | } 1271 | convolution_param { 1272 | num_output: 22 1273 | pad: 0 1274 | kernel_size: 1 1275 | weight_filler { 1276 | type: "gaussian" 1277 | std: 0.01 1278 | } 1279 | bias_filler { 1280 | type: "constant" 1281 | } 1282 | dilation: 1 1283 | } 1284 | } 1285 | layer { 1286 | name: "concat_stage5" 1287 | type: "Concat" 1288 | bottom: "Mconv7_stage4" 1289 | bottom: "conv5_3_CPM" 1290 | top: "concat_stage5" 1291 | concat_param { 1292 | axis: 1 1293 | } 1294 | } 1295 | layer { 1296 | name: "Mconv1_stage5" 1297 | type: "Convolution" 1298 | bottom: "concat_stage5" 1299 | top: "Mconv1_stage5" 1300 | param { 1301 | lr_mult: 4.0 1302 | decay_mult: 1 1303 | } 1304 | param { 1305 | lr_mult: 8.0 1306 | decay_mult: 0 1307 | } 1308 | convolution_param { 1309 | num_output: 128 1310 | pad: 3 1311 | kernel_size: 7 1312 | weight_filler { 1313 | type: "gaussian" 1314 | std: 0.01 1315 | } 1316 | bias_filler { 1317 | type: "constant" 1318 | } 1319 | dilation: 1 1320 | } 1321 | } 1322 | layer { 1323 | name: "Mrelu1_2_stage5_1" 1324 | type: "ReLU" 1325 | bottom: "Mconv1_stage5" 1326 | top: "Mconv1_stage5" 1327 | } 1328 | layer { 1329 | name: "Mconv2_stage5" 1330 | type: "Convolution" 1331 | bottom: "Mconv1_stage5" 1332 | top: "Mconv2_stage5" 1333 | param { 1334 | lr_mult: 4.0 1335 | decay_mult: 1 1336 | } 1337 | param { 1338 | lr_mult: 8.0 1339 | decay_mult: 0 1340 | } 1341 | convolution_param { 1342 | num_output: 128 1343 | pad: 3 1344 | kernel_size: 7 1345 | weight_filler { 1346 | type: "gaussian" 1347 | std: 0.01 1348 | } 1349 | bias_filler { 1350 | type: "constant" 1351 | } 1352 | dilation: 1 1353 | } 1354 | } 1355 | layer { 1356 | name: "Mrelu1_3_stage5_2" 1357 | type: "ReLU" 1358 | bottom: "Mconv2_stage5" 1359 | top: "Mconv2_stage5" 1360 | } 1361 | layer { 1362 | name: "Mconv3_stage5" 1363 | type: "Convolution" 1364 | bottom: "Mconv2_stage5" 1365 | top: "Mconv3_stage5" 1366 | param { 1367 | lr_mult: 4.0 1368 | decay_mult: 1 1369 | } 1370 | param { 1371 | lr_mult: 8.0 1372 | decay_mult: 0 1373 | } 1374 | convolution_param { 1375 | num_output: 128 1376 | pad: 3 1377 | kernel_size: 7 1378 | weight_filler { 1379 | type: "gaussian" 1380 | std: 0.01 1381 | } 1382 | bias_filler { 1383 | type: "constant" 1384 | } 1385 | dilation: 1 1386 | } 1387 | } 1388 | layer { 1389 | name: "Mrelu1_4_stage5_3" 1390 | type: "ReLU" 1391 | bottom: "Mconv3_stage5" 1392 | top: "Mconv3_stage5" 1393 | } 1394 | layer { 1395 | name: "Mconv4_stage5" 1396 | type: "Convolution" 1397 | bottom: "Mconv3_stage5" 1398 | top: "Mconv4_stage5" 1399 | param { 1400 | lr_mult: 4.0 1401 | decay_mult: 1 1402 | } 1403 | param { 1404 | lr_mult: 8.0 1405 | decay_mult: 0 1406 | } 1407 | convolution_param { 1408 | num_output: 128 1409 | pad: 3 1410 | kernel_size: 7 1411 | weight_filler { 1412 | type: "gaussian" 1413 | std: 0.01 1414 | } 1415 | bias_filler { 1416 | type: "constant" 1417 | } 1418 | dilation: 1 1419 | } 1420 | } 1421 | layer { 1422 | name: "Mrelu1_5_stage5_4" 1423 | type: "ReLU" 1424 | bottom: "Mconv4_stage5" 1425 | top: "Mconv4_stage5" 1426 | } 1427 | layer { 1428 | name: "Mconv5_stage5" 1429 | type: "Convolution" 1430 | bottom: "Mconv4_stage5" 1431 | top: "Mconv5_stage5" 1432 | param { 1433 | lr_mult: 4.0 1434 | decay_mult: 1 1435 | } 1436 | param { 1437 | lr_mult: 8.0 1438 | decay_mult: 0 1439 | } 1440 | convolution_param { 1441 | num_output: 128 1442 | pad: 3 1443 | kernel_size: 7 1444 | weight_filler { 1445 | type: "gaussian" 1446 | std: 0.01 1447 | } 1448 | bias_filler { 1449 | type: "constant" 1450 | } 1451 | dilation: 1 1452 | } 1453 | } 1454 | layer { 1455 | name: "Mrelu1_6_stage5_5" 1456 | type: "ReLU" 1457 | bottom: "Mconv5_stage5" 1458 | top: "Mconv5_stage5" 1459 | } 1460 | layer { 1461 | name: "Mconv6_stage5" 1462 | type: "Convolution" 1463 | bottom: "Mconv5_stage5" 1464 | top: "Mconv6_stage5" 1465 | param { 1466 | lr_mult: 4.0 1467 | decay_mult: 1 1468 | } 1469 | param { 1470 | lr_mult: 8.0 1471 | decay_mult: 0 1472 | } 1473 | convolution_param { 1474 | num_output: 128 1475 | pad: 0 1476 | kernel_size: 1 1477 | weight_filler { 1478 | type: "gaussian" 1479 | std: 0.01 1480 | } 1481 | bias_filler { 1482 | type: "constant" 1483 | } 1484 | dilation: 1 1485 | } 1486 | } 1487 | layer { 1488 | name: "Mrelu1_7_stage5_6" 1489 | type: "ReLU" 1490 | bottom: "Mconv6_stage5" 1491 | top: "Mconv6_stage5" 1492 | } 1493 | layer { 1494 | name: "Mconv7_stage5" 1495 | type: "Convolution" 1496 | bottom: "Mconv6_stage5" 1497 | top: "Mconv7_stage5" 1498 | param { 1499 | lr_mult: 4.0 1500 | decay_mult: 1 1501 | } 1502 | param { 1503 | lr_mult: 8.0 1504 | decay_mult: 0 1505 | } 1506 | convolution_param { 1507 | num_output: 22 1508 | pad: 0 1509 | kernel_size: 1 1510 | weight_filler { 1511 | type: "gaussian" 1512 | std: 0.01 1513 | } 1514 | bias_filler { 1515 | type: "constant" 1516 | } 1517 | dilation: 1 1518 | } 1519 | } 1520 | layer { 1521 | name: "concat_stage6" 1522 | type: "Concat" 1523 | bottom: "Mconv7_stage5" 1524 | bottom: "conv5_3_CPM" 1525 | top: "concat_stage6" 1526 | concat_param { 1527 | axis: 1 1528 | } 1529 | } 1530 | layer { 1531 | name: "Mconv1_stage6" 1532 | type: "Convolution" 1533 | bottom: "concat_stage6" 1534 | top: "Mconv1_stage6" 1535 | param { 1536 | lr_mult: 4.0 1537 | decay_mult: 1 1538 | } 1539 | param { 1540 | lr_mult: 8.0 1541 | decay_mult: 0 1542 | } 1543 | convolution_param { 1544 | num_output: 128 1545 | pad: 3 1546 | kernel_size: 7 1547 | weight_filler { 1548 | type: "gaussian" 1549 | std: 0.01 1550 | } 1551 | bias_filler { 1552 | type: "constant" 1553 | } 1554 | dilation: 1 1555 | } 1556 | } 1557 | layer { 1558 | name: "Mrelu1_2_stage6_1" 1559 | type: "ReLU" 1560 | bottom: "Mconv1_stage6" 1561 | top: "Mconv1_stage6" 1562 | } 1563 | layer { 1564 | name: "Mconv2_stage6" 1565 | type: "Convolution" 1566 | bottom: "Mconv1_stage6" 1567 | top: "Mconv2_stage6" 1568 | param { 1569 | lr_mult: 4.0 1570 | decay_mult: 1 1571 | } 1572 | param { 1573 | lr_mult: 8.0 1574 | decay_mult: 0 1575 | } 1576 | convolution_param { 1577 | num_output: 128 1578 | pad: 3 1579 | kernel_size: 7 1580 | weight_filler { 1581 | type: "gaussian" 1582 | std: 0.01 1583 | } 1584 | bias_filler { 1585 | type: "constant" 1586 | } 1587 | dilation: 1 1588 | } 1589 | } 1590 | layer { 1591 | name: "Mrelu1_3_stage6_2" 1592 | type: "ReLU" 1593 | bottom: "Mconv2_stage6" 1594 | top: "Mconv2_stage6" 1595 | } 1596 | layer { 1597 | name: "Mconv3_stage6" 1598 | type: "Convolution" 1599 | bottom: "Mconv2_stage6" 1600 | top: "Mconv3_stage6" 1601 | param { 1602 | lr_mult: 4.0 1603 | decay_mult: 1 1604 | } 1605 | param { 1606 | lr_mult: 8.0 1607 | decay_mult: 0 1608 | } 1609 | convolution_param { 1610 | num_output: 128 1611 | pad: 3 1612 | kernel_size: 7 1613 | weight_filler { 1614 | type: "gaussian" 1615 | std: 0.01 1616 | } 1617 | bias_filler { 1618 | type: "constant" 1619 | } 1620 | dilation: 1 1621 | } 1622 | } 1623 | layer { 1624 | name: "Mrelu1_4_stage6_3" 1625 | type: "ReLU" 1626 | bottom: "Mconv3_stage6" 1627 | top: "Mconv3_stage6" 1628 | } 1629 | layer { 1630 | name: "Mconv4_stage6" 1631 | type: "Convolution" 1632 | bottom: "Mconv3_stage6" 1633 | top: "Mconv4_stage6" 1634 | param { 1635 | lr_mult: 4.0 1636 | decay_mult: 1 1637 | } 1638 | param { 1639 | lr_mult: 8.0 1640 | decay_mult: 0 1641 | } 1642 | convolution_param { 1643 | num_output: 128 1644 | pad: 3 1645 | kernel_size: 7 1646 | weight_filler { 1647 | type: "gaussian" 1648 | std: 0.01 1649 | } 1650 | bias_filler { 1651 | type: "constant" 1652 | } 1653 | dilation: 1 1654 | } 1655 | } 1656 | layer { 1657 | name: "Mrelu1_5_stage6_4" 1658 | type: "ReLU" 1659 | bottom: "Mconv4_stage6" 1660 | top: "Mconv4_stage6" 1661 | } 1662 | layer { 1663 | name: "Mconv5_stage6" 1664 | type: "Convolution" 1665 | bottom: "Mconv4_stage6" 1666 | top: "Mconv5_stage6" 1667 | param { 1668 | lr_mult: 4.0 1669 | decay_mult: 1 1670 | } 1671 | param { 1672 | lr_mult: 8.0 1673 | decay_mult: 0 1674 | } 1675 | convolution_param { 1676 | num_output: 128 1677 | pad: 3 1678 | kernel_size: 7 1679 | weight_filler { 1680 | type: "gaussian" 1681 | std: 0.01 1682 | } 1683 | bias_filler { 1684 | type: "constant" 1685 | } 1686 | dilation: 1 1687 | } 1688 | } 1689 | layer { 1690 | name: "Mrelu1_6_stage6_5" 1691 | type: "ReLU" 1692 | bottom: "Mconv5_stage6" 1693 | top: "Mconv5_stage6" 1694 | } 1695 | layer { 1696 | name: "Mconv6_stage6" 1697 | type: "Convolution" 1698 | bottom: "Mconv5_stage6" 1699 | top: "Mconv6_stage6" 1700 | param { 1701 | lr_mult: 4.0 1702 | decay_mult: 1 1703 | } 1704 | param { 1705 | lr_mult: 8.0 1706 | decay_mult: 0 1707 | } 1708 | convolution_param { 1709 | num_output: 128 1710 | pad: 0 1711 | kernel_size: 1 1712 | weight_filler { 1713 | type: "gaussian" 1714 | std: 0.01 1715 | } 1716 | bias_filler { 1717 | type: "constant" 1718 | } 1719 | dilation: 1 1720 | } 1721 | } 1722 | layer { 1723 | name: "Mrelu1_7_stage6_6" 1724 | type: "ReLU" 1725 | bottom: "Mconv6_stage6" 1726 | top: "Mconv6_stage6" 1727 | } 1728 | layer { 1729 | name: "Mconv7_stage6" 1730 | type: "Convolution" 1731 | bottom: "Mconv6_stage6" 1732 | # top: "Mconv7_stage6" 1733 | top: "net_output" 1734 | param { 1735 | lr_mult: 4.0 1736 | decay_mult: 1 1737 | } 1738 | param { 1739 | lr_mult: 8.0 1740 | decay_mult: 0 1741 | } 1742 | convolution_param { 1743 | num_output: 22 1744 | pad: 0 1745 | kernel_size: 1 1746 | weight_filler { 1747 | type: "gaussian" 1748 | std: 0.01 1749 | } 1750 | bias_filler { 1751 | type: "constant" 1752 | } 1753 | dilation: 1 1754 | } 1755 | } 1756 | 1757 | -------------------------------------------------------------------------------- /models/pose/mpi/pose_deploy_linevec_faster_4_stages.prototxt: -------------------------------------------------------------------------------- 1 | input: "image" 2 | input_dim: 1 3 | input_dim: 3 4 | input_dim: 1 # This value will be defined at runtime 5 | input_dim: 1 # This value will be defined at runtime 6 | layer { 7 | name: "conv1_1" 8 | type: "Convolution" 9 | bottom: "image" 10 | top: "conv1_1" 11 | param { 12 | lr_mult: 1.0 13 | decay_mult: 1 14 | } 15 | param { 16 | lr_mult: 2.0 17 | decay_mult: 0 18 | } 19 | convolution_param { 20 | num_output: 64 21 | pad: 1 22 | kernel_size: 3 23 | weight_filler { 24 | type: "gaussian" 25 | std: 0.01 26 | } 27 | bias_filler { 28 | type: "constant" 29 | } 30 | } 31 | } 32 | layer { 33 | name: "relu1_1" 34 | type: "ReLU" 35 | bottom: "conv1_1" 36 | top: "conv1_1" 37 | } 38 | layer { 39 | name: "conv1_2" 40 | type: "Convolution" 41 | bottom: "conv1_1" 42 | top: "conv1_2" 43 | param { 44 | lr_mult: 1.0 45 | decay_mult: 1 46 | } 47 | param { 48 | lr_mult: 2.0 49 | decay_mult: 0 50 | } 51 | convolution_param { 52 | num_output: 64 53 | pad: 1 54 | kernel_size: 3 55 | weight_filler { 56 | type: "gaussian" 57 | std: 0.01 58 | } 59 | bias_filler { 60 | type: "constant" 61 | } 62 | } 63 | } 64 | layer { 65 | name: "relu1_2" 66 | type: "ReLU" 67 | bottom: "conv1_2" 68 | top: "conv1_2" 69 | } 70 | layer { 71 | name: "pool1_stage1" 72 | type: "Pooling" 73 | bottom: "conv1_2" 74 | top: "pool1_stage1" 75 | pooling_param { 76 | pool: MAX 77 | kernel_size: 2 78 | stride: 2 79 | } 80 | } 81 | layer { 82 | name: "conv2_1" 83 | type: "Convolution" 84 | bottom: "pool1_stage1" 85 | top: "conv2_1" 86 | param { 87 | lr_mult: 1.0 88 | decay_mult: 1 89 | } 90 | param { 91 | lr_mult: 2.0 92 | decay_mult: 0 93 | } 94 | convolution_param { 95 | num_output: 128 96 | pad: 1 97 | kernel_size: 3 98 | weight_filler { 99 | type: "gaussian" 100 | std: 0.01 101 | } 102 | bias_filler { 103 | type: "constant" 104 | } 105 | } 106 | } 107 | layer { 108 | name: "relu2_1" 109 | type: "ReLU" 110 | bottom: "conv2_1" 111 | top: "conv2_1" 112 | } 113 | layer { 114 | name: "conv2_2" 115 | type: "Convolution" 116 | bottom: "conv2_1" 117 | top: "conv2_2" 118 | param { 119 | lr_mult: 1.0 120 | decay_mult: 1 121 | } 122 | param { 123 | lr_mult: 2.0 124 | decay_mult: 0 125 | } 126 | convolution_param { 127 | num_output: 128 128 | pad: 1 129 | kernel_size: 3 130 | weight_filler { 131 | type: "gaussian" 132 | std: 0.01 133 | } 134 | bias_filler { 135 | type: "constant" 136 | } 137 | } 138 | } 139 | layer { 140 | name: "relu2_2" 141 | type: "ReLU" 142 | bottom: "conv2_2" 143 | top: "conv2_2" 144 | } 145 | layer { 146 | name: "pool2_stage1" 147 | type: "Pooling" 148 | bottom: "conv2_2" 149 | top: "pool2_stage1" 150 | pooling_param { 151 | pool: MAX 152 | kernel_size: 2 153 | stride: 2 154 | } 155 | } 156 | layer { 157 | name: "conv3_1" 158 | type: "Convolution" 159 | bottom: "pool2_stage1" 160 | top: "conv3_1" 161 | param { 162 | lr_mult: 1.0 163 | decay_mult: 1 164 | } 165 | param { 166 | lr_mult: 2.0 167 | decay_mult: 0 168 | } 169 | convolution_param { 170 | num_output: 256 171 | pad: 1 172 | kernel_size: 3 173 | weight_filler { 174 | type: "gaussian" 175 | std: 0.01 176 | } 177 | bias_filler { 178 | type: "constant" 179 | } 180 | } 181 | } 182 | layer { 183 | name: "relu3_1" 184 | type: "ReLU" 185 | bottom: "conv3_1" 186 | top: "conv3_1" 187 | } 188 | layer { 189 | name: "conv3_2" 190 | type: "Convolution" 191 | bottom: "conv3_1" 192 | top: "conv3_2" 193 | param { 194 | lr_mult: 1.0 195 | decay_mult: 1 196 | } 197 | param { 198 | lr_mult: 2.0 199 | decay_mult: 0 200 | } 201 | convolution_param { 202 | num_output: 256 203 | pad: 1 204 | kernel_size: 3 205 | weight_filler { 206 | type: "gaussian" 207 | std: 0.01 208 | } 209 | bias_filler { 210 | type: "constant" 211 | } 212 | } 213 | } 214 | layer { 215 | name: "relu3_2" 216 | type: "ReLU" 217 | bottom: "conv3_2" 218 | top: "conv3_2" 219 | } 220 | layer { 221 | name: "conv3_3" 222 | type: "Convolution" 223 | bottom: "conv3_2" 224 | top: "conv3_3" 225 | param { 226 | lr_mult: 1.0 227 | decay_mult: 1 228 | } 229 | param { 230 | lr_mult: 2.0 231 | decay_mult: 0 232 | } 233 | convolution_param { 234 | num_output: 256 235 | pad: 1 236 | kernel_size: 3 237 | weight_filler { 238 | type: "gaussian" 239 | std: 0.01 240 | } 241 | bias_filler { 242 | type: "constant" 243 | } 244 | } 245 | } 246 | layer { 247 | name: "relu3_3" 248 | type: "ReLU" 249 | bottom: "conv3_3" 250 | top: "conv3_3" 251 | } 252 | layer { 253 | name: "conv3_4" 254 | type: "Convolution" 255 | bottom: "conv3_3" 256 | top: "conv3_4" 257 | param { 258 | lr_mult: 1.0 259 | decay_mult: 1 260 | } 261 | param { 262 | lr_mult: 2.0 263 | decay_mult: 0 264 | } 265 | convolution_param { 266 | num_output: 256 267 | pad: 1 268 | kernel_size: 3 269 | weight_filler { 270 | type: "gaussian" 271 | std: 0.01 272 | } 273 | bias_filler { 274 | type: "constant" 275 | } 276 | } 277 | } 278 | layer { 279 | name: "relu3_4" 280 | type: "ReLU" 281 | bottom: "conv3_4" 282 | top: "conv3_4" 283 | } 284 | layer { 285 | name: "pool3_stage1" 286 | type: "Pooling" 287 | bottom: "conv3_4" 288 | top: "pool3_stage1" 289 | pooling_param { 290 | pool: MAX 291 | kernel_size: 2 292 | stride: 2 293 | } 294 | } 295 | layer { 296 | name: "conv4_1" 297 | type: "Convolution" 298 | bottom: "pool3_stage1" 299 | top: "conv4_1" 300 | param { 301 | lr_mult: 1.0 302 | decay_mult: 1 303 | } 304 | param { 305 | lr_mult: 2.0 306 | decay_mult: 0 307 | } 308 | convolution_param { 309 | num_output: 512 310 | pad: 1 311 | kernel_size: 3 312 | weight_filler { 313 | type: "gaussian" 314 | std: 0.01 315 | } 316 | bias_filler { 317 | type: "constant" 318 | } 319 | } 320 | } 321 | layer { 322 | name: "relu4_1" 323 | type: "ReLU" 324 | bottom: "conv4_1" 325 | top: "conv4_1" 326 | } 327 | layer { 328 | name: "conv4_2" 329 | type: "Convolution" 330 | bottom: "conv4_1" 331 | top: "conv4_2" 332 | param { 333 | lr_mult: 1.0 334 | decay_mult: 1 335 | } 336 | param { 337 | lr_mult: 2.0 338 | decay_mult: 0 339 | } 340 | convolution_param { 341 | num_output: 512 342 | pad: 1 343 | kernel_size: 3 344 | weight_filler { 345 | type: "gaussian" 346 | std: 0.01 347 | } 348 | bias_filler { 349 | type: "constant" 350 | } 351 | } 352 | } 353 | layer { 354 | name: "relu4_2" 355 | type: "ReLU" 356 | bottom: "conv4_2" 357 | top: "conv4_2" 358 | } 359 | layer { 360 | name: "conv4_3_CPM" 361 | type: "Convolution" 362 | bottom: "conv4_2" 363 | top: "conv4_3_CPM" 364 | param { 365 | lr_mult: 1.0 366 | decay_mult: 1 367 | } 368 | param { 369 | lr_mult: 2.0 370 | decay_mult: 0 371 | } 372 | convolution_param { 373 | num_output: 256 374 | pad: 1 375 | kernel_size: 3 376 | weight_filler { 377 | type: "gaussian" 378 | std: 0.01 379 | } 380 | bias_filler { 381 | type: "constant" 382 | } 383 | } 384 | } 385 | layer { 386 | name: "relu4_3_CPM" 387 | type: "ReLU" 388 | bottom: "conv4_3_CPM" 389 | top: "conv4_3_CPM" 390 | } 391 | layer { 392 | name: "conv4_4_CPM" 393 | type: "Convolution" 394 | bottom: "conv4_3_CPM" 395 | top: "conv4_4_CPM" 396 | param { 397 | lr_mult: 1.0 398 | decay_mult: 1 399 | } 400 | param { 401 | lr_mult: 2.0 402 | decay_mult: 0 403 | } 404 | convolution_param { 405 | num_output: 128 406 | pad: 1 407 | kernel_size: 3 408 | weight_filler { 409 | type: "gaussian" 410 | std: 0.01 411 | } 412 | bias_filler { 413 | type: "constant" 414 | } 415 | } 416 | } 417 | layer { 418 | name: "relu4_4_CPM" 419 | type: "ReLU" 420 | bottom: "conv4_4_CPM" 421 | top: "conv4_4_CPM" 422 | } 423 | layer { 424 | name: "conv5_1_CPM_L1" 425 | type: "Convolution" 426 | bottom: "conv4_4_CPM" 427 | top: "conv5_1_CPM_L1" 428 | param { 429 | lr_mult: 1.0 430 | decay_mult: 1 431 | } 432 | param { 433 | lr_mult: 2.0 434 | decay_mult: 0 435 | } 436 | convolution_param { 437 | num_output: 128 438 | pad: 1 439 | kernel_size: 3 440 | weight_filler { 441 | type: "gaussian" 442 | std: 0.01 443 | } 444 | bias_filler { 445 | type: "constant" 446 | } 447 | } 448 | } 449 | layer { 450 | name: "relu5_1_CPM_L1" 451 | type: "ReLU" 452 | bottom: "conv5_1_CPM_L1" 453 | top: "conv5_1_CPM_L1" 454 | } 455 | layer { 456 | name: "conv5_1_CPM_L2" 457 | type: "Convolution" 458 | bottom: "conv4_4_CPM" 459 | top: "conv5_1_CPM_L2" 460 | param { 461 | lr_mult: 1.0 462 | decay_mult: 1 463 | } 464 | param { 465 | lr_mult: 2.0 466 | decay_mult: 0 467 | } 468 | convolution_param { 469 | num_output: 128 470 | pad: 1 471 | kernel_size: 3 472 | weight_filler { 473 | type: "gaussian" 474 | std: 0.01 475 | } 476 | bias_filler { 477 | type: "constant" 478 | } 479 | } 480 | } 481 | layer { 482 | name: "relu5_1_CPM_L2" 483 | type: "ReLU" 484 | bottom: "conv5_1_CPM_L2" 485 | top: "conv5_1_CPM_L2" 486 | } 487 | layer { 488 | name: "conv5_2_CPM_L1" 489 | type: "Convolution" 490 | bottom: "conv5_1_CPM_L1" 491 | top: "conv5_2_CPM_L1" 492 | param { 493 | lr_mult: 1.0 494 | decay_mult: 1 495 | } 496 | param { 497 | lr_mult: 2.0 498 | decay_mult: 0 499 | } 500 | convolution_param { 501 | num_output: 128 502 | pad: 1 503 | kernel_size: 3 504 | weight_filler { 505 | type: "gaussian" 506 | std: 0.01 507 | } 508 | bias_filler { 509 | type: "constant" 510 | } 511 | } 512 | } 513 | layer { 514 | name: "relu5_2_CPM_L1" 515 | type: "ReLU" 516 | bottom: "conv5_2_CPM_L1" 517 | top: "conv5_2_CPM_L1" 518 | } 519 | layer { 520 | name: "conv5_2_CPM_L2" 521 | type: "Convolution" 522 | bottom: "conv5_1_CPM_L2" 523 | top: "conv5_2_CPM_L2" 524 | param { 525 | lr_mult: 1.0 526 | decay_mult: 1 527 | } 528 | param { 529 | lr_mult: 2.0 530 | decay_mult: 0 531 | } 532 | convolution_param { 533 | num_output: 128 534 | pad: 1 535 | kernel_size: 3 536 | weight_filler { 537 | type: "gaussian" 538 | std: 0.01 539 | } 540 | bias_filler { 541 | type: "constant" 542 | } 543 | } 544 | } 545 | layer { 546 | name: "relu5_2_CPM_L2" 547 | type: "ReLU" 548 | bottom: "conv5_2_CPM_L2" 549 | top: "conv5_2_CPM_L2" 550 | } 551 | layer { 552 | name: "conv5_3_CPM_L1" 553 | type: "Convolution" 554 | bottom: "conv5_2_CPM_L1" 555 | top: "conv5_3_CPM_L1" 556 | param { 557 | lr_mult: 1.0 558 | decay_mult: 1 559 | } 560 | param { 561 | lr_mult: 2.0 562 | decay_mult: 0 563 | } 564 | convolution_param { 565 | num_output: 128 566 | pad: 1 567 | kernel_size: 3 568 | weight_filler { 569 | type: "gaussian" 570 | std: 0.01 571 | } 572 | bias_filler { 573 | type: "constant" 574 | } 575 | } 576 | } 577 | layer { 578 | name: "relu5_3_CPM_L1" 579 | type: "ReLU" 580 | bottom: "conv5_3_CPM_L1" 581 | top: "conv5_3_CPM_L1" 582 | } 583 | layer { 584 | name: "conv5_3_CPM_L2" 585 | type: "Convolution" 586 | bottom: "conv5_2_CPM_L2" 587 | top: "conv5_3_CPM_L2" 588 | param { 589 | lr_mult: 1.0 590 | decay_mult: 1 591 | } 592 | param { 593 | lr_mult: 2.0 594 | decay_mult: 0 595 | } 596 | convolution_param { 597 | num_output: 128 598 | pad: 1 599 | kernel_size: 3 600 | weight_filler { 601 | type: "gaussian" 602 | std: 0.01 603 | } 604 | bias_filler { 605 | type: "constant" 606 | } 607 | } 608 | } 609 | layer { 610 | name: "relu5_3_CPM_L2" 611 | type: "ReLU" 612 | bottom: "conv5_3_CPM_L2" 613 | top: "conv5_3_CPM_L2" 614 | } 615 | layer { 616 | name: "conv5_4_CPM_L1" 617 | type: "Convolution" 618 | bottom: "conv5_3_CPM_L1" 619 | top: "conv5_4_CPM_L1" 620 | param { 621 | lr_mult: 1.0 622 | decay_mult: 1 623 | } 624 | param { 625 | lr_mult: 2.0 626 | decay_mult: 0 627 | } 628 | convolution_param { 629 | num_output: 512 630 | pad: 0 631 | kernel_size: 1 632 | weight_filler { 633 | type: "gaussian" 634 | std: 0.01 635 | } 636 | bias_filler { 637 | type: "constant" 638 | } 639 | } 640 | } 641 | layer { 642 | name: "relu5_4_CPM_L1" 643 | type: "ReLU" 644 | bottom: "conv5_4_CPM_L1" 645 | top: "conv5_4_CPM_L1" 646 | } 647 | layer { 648 | name: "conv5_4_CPM_L2" 649 | type: "Convolution" 650 | bottom: "conv5_3_CPM_L2" 651 | top: "conv5_4_CPM_L2" 652 | param { 653 | lr_mult: 1.0 654 | decay_mult: 1 655 | } 656 | param { 657 | lr_mult: 2.0 658 | decay_mult: 0 659 | } 660 | convolution_param { 661 | num_output: 512 662 | pad: 0 663 | kernel_size: 1 664 | weight_filler { 665 | type: "gaussian" 666 | std: 0.01 667 | } 668 | bias_filler { 669 | type: "constant" 670 | } 671 | } 672 | } 673 | layer { 674 | name: "relu5_4_CPM_L2" 675 | type: "ReLU" 676 | bottom: "conv5_4_CPM_L2" 677 | top: "conv5_4_CPM_L2" 678 | } 679 | layer { 680 | name: "conv5_5_CPM_L1" 681 | type: "Convolution" 682 | bottom: "conv5_4_CPM_L1" 683 | top: "conv5_5_CPM_L1" 684 | param { 685 | lr_mult: 1.0 686 | decay_mult: 1 687 | } 688 | param { 689 | lr_mult: 2.0 690 | decay_mult: 0 691 | } 692 | convolution_param { 693 | num_output: 28 694 | pad: 0 695 | kernel_size: 1 696 | weight_filler { 697 | type: "gaussian" 698 | std: 0.01 699 | } 700 | bias_filler { 701 | type: "constant" 702 | } 703 | } 704 | } 705 | layer { 706 | name: "conv5_5_CPM_L2" 707 | type: "Convolution" 708 | bottom: "conv5_4_CPM_L2" 709 | top: "conv5_5_CPM_L2" 710 | param { 711 | lr_mult: 1.0 712 | decay_mult: 1 713 | } 714 | param { 715 | lr_mult: 2.0 716 | decay_mult: 0 717 | } 718 | convolution_param { 719 | num_output: 16 720 | pad: 0 721 | kernel_size: 1 722 | weight_filler { 723 | type: "gaussian" 724 | std: 0.01 725 | } 726 | bias_filler { 727 | type: "constant" 728 | } 729 | } 730 | } 731 | layer { 732 | name: "concat_stage2" 733 | type: "Concat" 734 | bottom: "conv5_5_CPM_L1" 735 | bottom: "conv5_5_CPM_L2" 736 | bottom: "conv4_4_CPM" 737 | top: "concat_stage2" 738 | concat_param { 739 | axis: 1 740 | } 741 | } 742 | layer { 743 | name: "Mconv1_stage2_L1" 744 | type: "Convolution" 745 | bottom: "concat_stage2" 746 | top: "Mconv1_stage2_L1" 747 | param { 748 | lr_mult: 4.0 749 | decay_mult: 1 750 | } 751 | param { 752 | lr_mult: 8.0 753 | decay_mult: 0 754 | } 755 | convolution_param { 756 | num_output: 128 757 | pad: 3 758 | kernel_size: 7 759 | weight_filler { 760 | type: "gaussian" 761 | std: 0.01 762 | } 763 | bias_filler { 764 | type: "constant" 765 | } 766 | } 767 | } 768 | layer { 769 | name: "Mrelu1_stage2_L1" 770 | type: "ReLU" 771 | bottom: "Mconv1_stage2_L1" 772 | top: "Mconv1_stage2_L1" 773 | } 774 | layer { 775 | name: "Mconv1_stage2_L2" 776 | type: "Convolution" 777 | bottom: "concat_stage2" 778 | top: "Mconv1_stage2_L2" 779 | param { 780 | lr_mult: 4.0 781 | decay_mult: 1 782 | } 783 | param { 784 | lr_mult: 8.0 785 | decay_mult: 0 786 | } 787 | convolution_param { 788 | num_output: 128 789 | pad: 3 790 | kernel_size: 7 791 | weight_filler { 792 | type: "gaussian" 793 | std: 0.01 794 | } 795 | bias_filler { 796 | type: "constant" 797 | } 798 | } 799 | } 800 | layer { 801 | name: "Mrelu1_stage2_L2" 802 | type: "ReLU" 803 | bottom: "Mconv1_stage2_L2" 804 | top: "Mconv1_stage2_L2" 805 | } 806 | layer { 807 | name: "Mconv2_stage2_L1" 808 | type: "Convolution" 809 | bottom: "Mconv1_stage2_L1" 810 | top: "Mconv2_stage2_L1" 811 | param { 812 | lr_mult: 4.0 813 | decay_mult: 1 814 | } 815 | param { 816 | lr_mult: 8.0 817 | decay_mult: 0 818 | } 819 | convolution_param { 820 | num_output: 128 821 | pad: 3 822 | kernel_size: 7 823 | weight_filler { 824 | type: "gaussian" 825 | std: 0.01 826 | } 827 | bias_filler { 828 | type: "constant" 829 | } 830 | } 831 | } 832 | layer { 833 | name: "Mrelu2_stage2_L1" 834 | type: "ReLU" 835 | bottom: "Mconv2_stage2_L1" 836 | top: "Mconv2_stage2_L1" 837 | } 838 | layer { 839 | name: "Mconv2_stage2_L2" 840 | type: "Convolution" 841 | bottom: "Mconv1_stage2_L2" 842 | top: "Mconv2_stage2_L2" 843 | param { 844 | lr_mult: 4.0 845 | decay_mult: 1 846 | } 847 | param { 848 | lr_mult: 8.0 849 | decay_mult: 0 850 | } 851 | convolution_param { 852 | num_output: 128 853 | pad: 3 854 | kernel_size: 7 855 | weight_filler { 856 | type: "gaussian" 857 | std: 0.01 858 | } 859 | bias_filler { 860 | type: "constant" 861 | } 862 | } 863 | } 864 | layer { 865 | name: "Mrelu2_stage2_L2" 866 | type: "ReLU" 867 | bottom: "Mconv2_stage2_L2" 868 | top: "Mconv2_stage2_L2" 869 | } 870 | layer { 871 | name: "Mconv3_stage2_L1" 872 | type: "Convolution" 873 | bottom: "Mconv2_stage2_L1" 874 | top: "Mconv3_stage2_L1" 875 | param { 876 | lr_mult: 4.0 877 | decay_mult: 1 878 | } 879 | param { 880 | lr_mult: 8.0 881 | decay_mult: 0 882 | } 883 | convolution_param { 884 | num_output: 128 885 | pad: 3 886 | kernel_size: 7 887 | weight_filler { 888 | type: "gaussian" 889 | std: 0.01 890 | } 891 | bias_filler { 892 | type: "constant" 893 | } 894 | } 895 | } 896 | layer { 897 | name: "Mrelu3_stage2_L1" 898 | type: "ReLU" 899 | bottom: "Mconv3_stage2_L1" 900 | top: "Mconv3_stage2_L1" 901 | } 902 | layer { 903 | name: "Mconv3_stage2_L2" 904 | type: "Convolution" 905 | bottom: "Mconv2_stage2_L2" 906 | top: "Mconv3_stage2_L2" 907 | param { 908 | lr_mult: 4.0 909 | decay_mult: 1 910 | } 911 | param { 912 | lr_mult: 8.0 913 | decay_mult: 0 914 | } 915 | convolution_param { 916 | num_output: 128 917 | pad: 3 918 | kernel_size: 7 919 | weight_filler { 920 | type: "gaussian" 921 | std: 0.01 922 | } 923 | bias_filler { 924 | type: "constant" 925 | } 926 | } 927 | } 928 | layer { 929 | name: "Mrelu3_stage2_L2" 930 | type: "ReLU" 931 | bottom: "Mconv3_stage2_L2" 932 | top: "Mconv3_stage2_L2" 933 | } 934 | layer { 935 | name: "Mconv4_stage2_L1" 936 | type: "Convolution" 937 | bottom: "Mconv3_stage2_L1" 938 | top: "Mconv4_stage2_L1" 939 | param { 940 | lr_mult: 4.0 941 | decay_mult: 1 942 | } 943 | param { 944 | lr_mult: 8.0 945 | decay_mult: 0 946 | } 947 | convolution_param { 948 | num_output: 128 949 | pad: 3 950 | kernel_size: 7 951 | weight_filler { 952 | type: "gaussian" 953 | std: 0.01 954 | } 955 | bias_filler { 956 | type: "constant" 957 | } 958 | } 959 | } 960 | layer { 961 | name: "Mrelu4_stage2_L1" 962 | type: "ReLU" 963 | bottom: "Mconv4_stage2_L1" 964 | top: "Mconv4_stage2_L1" 965 | } 966 | layer { 967 | name: "Mconv4_stage2_L2" 968 | type: "Convolution" 969 | bottom: "Mconv3_stage2_L2" 970 | top: "Mconv4_stage2_L2" 971 | param { 972 | lr_mult: 4.0 973 | decay_mult: 1 974 | } 975 | param { 976 | lr_mult: 8.0 977 | decay_mult: 0 978 | } 979 | convolution_param { 980 | num_output: 128 981 | pad: 3 982 | kernel_size: 7 983 | weight_filler { 984 | type: "gaussian" 985 | std: 0.01 986 | } 987 | bias_filler { 988 | type: "constant" 989 | } 990 | } 991 | } 992 | layer { 993 | name: "Mrelu4_stage2_L2" 994 | type: "ReLU" 995 | bottom: "Mconv4_stage2_L2" 996 | top: "Mconv4_stage2_L2" 997 | } 998 | layer { 999 | name: "Mconv5_stage2_L1" 1000 | type: "Convolution" 1001 | bottom: "Mconv4_stage2_L1" 1002 | top: "Mconv5_stage2_L1" 1003 | param { 1004 | lr_mult: 4.0 1005 | decay_mult: 1 1006 | } 1007 | param { 1008 | lr_mult: 8.0 1009 | decay_mult: 0 1010 | } 1011 | convolution_param { 1012 | num_output: 128 1013 | pad: 3 1014 | kernel_size: 7 1015 | weight_filler { 1016 | type: "gaussian" 1017 | std: 0.01 1018 | } 1019 | bias_filler { 1020 | type: "constant" 1021 | } 1022 | } 1023 | } 1024 | layer { 1025 | name: "Mrelu5_stage2_L1" 1026 | type: "ReLU" 1027 | bottom: "Mconv5_stage2_L1" 1028 | top: "Mconv5_stage2_L1" 1029 | } 1030 | layer { 1031 | name: "Mconv5_stage2_L2" 1032 | type: "Convolution" 1033 | bottom: "Mconv4_stage2_L2" 1034 | top: "Mconv5_stage2_L2" 1035 | param { 1036 | lr_mult: 4.0 1037 | decay_mult: 1 1038 | } 1039 | param { 1040 | lr_mult: 8.0 1041 | decay_mult: 0 1042 | } 1043 | convolution_param { 1044 | num_output: 128 1045 | pad: 3 1046 | kernel_size: 7 1047 | weight_filler { 1048 | type: "gaussian" 1049 | std: 0.01 1050 | } 1051 | bias_filler { 1052 | type: "constant" 1053 | } 1054 | } 1055 | } 1056 | layer { 1057 | name: "Mrelu5_stage2_L2" 1058 | type: "ReLU" 1059 | bottom: "Mconv5_stage2_L2" 1060 | top: "Mconv5_stage2_L2" 1061 | } 1062 | layer { 1063 | name: "Mconv6_stage2_L1" 1064 | type: "Convolution" 1065 | bottom: "Mconv5_stage2_L1" 1066 | top: "Mconv6_stage2_L1" 1067 | param { 1068 | lr_mult: 4.0 1069 | decay_mult: 1 1070 | } 1071 | param { 1072 | lr_mult: 8.0 1073 | decay_mult: 0 1074 | } 1075 | convolution_param { 1076 | num_output: 128 1077 | pad: 0 1078 | kernel_size: 1 1079 | weight_filler { 1080 | type: "gaussian" 1081 | std: 0.01 1082 | } 1083 | bias_filler { 1084 | type: "constant" 1085 | } 1086 | } 1087 | } 1088 | layer { 1089 | name: "Mrelu6_stage2_L1" 1090 | type: "ReLU" 1091 | bottom: "Mconv6_stage2_L1" 1092 | top: "Mconv6_stage2_L1" 1093 | } 1094 | layer { 1095 | name: "Mconv6_stage2_L2" 1096 | type: "Convolution" 1097 | bottom: "Mconv5_stage2_L2" 1098 | top: "Mconv6_stage2_L2" 1099 | param { 1100 | lr_mult: 4.0 1101 | decay_mult: 1 1102 | } 1103 | param { 1104 | lr_mult: 8.0 1105 | decay_mult: 0 1106 | } 1107 | convolution_param { 1108 | num_output: 128 1109 | pad: 0 1110 | kernel_size: 1 1111 | weight_filler { 1112 | type: "gaussian" 1113 | std: 0.01 1114 | } 1115 | bias_filler { 1116 | type: "constant" 1117 | } 1118 | } 1119 | } 1120 | layer { 1121 | name: "Mrelu6_stage2_L2" 1122 | type: "ReLU" 1123 | bottom: "Mconv6_stage2_L2" 1124 | top: "Mconv6_stage2_L2" 1125 | } 1126 | layer { 1127 | name: "Mconv7_stage2_L1" 1128 | type: "Convolution" 1129 | bottom: "Mconv6_stage2_L1" 1130 | top: "Mconv7_stage2_L1" 1131 | param { 1132 | lr_mult: 4.0 1133 | decay_mult: 1 1134 | } 1135 | param { 1136 | lr_mult: 8.0 1137 | decay_mult: 0 1138 | } 1139 | convolution_param { 1140 | num_output: 28 1141 | pad: 0 1142 | kernel_size: 1 1143 | weight_filler { 1144 | type: "gaussian" 1145 | std: 0.01 1146 | } 1147 | bias_filler { 1148 | type: "constant" 1149 | } 1150 | } 1151 | } 1152 | layer { 1153 | name: "Mconv7_stage2_L2" 1154 | type: "Convolution" 1155 | bottom: "Mconv6_stage2_L2" 1156 | top: "Mconv7_stage2_L2" 1157 | param { 1158 | lr_mult: 4.0 1159 | decay_mult: 1 1160 | } 1161 | param { 1162 | lr_mult: 8.0 1163 | decay_mult: 0 1164 | } 1165 | convolution_param { 1166 | num_output: 16 1167 | pad: 0 1168 | kernel_size: 1 1169 | weight_filler { 1170 | type: "gaussian" 1171 | std: 0.01 1172 | } 1173 | bias_filler { 1174 | type: "constant" 1175 | } 1176 | } 1177 | } 1178 | layer { 1179 | name: "concat_stage3" 1180 | type: "Concat" 1181 | bottom: "Mconv7_stage2_L1" 1182 | bottom: "Mconv7_stage2_L2" 1183 | bottom: "conv4_4_CPM" 1184 | top: "concat_stage3" 1185 | concat_param { 1186 | axis: 1 1187 | } 1188 | } 1189 | layer { 1190 | name: "Mconv1_stage3_L1" 1191 | type: "Convolution" 1192 | bottom: "concat_stage3" 1193 | top: "Mconv1_stage3_L1" 1194 | param { 1195 | lr_mult: 4.0 1196 | decay_mult: 1 1197 | } 1198 | param { 1199 | lr_mult: 8.0 1200 | decay_mult: 0 1201 | } 1202 | convolution_param { 1203 | num_output: 128 1204 | pad: 3 1205 | kernel_size: 7 1206 | weight_filler { 1207 | type: "gaussian" 1208 | std: 0.01 1209 | } 1210 | bias_filler { 1211 | type: "constant" 1212 | } 1213 | } 1214 | } 1215 | layer { 1216 | name: "Mrelu1_stage3_L1" 1217 | type: "ReLU" 1218 | bottom: "Mconv1_stage3_L1" 1219 | top: "Mconv1_stage3_L1" 1220 | } 1221 | layer { 1222 | name: "Mconv1_stage3_L2" 1223 | type: "Convolution" 1224 | bottom: "concat_stage3" 1225 | top: "Mconv1_stage3_L2" 1226 | param { 1227 | lr_mult: 4.0 1228 | decay_mult: 1 1229 | } 1230 | param { 1231 | lr_mult: 8.0 1232 | decay_mult: 0 1233 | } 1234 | convolution_param { 1235 | num_output: 128 1236 | pad: 3 1237 | kernel_size: 7 1238 | weight_filler { 1239 | type: "gaussian" 1240 | std: 0.01 1241 | } 1242 | bias_filler { 1243 | type: "constant" 1244 | } 1245 | } 1246 | } 1247 | layer { 1248 | name: "Mrelu1_stage3_L2" 1249 | type: "ReLU" 1250 | bottom: "Mconv1_stage3_L2" 1251 | top: "Mconv1_stage3_L2" 1252 | } 1253 | layer { 1254 | name: "Mconv2_stage3_L1" 1255 | type: "Convolution" 1256 | bottom: "Mconv1_stage3_L1" 1257 | top: "Mconv2_stage3_L1" 1258 | param { 1259 | lr_mult: 4.0 1260 | decay_mult: 1 1261 | } 1262 | param { 1263 | lr_mult: 8.0 1264 | decay_mult: 0 1265 | } 1266 | convolution_param { 1267 | num_output: 128 1268 | pad: 3 1269 | kernel_size: 7 1270 | weight_filler { 1271 | type: "gaussian" 1272 | std: 0.01 1273 | } 1274 | bias_filler { 1275 | type: "constant" 1276 | } 1277 | } 1278 | } 1279 | layer { 1280 | name: "Mrelu2_stage3_L1" 1281 | type: "ReLU" 1282 | bottom: "Mconv2_stage3_L1" 1283 | top: "Mconv2_stage3_L1" 1284 | } 1285 | layer { 1286 | name: "Mconv2_stage3_L2" 1287 | type: "Convolution" 1288 | bottom: "Mconv1_stage3_L2" 1289 | top: "Mconv2_stage3_L2" 1290 | param { 1291 | lr_mult: 4.0 1292 | decay_mult: 1 1293 | } 1294 | param { 1295 | lr_mult: 8.0 1296 | decay_mult: 0 1297 | } 1298 | convolution_param { 1299 | num_output: 128 1300 | pad: 3 1301 | kernel_size: 7 1302 | weight_filler { 1303 | type: "gaussian" 1304 | std: 0.01 1305 | } 1306 | bias_filler { 1307 | type: "constant" 1308 | } 1309 | } 1310 | } 1311 | layer { 1312 | name: "Mrelu2_stage3_L2" 1313 | type: "ReLU" 1314 | bottom: "Mconv2_stage3_L2" 1315 | top: "Mconv2_stage3_L2" 1316 | } 1317 | layer { 1318 | name: "Mconv3_stage3_L1" 1319 | type: "Convolution" 1320 | bottom: "Mconv2_stage3_L1" 1321 | top: "Mconv3_stage3_L1" 1322 | param { 1323 | lr_mult: 4.0 1324 | decay_mult: 1 1325 | } 1326 | param { 1327 | lr_mult: 8.0 1328 | decay_mult: 0 1329 | } 1330 | convolution_param { 1331 | num_output: 128 1332 | pad: 3 1333 | kernel_size: 7 1334 | weight_filler { 1335 | type: "gaussian" 1336 | std: 0.01 1337 | } 1338 | bias_filler { 1339 | type: "constant" 1340 | } 1341 | } 1342 | } 1343 | layer { 1344 | name: "Mrelu3_stage3_L1" 1345 | type: "ReLU" 1346 | bottom: "Mconv3_stage3_L1" 1347 | top: "Mconv3_stage3_L1" 1348 | } 1349 | layer { 1350 | name: "Mconv3_stage3_L2" 1351 | type: "Convolution" 1352 | bottom: "Mconv2_stage3_L2" 1353 | top: "Mconv3_stage3_L2" 1354 | param { 1355 | lr_mult: 4.0 1356 | decay_mult: 1 1357 | } 1358 | param { 1359 | lr_mult: 8.0 1360 | decay_mult: 0 1361 | } 1362 | convolution_param { 1363 | num_output: 128 1364 | pad: 3 1365 | kernel_size: 7 1366 | weight_filler { 1367 | type: "gaussian" 1368 | std: 0.01 1369 | } 1370 | bias_filler { 1371 | type: "constant" 1372 | } 1373 | } 1374 | } 1375 | layer { 1376 | name: "Mrelu3_stage3_L2" 1377 | type: "ReLU" 1378 | bottom: "Mconv3_stage3_L2" 1379 | top: "Mconv3_stage3_L2" 1380 | } 1381 | layer { 1382 | name: "Mconv4_stage3_L1" 1383 | type: "Convolution" 1384 | bottom: "Mconv3_stage3_L1" 1385 | top: "Mconv4_stage3_L1" 1386 | param { 1387 | lr_mult: 4.0 1388 | decay_mult: 1 1389 | } 1390 | param { 1391 | lr_mult: 8.0 1392 | decay_mult: 0 1393 | } 1394 | convolution_param { 1395 | num_output: 128 1396 | pad: 3 1397 | kernel_size: 7 1398 | weight_filler { 1399 | type: "gaussian" 1400 | std: 0.01 1401 | } 1402 | bias_filler { 1403 | type: "constant" 1404 | } 1405 | } 1406 | } 1407 | layer { 1408 | name: "Mrelu4_stage3_L1" 1409 | type: "ReLU" 1410 | bottom: "Mconv4_stage3_L1" 1411 | top: "Mconv4_stage3_L1" 1412 | } 1413 | layer { 1414 | name: "Mconv4_stage3_L2" 1415 | type: "Convolution" 1416 | bottom: "Mconv3_stage3_L2" 1417 | top: "Mconv4_stage3_L2" 1418 | param { 1419 | lr_mult: 4.0 1420 | decay_mult: 1 1421 | } 1422 | param { 1423 | lr_mult: 8.0 1424 | decay_mult: 0 1425 | } 1426 | convolution_param { 1427 | num_output: 128 1428 | pad: 3 1429 | kernel_size: 7 1430 | weight_filler { 1431 | type: "gaussian" 1432 | std: 0.01 1433 | } 1434 | bias_filler { 1435 | type: "constant" 1436 | } 1437 | } 1438 | } 1439 | layer { 1440 | name: "Mrelu4_stage3_L2" 1441 | type: "ReLU" 1442 | bottom: "Mconv4_stage3_L2" 1443 | top: "Mconv4_stage3_L2" 1444 | } 1445 | layer { 1446 | name: "Mconv5_stage3_L1" 1447 | type: "Convolution" 1448 | bottom: "Mconv4_stage3_L1" 1449 | top: "Mconv5_stage3_L1" 1450 | param { 1451 | lr_mult: 4.0 1452 | decay_mult: 1 1453 | } 1454 | param { 1455 | lr_mult: 8.0 1456 | decay_mult: 0 1457 | } 1458 | convolution_param { 1459 | num_output: 128 1460 | pad: 3 1461 | kernel_size: 7 1462 | weight_filler { 1463 | type: "gaussian" 1464 | std: 0.01 1465 | } 1466 | bias_filler { 1467 | type: "constant" 1468 | } 1469 | } 1470 | } 1471 | layer { 1472 | name: "Mrelu5_stage3_L1" 1473 | type: "ReLU" 1474 | bottom: "Mconv5_stage3_L1" 1475 | top: "Mconv5_stage3_L1" 1476 | } 1477 | layer { 1478 | name: "Mconv5_stage3_L2" 1479 | type: "Convolution" 1480 | bottom: "Mconv4_stage3_L2" 1481 | top: "Mconv5_stage3_L2" 1482 | param { 1483 | lr_mult: 4.0 1484 | decay_mult: 1 1485 | } 1486 | param { 1487 | lr_mult: 8.0 1488 | decay_mult: 0 1489 | } 1490 | convolution_param { 1491 | num_output: 128 1492 | pad: 3 1493 | kernel_size: 7 1494 | weight_filler { 1495 | type: "gaussian" 1496 | std: 0.01 1497 | } 1498 | bias_filler { 1499 | type: "constant" 1500 | } 1501 | } 1502 | } 1503 | layer { 1504 | name: "Mrelu5_stage3_L2" 1505 | type: "ReLU" 1506 | bottom: "Mconv5_stage3_L2" 1507 | top: "Mconv5_stage3_L2" 1508 | } 1509 | layer { 1510 | name: "Mconv6_stage3_L1" 1511 | type: "Convolution" 1512 | bottom: "Mconv5_stage3_L1" 1513 | top: "Mconv6_stage3_L1" 1514 | param { 1515 | lr_mult: 4.0 1516 | decay_mult: 1 1517 | } 1518 | param { 1519 | lr_mult: 8.0 1520 | decay_mult: 0 1521 | } 1522 | convolution_param { 1523 | num_output: 128 1524 | pad: 0 1525 | kernel_size: 1 1526 | weight_filler { 1527 | type: "gaussian" 1528 | std: 0.01 1529 | } 1530 | bias_filler { 1531 | type: "constant" 1532 | } 1533 | } 1534 | } 1535 | layer { 1536 | name: "Mrelu6_stage3_L1" 1537 | type: "ReLU" 1538 | bottom: "Mconv6_stage3_L1" 1539 | top: "Mconv6_stage3_L1" 1540 | } 1541 | layer { 1542 | name: "Mconv6_stage3_L2" 1543 | type: "Convolution" 1544 | bottom: "Mconv5_stage3_L2" 1545 | top: "Mconv6_stage3_L2" 1546 | param { 1547 | lr_mult: 4.0 1548 | decay_mult: 1 1549 | } 1550 | param { 1551 | lr_mult: 8.0 1552 | decay_mult: 0 1553 | } 1554 | convolution_param { 1555 | num_output: 128 1556 | pad: 0 1557 | kernel_size: 1 1558 | weight_filler { 1559 | type: "gaussian" 1560 | std: 0.01 1561 | } 1562 | bias_filler { 1563 | type: "constant" 1564 | } 1565 | } 1566 | } 1567 | layer { 1568 | name: "Mrelu6_stage3_L2" 1569 | type: "ReLU" 1570 | bottom: "Mconv6_stage3_L2" 1571 | top: "Mconv6_stage3_L2" 1572 | } 1573 | layer { 1574 | name: "Mconv7_stage3_L1" 1575 | type: "Convolution" 1576 | bottom: "Mconv6_stage3_L1" 1577 | top: "Mconv7_stage3_L1" 1578 | param { 1579 | lr_mult: 4.0 1580 | decay_mult: 1 1581 | } 1582 | param { 1583 | lr_mult: 8.0 1584 | decay_mult: 0 1585 | } 1586 | convolution_param { 1587 | num_output: 28 1588 | pad: 0 1589 | kernel_size: 1 1590 | weight_filler { 1591 | type: "gaussian" 1592 | std: 0.01 1593 | } 1594 | bias_filler { 1595 | type: "constant" 1596 | } 1597 | } 1598 | } 1599 | layer { 1600 | name: "Mconv7_stage3_L2" 1601 | type: "Convolution" 1602 | bottom: "Mconv6_stage3_L2" 1603 | top: "Mconv7_stage3_L2" 1604 | param { 1605 | lr_mult: 4.0 1606 | decay_mult: 1 1607 | } 1608 | param { 1609 | lr_mult: 8.0 1610 | decay_mult: 0 1611 | } 1612 | convolution_param { 1613 | num_output: 16 1614 | pad: 0 1615 | kernel_size: 1 1616 | weight_filler { 1617 | type: "gaussian" 1618 | std: 0.01 1619 | } 1620 | bias_filler { 1621 | type: "constant" 1622 | } 1623 | } 1624 | } 1625 | layer { 1626 | name: "concat_stage4" 1627 | type: "Concat" 1628 | bottom: "Mconv7_stage3_L1" 1629 | bottom: "Mconv7_stage3_L2" 1630 | bottom: "conv4_4_CPM" 1631 | top: "concat_stage4" 1632 | concat_param { 1633 | axis: 1 1634 | } 1635 | } 1636 | layer { 1637 | name: "Mconv1_stage4_L1" 1638 | type: "Convolution" 1639 | bottom: "concat_stage4" 1640 | top: "Mconv1_stage4_L1" 1641 | param { 1642 | lr_mult: 4.0 1643 | decay_mult: 1 1644 | } 1645 | param { 1646 | lr_mult: 8.0 1647 | decay_mult: 0 1648 | } 1649 | convolution_param { 1650 | num_output: 128 1651 | pad: 3 1652 | kernel_size: 7 1653 | weight_filler { 1654 | type: "gaussian" 1655 | std: 0.01 1656 | } 1657 | bias_filler { 1658 | type: "constant" 1659 | } 1660 | } 1661 | } 1662 | layer { 1663 | name: "Mrelu1_stage4_L1" 1664 | type: "ReLU" 1665 | bottom: "Mconv1_stage4_L1" 1666 | top: "Mconv1_stage4_L1" 1667 | } 1668 | layer { 1669 | name: "Mconv1_stage4_L2" 1670 | type: "Convolution" 1671 | bottom: "concat_stage4" 1672 | top: "Mconv1_stage4_L2" 1673 | param { 1674 | lr_mult: 4.0 1675 | decay_mult: 1 1676 | } 1677 | param { 1678 | lr_mult: 8.0 1679 | decay_mult: 0 1680 | } 1681 | convolution_param { 1682 | num_output: 128 1683 | pad: 3 1684 | kernel_size: 7 1685 | weight_filler { 1686 | type: "gaussian" 1687 | std: 0.01 1688 | } 1689 | bias_filler { 1690 | type: "constant" 1691 | } 1692 | } 1693 | } 1694 | layer { 1695 | name: "Mrelu1_stage4_L2" 1696 | type: "ReLU" 1697 | bottom: "Mconv1_stage4_L2" 1698 | top: "Mconv1_stage4_L2" 1699 | } 1700 | layer { 1701 | name: "Mconv2_stage4_L1" 1702 | type: "Convolution" 1703 | bottom: "Mconv1_stage4_L1" 1704 | top: "Mconv2_stage4_L1" 1705 | param { 1706 | lr_mult: 4.0 1707 | decay_mult: 1 1708 | } 1709 | param { 1710 | lr_mult: 8.0 1711 | decay_mult: 0 1712 | } 1713 | convolution_param { 1714 | num_output: 128 1715 | pad: 3 1716 | kernel_size: 7 1717 | weight_filler { 1718 | type: "gaussian" 1719 | std: 0.01 1720 | } 1721 | bias_filler { 1722 | type: "constant" 1723 | } 1724 | } 1725 | } 1726 | layer { 1727 | name: "Mrelu2_stage4_L1" 1728 | type: "ReLU" 1729 | bottom: "Mconv2_stage4_L1" 1730 | top: "Mconv2_stage4_L1" 1731 | } 1732 | layer { 1733 | name: "Mconv2_stage4_L2" 1734 | type: "Convolution" 1735 | bottom: "Mconv1_stage4_L2" 1736 | top: "Mconv2_stage4_L2" 1737 | param { 1738 | lr_mult: 4.0 1739 | decay_mult: 1 1740 | } 1741 | param { 1742 | lr_mult: 8.0 1743 | decay_mult: 0 1744 | } 1745 | convolution_param { 1746 | num_output: 128 1747 | pad: 3 1748 | kernel_size: 7 1749 | weight_filler { 1750 | type: "gaussian" 1751 | std: 0.01 1752 | } 1753 | bias_filler { 1754 | type: "constant" 1755 | } 1756 | } 1757 | } 1758 | layer { 1759 | name: "Mrelu2_stage4_L2" 1760 | type: "ReLU" 1761 | bottom: "Mconv2_stage4_L2" 1762 | top: "Mconv2_stage4_L2" 1763 | } 1764 | layer { 1765 | name: "Mconv3_stage4_L1" 1766 | type: "Convolution" 1767 | bottom: "Mconv2_stage4_L1" 1768 | top: "Mconv3_stage4_L1" 1769 | param { 1770 | lr_mult: 4.0 1771 | decay_mult: 1 1772 | } 1773 | param { 1774 | lr_mult: 8.0 1775 | decay_mult: 0 1776 | } 1777 | convolution_param { 1778 | num_output: 128 1779 | pad: 3 1780 | kernel_size: 7 1781 | weight_filler { 1782 | type: "gaussian" 1783 | std: 0.01 1784 | } 1785 | bias_filler { 1786 | type: "constant" 1787 | } 1788 | } 1789 | } 1790 | layer { 1791 | name: "Mrelu3_stage4_L1" 1792 | type: "ReLU" 1793 | bottom: "Mconv3_stage4_L1" 1794 | top: "Mconv3_stage4_L1" 1795 | } 1796 | layer { 1797 | name: "Mconv3_stage4_L2" 1798 | type: "Convolution" 1799 | bottom: "Mconv2_stage4_L2" 1800 | top: "Mconv3_stage4_L2" 1801 | param { 1802 | lr_mult: 4.0 1803 | decay_mult: 1 1804 | } 1805 | param { 1806 | lr_mult: 8.0 1807 | decay_mult: 0 1808 | } 1809 | convolution_param { 1810 | num_output: 128 1811 | pad: 3 1812 | kernel_size: 7 1813 | weight_filler { 1814 | type: "gaussian" 1815 | std: 0.01 1816 | } 1817 | bias_filler { 1818 | type: "constant" 1819 | } 1820 | } 1821 | } 1822 | layer { 1823 | name: "Mrelu3_stage4_L2" 1824 | type: "ReLU" 1825 | bottom: "Mconv3_stage4_L2" 1826 | top: "Mconv3_stage4_L2" 1827 | } 1828 | layer { 1829 | name: "Mconv4_stage4_L1" 1830 | type: "Convolution" 1831 | bottom: "Mconv3_stage4_L1" 1832 | top: "Mconv4_stage4_L1" 1833 | param { 1834 | lr_mult: 4.0 1835 | decay_mult: 1 1836 | } 1837 | param { 1838 | lr_mult: 8.0 1839 | decay_mult: 0 1840 | } 1841 | convolution_param { 1842 | num_output: 128 1843 | pad: 3 1844 | kernel_size: 7 1845 | weight_filler { 1846 | type: "gaussian" 1847 | std: 0.01 1848 | } 1849 | bias_filler { 1850 | type: "constant" 1851 | } 1852 | } 1853 | } 1854 | layer { 1855 | name: "Mrelu4_stage4_L1" 1856 | type: "ReLU" 1857 | bottom: "Mconv4_stage4_L1" 1858 | top: "Mconv4_stage4_L1" 1859 | } 1860 | layer { 1861 | name: "Mconv4_stage4_L2" 1862 | type: "Convolution" 1863 | bottom: "Mconv3_stage4_L2" 1864 | top: "Mconv4_stage4_L2" 1865 | param { 1866 | lr_mult: 4.0 1867 | decay_mult: 1 1868 | } 1869 | param { 1870 | lr_mult: 8.0 1871 | decay_mult: 0 1872 | } 1873 | convolution_param { 1874 | num_output: 128 1875 | pad: 3 1876 | kernel_size: 7 1877 | weight_filler { 1878 | type: "gaussian" 1879 | std: 0.01 1880 | } 1881 | bias_filler { 1882 | type: "constant" 1883 | } 1884 | } 1885 | } 1886 | layer { 1887 | name: "Mrelu4_stage4_L2" 1888 | type: "ReLU" 1889 | bottom: "Mconv4_stage4_L2" 1890 | top: "Mconv4_stage4_L2" 1891 | } 1892 | layer { 1893 | name: "Mconv5_stage4_L1" 1894 | type: "Convolution" 1895 | bottom: "Mconv4_stage4_L1" 1896 | top: "Mconv5_stage4_L1" 1897 | param { 1898 | lr_mult: 4.0 1899 | decay_mult: 1 1900 | } 1901 | param { 1902 | lr_mult: 8.0 1903 | decay_mult: 0 1904 | } 1905 | convolution_param { 1906 | num_output: 128 1907 | pad: 3 1908 | kernel_size: 7 1909 | weight_filler { 1910 | type: "gaussian" 1911 | std: 0.01 1912 | } 1913 | bias_filler { 1914 | type: "constant" 1915 | } 1916 | } 1917 | } 1918 | layer { 1919 | name: "Mrelu5_stage4_L1" 1920 | type: "ReLU" 1921 | bottom: "Mconv5_stage4_L1" 1922 | top: "Mconv5_stage4_L1" 1923 | } 1924 | layer { 1925 | name: "Mconv5_stage4_L2" 1926 | type: "Convolution" 1927 | bottom: "Mconv4_stage4_L2" 1928 | top: "Mconv5_stage4_L2" 1929 | param { 1930 | lr_mult: 4.0 1931 | decay_mult: 1 1932 | } 1933 | param { 1934 | lr_mult: 8.0 1935 | decay_mult: 0 1936 | } 1937 | convolution_param { 1938 | num_output: 128 1939 | pad: 3 1940 | kernel_size: 7 1941 | weight_filler { 1942 | type: "gaussian" 1943 | std: 0.01 1944 | } 1945 | bias_filler { 1946 | type: "constant" 1947 | } 1948 | } 1949 | } 1950 | layer { 1951 | name: "Mrelu5_stage4_L2" 1952 | type: "ReLU" 1953 | bottom: "Mconv5_stage4_L2" 1954 | top: "Mconv5_stage4_L2" 1955 | } 1956 | layer { 1957 | name: "Mconv6_stage4_L1" 1958 | type: "Convolution" 1959 | bottom: "Mconv5_stage4_L1" 1960 | top: "Mconv6_stage4_L1" 1961 | param { 1962 | lr_mult: 4.0 1963 | decay_mult: 1 1964 | } 1965 | param { 1966 | lr_mult: 8.0 1967 | decay_mult: 0 1968 | } 1969 | convolution_param { 1970 | num_output: 128 1971 | pad: 0 1972 | kernel_size: 1 1973 | weight_filler { 1974 | type: "gaussian" 1975 | std: 0.01 1976 | } 1977 | bias_filler { 1978 | type: "constant" 1979 | } 1980 | } 1981 | } 1982 | layer { 1983 | name: "Mrelu6_stage4_L1" 1984 | type: "ReLU" 1985 | bottom: "Mconv6_stage4_L1" 1986 | top: "Mconv6_stage4_L1" 1987 | } 1988 | layer { 1989 | name: "Mconv6_stage4_L2" 1990 | type: "Convolution" 1991 | bottom: "Mconv5_stage4_L2" 1992 | top: "Mconv6_stage4_L2" 1993 | param { 1994 | lr_mult: 4.0 1995 | decay_mult: 1 1996 | } 1997 | param { 1998 | lr_mult: 8.0 1999 | decay_mult: 0 2000 | } 2001 | convolution_param { 2002 | num_output: 128 2003 | pad: 0 2004 | kernel_size: 1 2005 | weight_filler { 2006 | type: "gaussian" 2007 | std: 0.01 2008 | } 2009 | bias_filler { 2010 | type: "constant" 2011 | } 2012 | } 2013 | } 2014 | layer { 2015 | name: "Mrelu6_stage4_L2" 2016 | type: "ReLU" 2017 | bottom: "Mconv6_stage4_L2" 2018 | top: "Mconv6_stage4_L2" 2019 | } 2020 | layer { 2021 | name: "Mconv7_stage4_L1" 2022 | type: "Convolution" 2023 | bottom: "Mconv6_stage4_L1" 2024 | top: "Mconv7_stage4_L1" 2025 | param { 2026 | lr_mult: 4.0 2027 | decay_mult: 1 2028 | } 2029 | param { 2030 | lr_mult: 8.0 2031 | decay_mult: 0 2032 | } 2033 | convolution_param { 2034 | num_output: 28 2035 | pad: 0 2036 | kernel_size: 1 2037 | weight_filler { 2038 | type: "gaussian" 2039 | std: 0.01 2040 | } 2041 | bias_filler { 2042 | type: "constant" 2043 | } 2044 | } 2045 | } 2046 | layer { 2047 | name: "Mconv7_stage4_L2" 2048 | type: "Convolution" 2049 | bottom: "Mconv6_stage4_L2" 2050 | top: "Mconv7_stage4_L2" 2051 | param { 2052 | lr_mult: 4.0 2053 | decay_mult: 1 2054 | } 2055 | param { 2056 | lr_mult: 8.0 2057 | decay_mult: 0 2058 | } 2059 | convolution_param { 2060 | num_output: 16 2061 | pad: 0 2062 | kernel_size: 1 2063 | weight_filler { 2064 | type: "gaussian" 2065 | std: 0.01 2066 | } 2067 | bias_filler { 2068 | type: "constant" 2069 | } 2070 | } 2071 | } 2072 | layer { 2073 | name: "concat_stage7" 2074 | type: "Concat" 2075 | bottom: "Mconv7_stage4_L2" 2076 | bottom: "Mconv7_stage4_L1" 2077 | top: "net_output" 2078 | concat_param { 2079 | axis: 1 2080 | } 2081 | } 2082 | --------------------------------------------------------------------------------