FangSen9000 commited on
Commit
b0cc904
·
1 Parent(s): 3308688

Update StableSigner3 repository structure and add Git LFS tracking

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +2 -0
  2. README.md +7 -163
  3. assets/WLASL_01214/crop_frame/00000001.jpg +0 -0
  4. assets/WLASL_01214/crop_frame/00000002.jpg +0 -0
  5. assets/WLASL_01214/crop_frame/00000003.jpg +0 -0
  6. assets/WLASL_01214/crop_frame/00000004.jpg +0 -0
  7. assets/WLASL_01214/crop_frame/00000005.jpg +0 -0
  8. assets/WLASL_01214/crop_frame/00000006.jpg +0 -0
  9. assets/WLASL_01214/crop_frame/00000007.jpg +0 -0
  10. assets/WLASL_01214/crop_frame/00000008.jpg +0 -0
  11. assets/WLASL_01214/crop_frame/00000009.jpg +0 -0
  12. assets/WLASL_01214/crop_frame/00000010.jpg +0 -0
  13. assets/WLASL_01214/crop_frame/00000011.jpg +0 -0
  14. assets/WLASL_01214/crop_frame/00000012.jpg +0 -0
  15. assets/WLASL_01214/crop_frame/00000013.jpg +0 -0
  16. assets/WLASL_01214/crop_frame/00000014.jpg +0 -0
  17. assets/WLASL_01214/crop_frame/00000015.jpg +0 -0
  18. assets/WLASL_01214/crop_frame/00000016.jpg +0 -0
  19. assets/WLASL_01214/crop_frame/00000017.jpg +0 -0
  20. assets/WLASL_01214/crop_frame/00000018.jpg +0 -0
  21. assets/WLASL_01214/crop_frame/00000019.jpg +0 -0
  22. assets/WLASL_01214/crop_frame/00000020.jpg +0 -0
  23. assets/WLASL_01214/crop_frame/00000021.jpg +0 -0
  24. assets/WLASL_01214/crop_frame/00000022.jpg +0 -0
  25. assets/WLASL_01214/crop_frame/00000023.jpg +0 -0
  26. assets/WLASL_01214/crop_frame/00000024.jpg +0 -0
  27. assets/WLASL_01214/crop_frame/00000025.jpg +0 -0
  28. assets/WLASL_01214/crop_frame/00000026.jpg +0 -0
  29. assets/WLASL_01214/crop_frame/00000027.jpg +0 -0
  30. assets/WLASL_01214/crop_frame/00000028.jpg +0 -0
  31. assets/WLASL_01214/crop_frame/00000029.jpg +0 -0
  32. assets/WLASL_01214/crop_frame/00000030.jpg +0 -0
  33. assets/WLASL_01214/crop_frame/00000031.jpg +0 -0
  34. assets/WLASL_01214/crop_frame/00000032.jpg +0 -0
  35. assets/WLASL_01214/crop_frame/00000033.jpg +0 -0
  36. assets/WLASL_01214/crop_frame/00000034.jpg +0 -0
  37. assets/WLASL_01214/crop_frame/00000035.jpg +0 -0
  38. assets/WLASL_01214/crop_frame/00000036.jpg +0 -0
  39. assets/WLASL_01214/crop_frame/00000037.jpg +0 -0
  40. assets/WLASL_01214/crop_frame/00000038.jpg +0 -0
  41. assets/WLASL_01214/crop_frame/00000039.jpg +0 -0
  42. assets/WLASL_01214/crop_frame/00000040.jpg +0 -0
  43. assets/WLASL_01214/crop_frame/00000041.jpg +0 -0
  44. assets/WLASL_01214/dwpose_overlay_img/00000001.png +0 -0
  45. assets/WLASL_01214/dwpose_overlay_img/00000002.png +0 -0
  46. assets/WLASL_01214/dwpose_overlay_img/00000003.png +0 -0
  47. assets/WLASL_01214/dwpose_overlay_img/00000004.png +0 -0
  48. assets/WLASL_01214/dwpose_overlay_img/00000005.png +0 -0
  49. assets/WLASL_01214/dwpose_overlay_img/00000006.png +0 -0
  50. assets/WLASL_01214/dwpose_overlay_img/00000007.png +0 -0
.gitattributes CHANGED
@@ -10,3 +10,5 @@
10
  *.avi filter=lfs diff=lfs merge=lfs -text
11
  *.mov filter=lfs diff=lfs merge=lfs -text
12
  *.gif filter=lfs diff=lfs merge=lfs -text
 
 
 
10
  *.avi filter=lfs diff=lfs merge=lfs -text
11
  *.mov filter=lfs diff=lfs merge=lfs -text
12
  *.gif filter=lfs diff=lfs merge=lfs -text
13
+ *.png filter=lfs diff=lfs merge=lfs -text
14
+ *.jpg filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,170 +1,14 @@
1
- # fast_dwpose
2
 
3
- The goal of Easy DWPose is to provide a generic, reliable, and easy-to-use interface for making skeletons for ControlNet.
4
 
5
- SF do some improve for [easy-dwpose](https://github.com/reallyigor/easy_dwpose), named it fast-dwpose.
6
 
7
- ## Installation
8
 
9
- ### PIP
10
 
11
- ```bash
12
- pip install easy-dwpose
13
- ```
14
 
15
- ## Quickstart
16
 
17
- ### In you own .py scrip or in Jupyter
18
-
19
- ```python
20
- import torch
21
- from PIL import Image
22
- import numpy as np
23
- import json
24
-
25
- from easy_dwpose import DWposeDetector
26
-
27
- #####---------Setup init
28
- # You can use a different GPU, e.g. "cuda:1"
29
- device = "cuda:0" if torch.cuda.is_available() else "cpu"
30
- detector = DWposeDetector(device=device)
31
- input_image = Image.open("assets/pose.png").convert("RGB")
32
-
33
-
34
- #####---------Get both the skeleton image
35
- # SF: skeleton should be a kind of img
36
- skeleton = detector(input_image, output_type="pil", include_hands=True, include_face=True)
37
- # Save the skeleton image
38
- skeleton.save("skeleton.png")
39
-
40
-
41
- #####---------Get pose data
42
- # SF: pose_data should be numpy/tensor
43
- # # This returns the dictionary
44
- pose_data = detector(input_image, draw_pose=False)
45
-
46
- # Save the skeleton pose information:
47
- # Option 1: Save as NPY file
48
- np.save('pose_data.npy', pose_data)
49
-
50
- # Option 2: Save as NPZ file
51
- np.savez('pose_data.npz', **pose_data)
52
-
53
- # Option 3: Save as JSON file
54
- # Convert numpy arrays to lists for JSON serialization
55
- pose_data_json = {k: v.tolist() if isinstance(v, np.ndarray) else v for k, v in pose_data.items()}
56
- with open('pose_data.json', 'w') as f:
57
- json.dump(pose_data_json, f)
58
- ```
59
-
60
- <table align="center">
61
- <tr>
62
- <th align="center">Input</th>
63
- <th align="center">Output</th>
64
- </tr>
65
- <tr>
66
- <td align="center">
67
- <br />
68
- <img src="./assets/pose.png"/>
69
- </td>
70
- <td align="center">
71
- <br/>
72
- <img src="./assets/skeleton.png"/>
73
- </td>
74
- </tr>
75
- </table>
76
-
77
- ### On a video
78
-
79
- ```bash
80
- python scripts/inference_on_video.py --input assets/dance.mp4 --output_path result.mp4
81
- ```
82
-
83
- <table align="center">
84
- <tr>
85
- <th align="center">Input</th>
86
- <th align="center">Output</th>
87
- </tr>
88
- <tr>
89
- <td align="center">
90
- <br />
91
- <img src="./assets/dance.gif"/>
92
- </td>
93
- <td align="center">
94
- <br/>
95
- <img src="./assets/skeleton.gif"/>
96
- </td>
97
- </tr>
98
- </table>
99
-
100
- ### On a folder of images
101
-
102
- ```bash
103
- python scripts/inference_on_folder.py --input assets/ --output_path results/
104
- ```
105
-
106
- ### Easy-DWPose Custom skeleton drawing
107
-
108
- By default, we use standart skeleton drawing function but several projects change it (e.g. [MusePose](https://github.com/TMElyralab/MusePose)). Modify it or write your own from scratch!
109
-
110
- ```python
111
- from PIL import Image
112
- from easy_dwpose import DWposeDetector
113
- from easy_dwpose.draw.musepose import draw_pose as draw_pose_musepose
114
-
115
- detector = DWposeDetector(device="cpu")
116
- input_image = Image.open("assets/pose.png").convert("RGB")
117
-
118
- skeleton = detector(input_image, output_type="pil", draw_pose=draw_pose_musepose, draw_face=False)
119
- skeleton.save("skeleton.png")
120
- ```
121
-
122
- ### SF Custom skeleton drawing
123
-
124
- I prefer ControlNext style, I have developed a visualization method and placed it in `./easy_dwpose/draw/controlnext.py`. It does not integrate with easy dwpose and the calling method is slightly different:
125
-
126
- ```python
127
- import torch
128
- from PIL import Image
129
- import numpy as np
130
- import json
131
-
132
- from easy_dwpose import DWposeDetector
133
- from easy_dwpose.draw.controlnext import draw_pose, process_pose_data
134
-
135
- #####---------Setup init
136
- # You can use a different GPU, e.g. "cuda:1"
137
- device = "cuda:0" if torch.cuda.is_available() else "cpu"
138
- detector = DWposeDetector(device=device)
139
- input_image = Image.open("assets/pose.png").convert("RGB")
140
-
141
- #####---------Custom ControlNext drawing style
142
- # Get pose data for custom drawing
143
- pose_data = detector(input_image, draw_pose=False)
144
-
145
- # Get image dimensions
146
- width, height = input_image.size
147
-
148
- # Process the pose data for custom drawing
149
- processed_pred = process_pose_data(pose_data, height, width)
150
-
151
- # Draw pose using custom ControlNext style
152
- vis_img = draw_pose(
153
- pose=processed_pred,
154
- H=height,
155
- W=width,
156
- include_body=True,
157
- include_hand=True,
158
- include_face=True
159
- )
160
-
161
- # Convert to PIL Image and save (vis_img is in CHW format)
162
- custom_skeleton = Image.fromarray(vis_img.transpose(1, 2, 0))
163
- custom_skeleton.save("skeleton_controlnext.png")
164
- ```
165
-
166
- ## Acknowledgement
167
-
168
- We thank the original authors of the [DWPose](https://github.com/IDEA-Research/DWPose) for their incredible models!
169
-
170
- Thanks for open-sourcing!
 
1
+ # For developers
2
 
3
+ ## tutorial00 Use DWpose to preprocess the original sign language video
4
 
5
+ ## tutorial01 prepare pose dict
6
 
7
+ ## tutorial02 get pose video from text input
8
 
9
+ ## tutorial03 render pose video
10
 
 
 
 
11
 
12
+ # For Users
13
 
14
+ ## start00 just start as a user
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/WLASL_01214/crop_frame/00000001.jpg DELETED
Binary file (8.65 kB)
 
assets/WLASL_01214/crop_frame/00000002.jpg DELETED
Binary file (8.65 kB)
 
assets/WLASL_01214/crop_frame/00000003.jpg DELETED
Binary file (8.6 kB)
 
assets/WLASL_01214/crop_frame/00000004.jpg DELETED
Binary file (8.58 kB)
 
assets/WLASL_01214/crop_frame/00000005.jpg DELETED
Binary file (8.58 kB)
 
assets/WLASL_01214/crop_frame/00000006.jpg DELETED
Binary file (8.56 kB)
 
assets/WLASL_01214/crop_frame/00000007.jpg DELETED
Binary file (8.45 kB)
 
assets/WLASL_01214/crop_frame/00000008.jpg DELETED
Binary file (8.41 kB)
 
assets/WLASL_01214/crop_frame/00000009.jpg DELETED
Binary file (8.43 kB)
 
assets/WLASL_01214/crop_frame/00000010.jpg DELETED
Binary file (8.5 kB)
 
assets/WLASL_01214/crop_frame/00000011.jpg DELETED
Binary file (8.34 kB)
 
assets/WLASL_01214/crop_frame/00000012.jpg DELETED
Binary file (8.3 kB)
 
assets/WLASL_01214/crop_frame/00000013.jpg DELETED
Binary file (8.41 kB)
 
assets/WLASL_01214/crop_frame/00000014.jpg DELETED
Binary file (8.21 kB)
 
assets/WLASL_01214/crop_frame/00000015.jpg DELETED
Binary file (8.32 kB)
 
assets/WLASL_01214/crop_frame/00000016.jpg DELETED
Binary file (8.52 kB)
 
assets/WLASL_01214/crop_frame/00000017.jpg DELETED
Binary file (8.44 kB)
 
assets/WLASL_01214/crop_frame/00000018.jpg DELETED
Binary file (8.49 kB)
 
assets/WLASL_01214/crop_frame/00000019.jpg DELETED
Binary file (8.69 kB)
 
assets/WLASL_01214/crop_frame/00000020.jpg DELETED
Binary file (8.53 kB)
 
assets/WLASL_01214/crop_frame/00000021.jpg DELETED
Binary file (8.6 kB)
 
assets/WLASL_01214/crop_frame/00000022.jpg DELETED
Binary file (8.78 kB)
 
assets/WLASL_01214/crop_frame/00000023.jpg DELETED
Binary file (8.61 kB)
 
assets/WLASL_01214/crop_frame/00000024.jpg DELETED
Binary file (8.7 kB)
 
assets/WLASL_01214/crop_frame/00000025.jpg DELETED
Binary file (8.68 kB)
 
assets/WLASL_01214/crop_frame/00000026.jpg DELETED
Binary file (8.75 kB)
 
assets/WLASL_01214/crop_frame/00000027.jpg DELETED
Binary file (8.65 kB)
 
assets/WLASL_01214/crop_frame/00000028.jpg DELETED
Binary file (8.65 kB)
 
assets/WLASL_01214/crop_frame/00000029.jpg DELETED
Binary file (8.66 kB)
 
assets/WLASL_01214/crop_frame/00000030.jpg DELETED
Binary file (8.68 kB)
 
assets/WLASL_01214/crop_frame/00000031.jpg DELETED
Binary file (8.64 kB)
 
assets/WLASL_01214/crop_frame/00000032.jpg DELETED
Binary file (8.57 kB)
 
assets/WLASL_01214/crop_frame/00000033.jpg DELETED
Binary file (8.64 kB)
 
assets/WLASL_01214/crop_frame/00000034.jpg DELETED
Binary file (8.67 kB)
 
assets/WLASL_01214/crop_frame/00000035.jpg DELETED
Binary file (8.62 kB)
 
assets/WLASL_01214/crop_frame/00000036.jpg DELETED
Binary file (8.62 kB)
 
assets/WLASL_01214/crop_frame/00000037.jpg DELETED
Binary file (8.64 kB)
 
assets/WLASL_01214/crop_frame/00000038.jpg DELETED
Binary file (8.69 kB)
 
assets/WLASL_01214/crop_frame/00000039.jpg DELETED
Binary file (8.63 kB)
 
assets/WLASL_01214/crop_frame/00000040.jpg DELETED
Binary file (8.59 kB)
 
assets/WLASL_01214/crop_frame/00000041.jpg DELETED
Binary file (8.56 kB)
 
assets/WLASL_01214/dwpose_overlay_img/00000001.png DELETED
Binary file (35.1 kB)
 
assets/WLASL_01214/dwpose_overlay_img/00000002.png DELETED
Binary file (35.3 kB)
 
assets/WLASL_01214/dwpose_overlay_img/00000003.png DELETED
Binary file (35.4 kB)
 
assets/WLASL_01214/dwpose_overlay_img/00000004.png DELETED
Binary file (35.5 kB)
 
assets/WLASL_01214/dwpose_overlay_img/00000005.png DELETED
Binary file (35.6 kB)
 
assets/WLASL_01214/dwpose_overlay_img/00000006.png DELETED
Binary file (35.6 kB)
 
assets/WLASL_01214/dwpose_overlay_img/00000007.png DELETED
Binary file (35.3 kB)