sketchkit 0.0.1__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.
Potentially problematic release.
This version of sketchkit might be problematic. Click here for more details.
- sketchkit-0.0.1/PKG-INFO +121 -0
- sketchkit-0.0.1/README.md +100 -0
- sketchkit-0.0.1/pyproject.toml +36 -0
- sketchkit-0.0.1/setup.cfg +4 -0
- sketchkit-0.0.1/sketchkit/__init__.py +9 -0
- sketchkit-0.0.1/sketchkit/core/__init__.py +3 -0
- sketchkit-0.0.1/sketchkit/core/sketch.py +661 -0
- sketchkit-0.0.1/sketchkit/core/sketch3d.py +0 -0
- sketchkit-0.0.1/sketchkit/datasets/__init__.py +23 -0
- sketchkit-0.0.1/sketchkit/datasets/controlsketch.py +403 -0
- sketchkit-0.0.1/sketchkit/datasets/creative_sketch.py +370 -0
- sketchkit-0.0.1/sketchkit/datasets/differsketching.py +261 -0
- sketchkit-0.0.1/sketchkit/datasets/fscoco.py +265 -0
- sketchkit-0.0.1/sketchkit/datasets/gmu_sketch_cleanup.py +317 -0
- sketchkit-0.0.1/sketchkit/datasets/hzy_sketch.py +238 -0
- sketchkit-0.0.1/sketchkit/datasets/opensketch.py +323 -0
- sketchkit-0.0.1/sketchkit/datasets/photosketching.py +416 -0
- sketchkit-0.0.1/sketchkit/datasets/quickdraw.py +356 -0
- sketchkit-0.0.1/sketchkit/datasets/sketchx_pris.py +299 -0
- sketchkit-0.0.1/sketchkit/datasets/sketchy.py +386 -0
- sketchkit-0.0.1/sketchkit/datasets/tracing_vs_freehand.py +311 -0
- sketchkit-0.0.1/sketchkit/datasets/tu_berlin.py +381 -0
- sketchkit-0.0.1/sketchkit/models/__init__.py +0 -0
- sketchkit-0.0.1/sketchkit/renderer/cairo_renderer.py +315 -0
- sketchkit-0.0.1/sketchkit/utils/__init__.py +0 -0
- sketchkit-0.0.1/sketchkit/utils/dataset.py +194 -0
- sketchkit-0.0.1/sketchkit/utils/file.py +147 -0
- sketchkit-0.0.1/sketchkit/utils/geometry.py +150 -0
- sketchkit-0.0.1/sketchkit/utils/transform.py +32 -0
- sketchkit-0.0.1/sketchkit.egg-info/PKG-INFO +121 -0
- sketchkit-0.0.1/sketchkit.egg-info/SOURCES.txt +33 -0
- sketchkit-0.0.1/sketchkit.egg-info/dependency_links.txt +1 -0
- sketchkit-0.0.1/sketchkit.egg-info/requires.txt +14 -0
- sketchkit-0.0.1/sketchkit.egg-info/top_level.txt +1 -0
- sketchkit-0.0.1/tests/test_renderer.py +16 -0
sketchkit-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sketchkit
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: An universal toolkit for sketching
|
|
5
|
+
Requires-Python: >=3.12
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
Requires-Dist: cairocffi>=1.7.1
|
|
8
|
+
Requires-Dist: fastparquet>=2024.11.0
|
|
9
|
+
Requires-Dist: gdown>=5.2.0
|
|
10
|
+
Requires-Dist: ndjson>=0.3.1
|
|
11
|
+
Requires-Dist: pandas>=2.3.2
|
|
12
|
+
Requires-Dist: patool>=4.0.1
|
|
13
|
+
Requires-Dist: py7zr>=1.0.0
|
|
14
|
+
Requires-Dist: pyunpack>=0.3
|
|
15
|
+
Requires-Dist: rich>=14.1.0
|
|
16
|
+
Requires-Dist: svg-path>=7.0
|
|
17
|
+
Requires-Dist: svgpathtools>=1.7.1
|
|
18
|
+
Requires-Dist: torch>=2.8.0
|
|
19
|
+
Requires-Dist: torchvision>=0.23.0
|
|
20
|
+
Requires-Dist: wget>=3.2
|
|
21
|
+
|
|
22
|
+
# SketchKit
|
|
23
|
+
|
|
24
|
+
## Documentation
|
|
25
|
+
|
|
26
|
+
The docs can found on [https://cislab.hkust-gz.edu.cn/projects/sketchkit/docs/](https://cislab.hkust-gz.edu.cn/projects/sketchkit/docs/). The api docs will be auto generated after each commit.
|
|
27
|
+
|
|
28
|
+
If you want to contribute to manual docs, please refer to documents in `docs/source/manual` folder, just like:
|
|
29
|
+
|
|
30
|
+
- [docs/source/manual/0_representation.md](docs/source/manual/0_representation.md)
|
|
31
|
+
|
|
32
|
+
### Docstring
|
|
33
|
+
|
|
34
|
+
A [Python Docstring](https://peps.python.org/pep-0257/) (short for documentation string) is a special kind of string in Python used to describe what your code does. It’s written as a string literal — usually triple quotes """ ... """ or ''' ... ''' — placed immediately after a function, class, or module definition.
|
|
35
|
+
|
|
36
|
+
We can auto-generate documentation with these docstrings using some tools.
|
|
37
|
+
|
|
38
|
+
We recommand [Google Style](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) or [reST Style](https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html) docsrtings.
|
|
39
|
+
|
|
40
|
+
A Google Style docstring is like this:
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
def add_numbers(a: int, b: int) -> int:
|
|
44
|
+
"""Add two numbers.
|
|
45
|
+
|
|
46
|
+
Args:
|
|
47
|
+
a (int): First number.
|
|
48
|
+
b (int): Second number.
|
|
49
|
+
|
|
50
|
+
Returns:
|
|
51
|
+
int: Sum of the two numbers.
|
|
52
|
+
"""
|
|
53
|
+
return a + b
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Tip:** you can just let chatGPT do this for you! 😆
|
|
57
|
+
|
|
58
|
+
## Development
|
|
59
|
+
|
|
60
|
+
We adapt the [GitHub flow](https://docs.github.com/en/get-started/using-github/github-flow) for collaboration.
|
|
61
|
+
|
|
62
|
+
### 1. Fork the Repository
|
|
63
|
+
|
|
64
|
+
If you don’t have write access to the original repository, fork it to your account.
|
|
65
|
+
|
|
66
|
+
- Go to the repository page and click **Fork**.
|
|
67
|
+
- This creates your own copy where you can make changes.
|
|
68
|
+
- [Learn more about forking](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
|
|
69
|
+
|
|
70
|
+
### 2. Create a Branch
|
|
71
|
+
|
|
72
|
+
- Use a short, descriptive name (e.g., `fix-typo`, `add-feature-x`).
|
|
73
|
+
- Keeps changes isolated from the default branch.
|
|
74
|
+
- [How to create a branch](https://docs.github.com/en/repositories/creating-and-managing-branches)
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
git checkout -b {new_branch_name}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 3. Make Changes
|
|
81
|
+
|
|
82
|
+
- Edit, add, rename, move, or delete files.
|
|
83
|
+
- Commit changes with descriptive messages.
|
|
84
|
+
- Keep each commit focused on a single change for easier review/revert.
|
|
85
|
+
|
|
86
|
+
### 4. Push Changes
|
|
87
|
+
|
|
88
|
+
- Push commits to your branch on GitHub.
|
|
89
|
+
- Work is backed up remotely and visible to collaborators.
|
|
90
|
+
|
|
91
|
+
### 5. Create a Pull Request (PR)
|
|
92
|
+
|
|
93
|
+
- Go to your branch and click **New pull request**.
|
|
94
|
+
- Summarize changes, link related issues, and add visuals if helpful.
|
|
95
|
+
- Use **draft PR** for early feedback.
|
|
96
|
+
|
|
97
|
+
### 6. Address Review Comments
|
|
98
|
+
|
|
99
|
+
- Reviewers may suggest changes or leave questions.
|
|
100
|
+
- Commit and push updates—PR updates automatically.
|
|
101
|
+
|
|
102
|
+
### 7. Merge the Pull Request
|
|
103
|
+
|
|
104
|
+
- After approval and passing checks, merge your branch.
|
|
105
|
+
- Branch protection rules may require specific reviews or checks.
|
|
106
|
+
|
|
107
|
+
### 8. Delete Your Branch
|
|
108
|
+
|
|
109
|
+
- Removes clutter and signals work completion.
|
|
110
|
+
- You can restore or revert changes later if needed.
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
git branch -d your_local_branch
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Tips
|
|
117
|
+
|
|
118
|
+
- Create separate branches for unrelated changes.
|
|
119
|
+
- Link issues with keywords so they close automatically upon merge.
|
|
120
|
+
- Use status checks to catch errors before merging.
|
|
121
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# SketchKit
|
|
2
|
+
|
|
3
|
+
## Documentation
|
|
4
|
+
|
|
5
|
+
The docs can found on [https://cislab.hkust-gz.edu.cn/projects/sketchkit/docs/](https://cislab.hkust-gz.edu.cn/projects/sketchkit/docs/). The api docs will be auto generated after each commit.
|
|
6
|
+
|
|
7
|
+
If you want to contribute to manual docs, please refer to documents in `docs/source/manual` folder, just like:
|
|
8
|
+
|
|
9
|
+
- [docs/source/manual/0_representation.md](docs/source/manual/0_representation.md)
|
|
10
|
+
|
|
11
|
+
### Docstring
|
|
12
|
+
|
|
13
|
+
A [Python Docstring](https://peps.python.org/pep-0257/) (short for documentation string) is a special kind of string in Python used to describe what your code does. It’s written as a string literal — usually triple quotes """ ... """ or ''' ... ''' — placed immediately after a function, class, or module definition.
|
|
14
|
+
|
|
15
|
+
We can auto-generate documentation with these docstrings using some tools.
|
|
16
|
+
|
|
17
|
+
We recommand [Google Style](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) or [reST Style](https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html) docsrtings.
|
|
18
|
+
|
|
19
|
+
A Google Style docstring is like this:
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
def add_numbers(a: int, b: int) -> int:
|
|
23
|
+
"""Add two numbers.
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
a (int): First number.
|
|
27
|
+
b (int): Second number.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
int: Sum of the two numbers.
|
|
31
|
+
"""
|
|
32
|
+
return a + b
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Tip:** you can just let chatGPT do this for you! 😆
|
|
36
|
+
|
|
37
|
+
## Development
|
|
38
|
+
|
|
39
|
+
We adapt the [GitHub flow](https://docs.github.com/en/get-started/using-github/github-flow) for collaboration.
|
|
40
|
+
|
|
41
|
+
### 1. Fork the Repository
|
|
42
|
+
|
|
43
|
+
If you don’t have write access to the original repository, fork it to your account.
|
|
44
|
+
|
|
45
|
+
- Go to the repository page and click **Fork**.
|
|
46
|
+
- This creates your own copy where you can make changes.
|
|
47
|
+
- [Learn more about forking](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
|
|
48
|
+
|
|
49
|
+
### 2. Create a Branch
|
|
50
|
+
|
|
51
|
+
- Use a short, descriptive name (e.g., `fix-typo`, `add-feature-x`).
|
|
52
|
+
- Keeps changes isolated from the default branch.
|
|
53
|
+
- [How to create a branch](https://docs.github.com/en/repositories/creating-and-managing-branches)
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
git checkout -b {new_branch_name}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 3. Make Changes
|
|
60
|
+
|
|
61
|
+
- Edit, add, rename, move, or delete files.
|
|
62
|
+
- Commit changes with descriptive messages.
|
|
63
|
+
- Keep each commit focused on a single change for easier review/revert.
|
|
64
|
+
|
|
65
|
+
### 4. Push Changes
|
|
66
|
+
|
|
67
|
+
- Push commits to your branch on GitHub.
|
|
68
|
+
- Work is backed up remotely and visible to collaborators.
|
|
69
|
+
|
|
70
|
+
### 5. Create a Pull Request (PR)
|
|
71
|
+
|
|
72
|
+
- Go to your branch and click **New pull request**.
|
|
73
|
+
- Summarize changes, link related issues, and add visuals if helpful.
|
|
74
|
+
- Use **draft PR** for early feedback.
|
|
75
|
+
|
|
76
|
+
### 6. Address Review Comments
|
|
77
|
+
|
|
78
|
+
- Reviewers may suggest changes or leave questions.
|
|
79
|
+
- Commit and push updates—PR updates automatically.
|
|
80
|
+
|
|
81
|
+
### 7. Merge the Pull Request
|
|
82
|
+
|
|
83
|
+
- After approval and passing checks, merge your branch.
|
|
84
|
+
- Branch protection rules may require specific reviews or checks.
|
|
85
|
+
|
|
86
|
+
### 8. Delete Your Branch
|
|
87
|
+
|
|
88
|
+
- Removes clutter and signals work completion.
|
|
89
|
+
- You can restore or revert changes later if needed.
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
git branch -d your_local_branch
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Tips
|
|
96
|
+
|
|
97
|
+
- Create separate branches for unrelated changes.
|
|
98
|
+
- Link issues with keywords so they close automatically upon merge.
|
|
99
|
+
- Use status checks to catch errors before merging.
|
|
100
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "sketchkit"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
description = "An universal toolkit for sketching"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.12"
|
|
7
|
+
dependencies = [
|
|
8
|
+
"cairocffi>=1.7.1",
|
|
9
|
+
"fastparquet>=2024.11.0",
|
|
10
|
+
"gdown>=5.2.0",
|
|
11
|
+
"ndjson>=0.3.1",
|
|
12
|
+
"pandas>=2.3.2",
|
|
13
|
+
"patool>=4.0.1",
|
|
14
|
+
"py7zr>=1.0.0",
|
|
15
|
+
"pyunpack>=0.3",
|
|
16
|
+
"rich>=14.1.0",
|
|
17
|
+
"svg-path>=7.0",
|
|
18
|
+
"svgpathtools>=1.7.1",
|
|
19
|
+
"torch>=2.8.0",
|
|
20
|
+
"torchvision>=0.23.0",
|
|
21
|
+
"wget>=3.2",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
[dependency-groups]
|
|
25
|
+
dev = [
|
|
26
|
+
{include-group = "doc"},
|
|
27
|
+
{include-group = "test"}
|
|
28
|
+
]
|
|
29
|
+
test = [
|
|
30
|
+
]
|
|
31
|
+
doc = [
|
|
32
|
+
"furo>=2025.7.19",
|
|
33
|
+
"myst-parser>=4.0.1",
|
|
34
|
+
"sphinx>=8.2.3",
|
|
35
|
+
"sphinxcontrib-napoleon>=0.7",
|
|
36
|
+
]
|