Commit fa59fd22 by baihe

updated

parent 0e392008
File deleted
......@@ -10,4 +10,6 @@ exp
_ext
tmp
*.o*
*~
\ No newline at end of file
*~
.idea
.DS_Store
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (pytorch)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (deepml)" project-jdk-type="Python SDK" />
<component name="PyCharmProfessionalAdvertiser">
<option name="shown" value="true" />
</component>
......
......@@ -4,7 +4,7 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="Python 3.9 (pytorch)" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Python 3.9 (deepml)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
......
import cv2
import utils.img
import torch
import numpy as np
from utils.group import HeatmapParser
import data.MPII.ref as ds
import utils.img
from utils.group import HeatmapParser
from utils.posture import *
# 歪头的斜率阈值
......@@ -11,12 +11,8 @@ CROOKED_HEAD_THRE=8
# 斜肩的斜率阈值
OBLIQUE_SHOULDER_THRE=2
# 人体骨骼各坐标点的下标对应图
class PersonPosture():
def __init__(self, pred,orig_img):
self.pred = pred[0]['keypoints']
......@@ -165,7 +161,6 @@ def main():
return func(0, config, 'inference', imgs=torch.Tensor(np.float32(imgs)))['preds']
def do(img, c, s):
import time
ans = inference(img, runner, config, c, s)
if len(ans) > 0:
ans = ans[:,:,:3]
......@@ -176,7 +171,7 @@ def main():
pred.append({'keypoints': ans[i,:,:]})
return pred
if __name__ == '__main__':
image_path = "data/custom/wenjin正脸.jpg"
image_path = "data/custom/O型腿3.jpeg"
from train import init
func, config = init()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment