add deviation
This commit is contained in:
parent
74ac2f0dba
commit
e52ba46512
11
app.py
11
app.py
|
@ -79,7 +79,16 @@ def get_predicted_coordinates(coordinates: list, width: int, height: int) -> lis
|
||||||
# those are in skeleton_lib.py
|
# those are in skeleton_lib.py
|
||||||
|
|
||||||
# when testing, can visualize with the method expo_save_bodypose in openpose_gen.py
|
# when testing, can visualize with the method expo_save_bodypose in openpose_gen.py
|
||||||
return mirror_coordinates(coordinates, width)
|
|
||||||
|
# for now, just mirror the coordinates and add some random deviation
|
||||||
|
predicted_coordinates = mirror_coordinates(coordinates, width)
|
||||||
|
for i in range(0, len(predicted_coordinates), 3):
|
||||||
|
deviation = random.randint(-10, 10)
|
||||||
|
predicted_coordinates[i] += deviation
|
||||||
|
deviation = random.randint(-10, 10)
|
||||||
|
predicted_coordinates[i + 1] += deviation
|
||||||
|
|
||||||
|
return predicted_coordinates
|
||||||
|
|
||||||
def mirror_coordinates(coordinates: list, width: int) -> list:
|
def mirror_coordinates(coordinates: list, width: int) -> list:
|
||||||
for i in range(0, len(coordinates), 3):
|
for i in range(0, len(coordinates), 3):
|
||||||
|
|
Loading…
Reference in New Issue