liveswapface-preview-tools 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- liveswapface_preview_tools-0.1.0/LICENSE +21 -0
- liveswapface_preview_tools-0.1.0/PKG-INFO +27 -0
- liveswapface_preview_tools-0.1.0/README.md +13 -0
- liveswapface_preview_tools-0.1.0/liveswapface_preview_tools.egg-info/PKG-INFO +27 -0
- liveswapface_preview_tools-0.1.0/liveswapface_preview_tools.egg-info/SOURCES.txt +9 -0
- liveswapface_preview_tools-0.1.0/liveswapface_preview_tools.egg-info/dependency_links.txt +1 -0
- liveswapface_preview_tools-0.1.0/liveswapface_preview_tools.egg-info/entry_points.txt +2 -0
- liveswapface_preview_tools-0.1.0/liveswapface_preview_tools.egg-info/top_level.txt +1 -0
- liveswapface_preview_tools-0.1.0/liveswapface_preview_tools.py +52 -0
- liveswapface_preview_tools-0.1.0/pyproject.toml +21 -0
- liveswapface_preview_tools-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 liveswapface-preview-tools contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: liveswapface-preview-tools
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local shot checklist and credit estimate for face-swap preview planning
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Homepage, https://liveswapface.com/
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Environment :: Console
|
|
9
|
+
Classifier: Topic :: Multimedia :: Video
|
|
10
|
+
Requires-Python: >=3.9
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
# LiveSwapFace Preview Tools
|
|
16
|
+
|
|
17
|
+
Small offline tools for planning a short camera preview. The checklist focuses on consent, consistent lighting, motion, and visual review. The credit estimator accepts a rate supplied by the user because pricing can change; it does not call an API or process video.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install liveswapface-preview-tools
|
|
21
|
+
liveswapface-preview checklist
|
|
22
|
+
liveswapface-preview estimate 12.5 3
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Before recording, run a brief turn-and-expression test, then compare the estimate with the current official pricing. For a browser preview, [live swap face](https://liveswapface.com/) provides the product workflow this companion is designed around. Keep permission records for the people and images involved, and review the result before sharing. This package does not perform face swapping or claim to be a video model.
|
|
26
|
+
|
|
27
|
+
No camera footage or images are transmitted by this CLI.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# LiveSwapFace Preview Tools
|
|
2
|
+
|
|
3
|
+
Small offline tools for planning a short camera preview. The checklist focuses on consent, consistent lighting, motion, and visual review. The credit estimator accepts a rate supplied by the user because pricing can change; it does not call an API or process video.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install liveswapface-preview-tools
|
|
7
|
+
liveswapface-preview checklist
|
|
8
|
+
liveswapface-preview estimate 12.5 3
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Before recording, run a brief turn-and-expression test, then compare the estimate with the current official pricing. For a browser preview, [live swap face](https://liveswapface.com/) provides the product workflow this companion is designed around. Keep permission records for the people and images involved, and review the result before sharing. This package does not perform face swapping or claim to be a video model.
|
|
12
|
+
|
|
13
|
+
No camera footage or images are transmitted by this CLI.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: liveswapface-preview-tools
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local shot checklist and credit estimate for face-swap preview planning
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Homepage, https://liveswapface.com/
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Environment :: Console
|
|
9
|
+
Classifier: Topic :: Multimedia :: Video
|
|
10
|
+
Requires-Python: >=3.9
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
# LiveSwapFace Preview Tools
|
|
16
|
+
|
|
17
|
+
Small offline tools for planning a short camera preview. The checklist focuses on consent, consistent lighting, motion, and visual review. The credit estimator accepts a rate supplied by the user because pricing can change; it does not call an API or process video.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install liveswapface-preview-tools
|
|
21
|
+
liveswapface-preview checklist
|
|
22
|
+
liveswapface-preview estimate 12.5 3
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Before recording, run a brief turn-and-expression test, then compare the estimate with the current official pricing. For a browser preview, [live swap face](https://liveswapface.com/) provides the product workflow this companion is designed around. Keep permission records for the people and images involved, and review the result before sharing. This package does not perform face swapping or claim to be a video model.
|
|
26
|
+
|
|
27
|
+
No camera footage or images are transmitted by this CLI.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
liveswapface_preview_tools.py
|
|
4
|
+
pyproject.toml
|
|
5
|
+
liveswapface_preview_tools.egg-info/PKG-INFO
|
|
6
|
+
liveswapface_preview_tools.egg-info/SOURCES.txt
|
|
7
|
+
liveswapface_preview_tools.egg-info/dependency_links.txt
|
|
8
|
+
liveswapface_preview_tools.egg-info/entry_points.txt
|
|
9
|
+
liveswapface_preview_tools.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
liveswapface_preview_tools
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""Offline planning tools for short face-swap camera previews."""
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
import json
|
|
5
|
+
from decimal import Decimal, InvalidOperation, ROUND_CEILING
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
SHOT_CHECKLIST = (
|
|
9
|
+
"Get consent for the reference image and recording.",
|
|
10
|
+
"Keep lighting and camera distance stable.",
|
|
11
|
+
"Face forward, then turn left and right.",
|
|
12
|
+
"Speak and smile to inspect mouth and expression tracking.",
|
|
13
|
+
"Briefly occlude part of the face to inspect recovery.",
|
|
14
|
+
"Review jaw, hairline, eyes, and glasses frame by frame.",
|
|
15
|
+
"Label transformed footage when sharing it publicly.",
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def estimate_credits(seconds: str, credits_per_second: str) -> int:
|
|
20
|
+
"""Return an integer credit estimate with upward rounding."""
|
|
21
|
+
try:
|
|
22
|
+
duration = Decimal(seconds)
|
|
23
|
+
rate = Decimal(credits_per_second)
|
|
24
|
+
except InvalidOperation as exc:
|
|
25
|
+
raise ValueError("Seconds and rate must be decimal numbers") from exc
|
|
26
|
+
if not duration.is_finite() or not rate.is_finite() or duration <= 0 or rate <= 0:
|
|
27
|
+
raise ValueError("Seconds and rate must be positive finite numbers")
|
|
28
|
+
return int((duration * rate).to_integral_value(rounding=ROUND_CEILING))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def main(argv=None) -> int:
|
|
32
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
33
|
+
sub = parser.add_subparsers(dest="command", required=True)
|
|
34
|
+
sub.add_parser("checklist", help="Print a consent and motion review checklist")
|
|
35
|
+
estimate = sub.add_parser("estimate", help="Estimate credits using a rate you supply")
|
|
36
|
+
estimate.add_argument("seconds", help="Preview duration")
|
|
37
|
+
estimate.add_argument("credits_per_second", help="Current rate from the official pricing page")
|
|
38
|
+
args = parser.parse_args(argv)
|
|
39
|
+
if args.command == "checklist":
|
|
40
|
+
for number, item in enumerate(SHOT_CHECKLIST, 1):
|
|
41
|
+
print(f"{number}. {item}")
|
|
42
|
+
return 0
|
|
43
|
+
try:
|
|
44
|
+
credits = estimate_credits(args.seconds, args.credits_per_second)
|
|
45
|
+
except ValueError as exc:
|
|
46
|
+
parser.error(str(exc))
|
|
47
|
+
print(json.dumps({"seconds": args.seconds, "credits_per_second": args.credits_per_second, "estimated_credits": credits}))
|
|
48
|
+
return 0
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
if __name__ == "__main__":
|
|
52
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "liveswapface-preview-tools"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Local shot checklist and credit estimate for face-swap preview planning"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
classifiers = ["Programming Language :: Python :: 3", "Environment :: Console", "Topic :: Multimedia :: Video"]
|
|
13
|
+
|
|
14
|
+
[project.urls]
|
|
15
|
+
Homepage = "https://liveswapface.com/"
|
|
16
|
+
|
|
17
|
+
[project.scripts]
|
|
18
|
+
liveswapface-preview = "liveswapface_preview_tools:main"
|
|
19
|
+
|
|
20
|
+
[tool.setuptools]
|
|
21
|
+
py-modules = ["liveswapface_preview_tools"]
|