Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
stacked_hourglasses
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wudiao
stacked_hourglasses
Commits
fa59fd22
Commit
fa59fd22
authored
Oct 09, 2021
by
baihe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated
parent
0e392008
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
13 deletions
+10
-13
.DS_Store
+0
-0
.gitignore
+4
-2
.idea/misc.xml
+1
-1
.idea/pytorch_stacked_hourglass-master.iml
+1
-1
handler.py
+4
-9
No files found.
.DS_Store
deleted
100644 → 0
View file @
0e392008
File deleted
.gitignore
View file @
fa59fd22
...
@@ -10,4 +10,6 @@ exp
...
@@ -10,4 +10,6 @@ exp
_ext
_ext
tmp
tmp
*.o*
*.o*
*~
*~
\ No newline at end of file
.idea
.DS_Store
\ No newline at end of file
.idea/misc.xml
View file @
fa59fd22
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<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"
>
<component
name=
"PyCharmProfessionalAdvertiser"
>
<option
name=
"shown"
value=
"true"
/>
<option
name=
"shown"
value=
"true"
/>
</component>
</component>
...
...
.idea/pytorch_stacked_hourglass-master.iml
View file @
fa59fd22
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<content
url=
"file://$MODULE_DIR$"
>
<content
url=
"file://$MODULE_DIR$"
>
<sourceFolder
url=
"file://$MODULE_DIR$"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$"
isTestSource=
"false"
/>
</content>
</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"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
</component>
</component>
<component
name=
"PyDocumentationSettings"
>
<component
name=
"PyDocumentationSettings"
>
...
...
handler.py
View file @
fa59fd22
import
cv2
import
cv2
import
utils.img
import
torch
import
torch
import
numpy
as
np
from
utils.group
import
HeatmapParser
import
data.MPII.ref
as
ds
import
data.MPII.ref
as
ds
import
utils.img
from
utils.group
import
HeatmapParser
from
utils.posture
import
*
from
utils.posture
import
*
# 歪头的斜率阈值
# 歪头的斜率阈值
...
@@ -11,12 +11,8 @@ CROOKED_HEAD_THRE=8
...
@@ -11,12 +11,8 @@ CROOKED_HEAD_THRE=8
# 斜肩的斜率阈值
# 斜肩的斜率阈值
OBLIQUE_SHOULDER_THRE
=
2
OBLIQUE_SHOULDER_THRE
=
2
# 人体骨骼各坐标点的下标对应图
# 人体骨骼各坐标点的下标对应图
class
PersonPosture
():
class
PersonPosture
():
def
__init__
(
self
,
pred
,
orig_img
):
def
__init__
(
self
,
pred
,
orig_img
):
self
.
pred
=
pred
[
0
][
'keypoints'
]
self
.
pred
=
pred
[
0
][
'keypoints'
]
...
@@ -165,7 +161,6 @@ def main():
...
@@ -165,7 +161,6 @@ def main():
return
func
(
0
,
config
,
'inference'
,
imgs
=
torch
.
Tensor
(
np
.
float32
(
imgs
)))[
'preds'
]
return
func
(
0
,
config
,
'inference'
,
imgs
=
torch
.
Tensor
(
np
.
float32
(
imgs
)))[
'preds'
]
def
do
(
img
,
c
,
s
):
def
do
(
img
,
c
,
s
):
import
time
ans
=
inference
(
img
,
runner
,
config
,
c
,
s
)
ans
=
inference
(
img
,
runner
,
config
,
c
,
s
)
if
len
(
ans
)
>
0
:
if
len
(
ans
)
>
0
:
ans
=
ans
[:,:,:
3
]
ans
=
ans
[:,:,:
3
]
...
@@ -176,7 +171,7 @@ def main():
...
@@ -176,7 +171,7 @@ def main():
pred
.
append
({
'keypoints'
:
ans
[
i
,:,:]})
pred
.
append
({
'keypoints'
:
ans
[
i
,:,:]})
return
pred
return
pred
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
image_path
=
"data/custom/
wenjin正脸.jp
g"
image_path
=
"data/custom/
O型腿3.jpe
g"
from
train
import
init
from
train
import
init
func
,
config
=
init
()
func
,
config
=
init
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment