xhiroga commited on
Commit
6aedd08
β€’
1 Parent(s): c0fe349

Upload folder using huggingface_hub

Browse files
.gitignore CHANGED
@@ -1,5 +1,4 @@
1
  data/
2
- models/*
3
- !models/model.safetensors
4
 
5
  __pycache__
 
1
  data/
2
+ models/
 
3
 
4
  __pycache__
README.md CHANGED
@@ -6,9 +6,17 @@ sdk_version: 4.16.0
6
  ---
7
  # γƒ‘γƒ«γƒ―γƒΌγƒ«γƒ‰γ§ζœ€γ‚‚γƒγ‚±γƒ’γƒ³γ«δΌΌγ¦γ„γ‚‹γƒ‘γƒ«γ―δ½•γ‹οΌŸ
8
 
9
- ## Run gradio
10
 
11
  ```powershell
12
- conda activate til-machine-learning
 
13
  python app.py
14
  ```
 
 
 
 
 
 
 
 
6
  ---
7
  # γƒ‘γƒ«γƒ―γƒΌγƒ«γƒ‰γ§ζœ€γ‚‚γƒγ‚±γƒ’γƒ³γ«δΌΌγ¦γ„γ‚‹γƒ‘γƒ«γ―δ½•γ‹οΌŸ
8
 
9
+ ## Run gradio on local
10
 
11
  ```powershell
12
+ conda env create -f environment.yml
13
+ conda activate pokemon-pal
14
  python app.py
15
  ```
16
+
17
+ ## Deploy gradio
18
+
19
+ ```powershell
20
+ conda activate pokemon-pal
21
+ gradio deploy
22
+ ```
environment.yml ADDED
@@ -0,0 +1,321 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ name: pokemon-pal
3
+ channels:
4
+ - pytorch
5
+ - nvidia
6
+ - microsoft
7
+ - conda-forge
8
+ - defaults
9
+ dependencies:
10
+ - aiofiles=23.2.1=pyhd8ed1ab_0
11
+ - aiohttp=3.9.1=py311ha68e1ae_0
12
+ - aiosignal=1.3.1=pyhd8ed1ab_0
13
+ - altair=5.2.0=pyhd8ed1ab_0
14
+ - annotated-types=0.6.0=pyhd8ed1ab_0
15
+ - anyio=3.7.1=pyhd8ed1ab_0
16
+ - aom=3.7.1=h63175ca_0
17
+ - asttokens=2.4.1=pyhd8ed1ab_0
18
+ - attrs=23.2.0=pyh71513ae_0
19
+ - aws-c-auth=0.7.11=hcf9e330_1
20
+ - aws-c-cal=0.6.9=hd33547d_3
21
+ - aws-c-common=0.9.12=hcfcfb64_0
22
+ - aws-c-compression=0.2.17=hd33547d_8
23
+ - aws-c-event-stream=0.4.1=h875930a_2
24
+ - aws-c-http=0.8.0=ha1a3518_2
25
+ - aws-c-io=0.14.0=hf372335_1
26
+ - aws-c-mqtt=0.10.1=hda1dad8_0
27
+ - aws-c-s3=0.4.9=hef93162_0
28
+ - aws-c-sdkutils=0.1.13=hd33547d_1
29
+ - aws-checksums=0.1.17=hd33547d_7
30
+ - aws-crt-cpp=0.26.0=hed7b20b_8
31
+ - aws-sdk-cpp=1.11.210=h20b5662_10
32
+ - beartype=0.17.0=pyhd8ed1ab_0
33
+ - beautifulsoup4=4.12.3=pyha770c72_0
34
+ - blas=2.121=mkl
35
+ - blas-devel=3.9.0=21_win64_mkl
36
+ - brotli=1.1.0=hcfcfb64_1
37
+ - brotli-bin=1.1.0=hcfcfb64_1
38
+ - brotli-python=1.1.0=py311h12c1d0e_1
39
+ - bs4=4.12.3=hd8ed1ab_0
40
+ - bzip2=1.0.8=hcfcfb64_5
41
+ - c-ares=1.26.0=hcfcfb64_0
42
+ - ca-certificates=2023.11.17=h56e8100_0
43
+ - cairo=1.18.0=h1fef639_0
44
+ - certifi=2023.11.17=pyhd8ed1ab_0
45
+ - charset-normalizer=3.3.2=pyhd8ed1ab_0
46
+ - click=8.1.7=win_pyh7428d3b_0
47
+ - colorama=0.4.6=pyhd8ed1ab_0
48
+ - comm=0.2.1=pyhd8ed1ab_0
49
+ - contourpy=1.2.0=py311h005e61a_0
50
+ - cuda-cccl=12.3.101=0
51
+ - cuda-cudart=12.1.105=0
52
+ - cuda-cudart-dev=12.1.105=0
53
+ - cuda-cupti=12.1.105=0
54
+ - cuda-libraries=12.1.0=0
55
+ - cuda-libraries-dev=12.1.0=0
56
+ - cuda-nvrtc=12.1.105=0
57
+ - cuda-nvrtc-dev=12.1.105=0
58
+ - cuda-nvtx=12.1.105=0
59
+ - cuda-opencl=12.3.101=0
60
+ - cuda-opencl-dev=12.3.101=0
61
+ - cuda-profiler-api=12.3.101=0
62
+ - cuda-runtime=12.1.0=0
63
+ - cycler=0.12.1=pyhd8ed1ab_0
64
+ - datasets=2.14.4=pyhd8ed1ab_0
65
+ - dav1d=1.2.1=hcfcfb64_0
66
+ - debugpy=1.8.0=py311h12c1d0e_1
67
+ - decorator=5.1.1=pyhd8ed1ab_0
68
+ - dill=0.3.7=pyhd8ed1ab_0
69
+ - exceptiongroup=1.2.0=pyhd8ed1ab_2
70
+ - executing=2.0.1=pyhd8ed1ab_0
71
+ - expat=2.5.0=h63175ca_1
72
+ - ffmpeg=6.1.1=gpl_hadb5375_101
73
+ - ffmpy=0.3.0=pyhb6f538c_0
74
+ - filelock=3.13.1=pyhd8ed1ab_0
75
+ - font-ttf-dejavu-sans-mono=2.37=hab24e00_0
76
+ - font-ttf-inconsolata=3.000=h77eed37_0
77
+ - font-ttf-source-code-pro=2.038=h77eed37_0
78
+ - font-ttf-ubuntu=0.83=h77eed37_1
79
+ - fontconfig=2.14.2=hbde0cde_0
80
+ - fonts-conda-ecosystem=1=0
81
+ - fonts-conda-forge=1=0
82
+ - fonttools=4.47.2=py311ha68e1ae_0
83
+ - freetype=2.12.1=hdaf720e_2
84
+ - frozenlist=1.4.1=py311ha68e1ae_0
85
+ - fsspec=2023.12.2=pyhca7485f_0
86
+ - gettext=0.21.1=h5728263_0
87
+ - glib=2.78.3=h12be248_0
88
+ - glib-tools=2.78.3=h12be248_0
89
+ - gradio=4.16.0=pyhd8ed1ab_0
90
+ - gradio-client=0.8.1=pyhd8ed1ab_0
91
+ - graphite2=1.3.13=1000
92
+ - gst-plugins-base=1.22.9=h001b923_0
93
+ - gstreamer=1.22.9=hb4038d2_0
94
+ - h11=0.14.0=pyhd8ed1ab_0
95
+ - h2=4.1.0=pyhd8ed1ab_0
96
+ - harfbuzz=8.3.0=h7ab893a_0
97
+ - hpack=4.0.0=pyh9f0ad1d_0
98
+ - httpcore=1.0.2=pyhd8ed1ab_0
99
+ - httpx=0.26.0=pyhd8ed1ab_0
100
+ - huggingface_hub=0.20.2=pyhd8ed1ab_0
101
+ - hyperframe=6.0.1=pyhd8ed1ab_0
102
+ - icu=73.2=h63175ca_0
103
+ - idna=3.6=pyhd8ed1ab_0
104
+ - importlib-metadata=7.0.1=pyha770c72_0
105
+ - importlib-resources=6.1.1=pyhd8ed1ab_0
106
+ - importlib_metadata=7.0.1=hd8ed1ab_0
107
+ - importlib_resources=6.1.1=pyhd8ed1ab_0
108
+ - intel-openmp=2024.0.0=h57928b3_49841
109
+ - ipykernel=6.29.0=pyha63f2e9_0
110
+ - ipython=8.20.0=pyh7428d3b_0
111
+ - jedi=0.19.1=pyhd8ed1ab_0
112
+ - jinja2=3.1.3=pyhd8ed1ab_0
113
+ - joblib=1.3.2=pyhd8ed1ab_0
114
+ - jsonschema=4.21.1=pyhd8ed1ab_0
115
+ - jsonschema-specifications=2023.12.1=pyhd8ed1ab_0
116
+ - jupyter_client=8.6.0=pyhd8ed1ab_0
117
+ - jupyter_core=5.7.1=py311h1ea47a8_0
118
+ - kiwisolver=1.4.5=py311h005e61a_1
119
+ - krb5=1.21.2=heb0366b_0
120
+ - lcms2=2.16=h67d730c_0
121
+ - lerc=4.0.0=h63175ca_0
122
+ - libabseil=20230802.1=cxx17_h63175ca_0
123
+ - libarrow=14.0.2=he5f67d5_2_cpu
124
+ - libarrow-acero=14.0.2=h63175ca_2_cpu
125
+ - libarrow-dataset=14.0.2=h63175ca_2_cpu
126
+ - libarrow-flight=14.0.2=h53b1db0_2_cpu
127
+ - libarrow-flight-sql=14.0.2=h78eab7c_2_cpu
128
+ - libarrow-gandiva=14.0.2=hb2eaab1_2_cpu
129
+ - libarrow-substrait=14.0.2=hd4c9904_2_cpu
130
+ - libblas=3.9.0=21_win64_mkl
131
+ - libbrotlicommon=1.1.0=hcfcfb64_1
132
+ - libbrotlidec=1.1.0=hcfcfb64_1
133
+ - libbrotlienc=1.1.0=hcfcfb64_1
134
+ - libcblas=3.9.0=21_win64_mkl
135
+ - libclang=15.0.7=default_hde6756a_4
136
+ - libclang13=15.0.7=default_h85b4d89_4
137
+ - libcrc32c=1.1.2=h0e60522_0
138
+ - libcublas=12.1.0.26=0
139
+ - libcublas-dev=12.1.0.26=0
140
+ - libcufft=11.0.2.4=0
141
+ - libcufft-dev=11.0.2.4=0
142
+ - libcurand=10.3.4.107=0
143
+ - libcurand-dev=10.3.4.107=0
144
+ - libcurl=8.5.0=hd5e4a3a_0
145
+ - libcusolver=11.4.4.55=0
146
+ - libcusolver-dev=11.4.4.55=0
147
+ - libcusparse=12.0.2.55=0
148
+ - libcusparse-dev=12.0.2.55=0
149
+ - libdeflate=1.19=hcfcfb64_0
150
+ - libevent=2.1.12=h3671451_1
151
+ - libexpat=2.5.0=h63175ca_1
152
+ - libffi=3.4.2=h8ffe710_5
153
+ - libglib=2.78.3=h16e383f_0
154
+ - libgoogle-cloud=2.12.0=h39f2fc6_4
155
+ - libgrpc=1.59.3=h5bbd4a7_0
156
+ - libhwloc=2.9.3=default_haede6df_1009
157
+ - libiconv=1.17=hcfcfb64_2
158
+ - libjpeg-turbo=3.0.0=hcfcfb64_1
159
+ - liblapack=3.9.0=21_win64_mkl
160
+ - liblapacke=3.9.0=21_win64_mkl
161
+ - libnpp=12.0.2.50=0
162
+ - libnpp-dev=12.0.2.50=0
163
+ - libnvjitlink=12.1.105=0
164
+ - libnvjitlink-dev=12.1.105=0
165
+ - libnvjpeg=12.1.1.14=0
166
+ - libnvjpeg-dev=12.1.1.14=0
167
+ - libogg=1.3.4=h8ffe710_1
168
+ - libopus=1.3.1=h8ffe710_1
169
+ - libparquet=14.0.2=h7ec3a38_2_cpu
170
+ - libpng=1.6.39=h19919ed_0
171
+ - libprotobuf=4.24.4=hb8276f3_0
172
+ - libre2-11=2023.06.02=h8c5ae5e_0
173
+ - libsodium=1.0.18=h8d14728_1
174
+ - libsqlite=3.44.2=hcfcfb64_0
175
+ - libssh2=1.11.0=h7dfc565_0
176
+ - libthrift=0.19.0=ha2b3283_1
177
+ - libtiff=4.6.0=h6e2ebb7_2
178
+ - libutf8proc=2.8.0=h82a8f57_0
179
+ - libuv=1.44.2=hcfcfb64_1
180
+ - libvorbis=1.3.7=h0e60522_0
181
+ - libwebp-base=1.3.2=hcfcfb64_0
182
+ - libxcb=1.15=hcd874cb_0
183
+ - libxml2=2.12.4=hc3477c8_1
184
+ - libzlib=1.2.13=hcfcfb64_5
185
+ - lz4-c=1.9.4=hcfcfb64_0
186
+ - m2w64-gcc-libgfortran=5.3.0=6
187
+ - m2w64-gcc-libs=5.3.0=7
188
+ - m2w64-gcc-libs-core=5.3.0=7
189
+ - m2w64-gmp=6.1.0=2
190
+ - m2w64-libwinpthread-git=5.0.0.4634.697f757=2
191
+ - markdown-it-py=3.0.0=pyhd8ed1ab_0
192
+ - markupsafe=2.1.4=py311ha68e1ae_0
193
+ - matplotlib=3.8.2=py311h1ea47a8_0
194
+ - matplotlib-base=3.8.2=py311h6e989c2_0
195
+ - matplotlib-inline=0.1.6=pyhd8ed1ab_0
196
+ - mdurl=0.1.2=pyhd8ed1ab_0
197
+ - mkl=2024.0.0=h66d3029_49657
198
+ - mkl-devel=2024.0.0=h57928b3_49657
199
+ - mkl-include=2024.0.0=h66d3029_49657
200
+ - mpmath=1.3.0=pyhd8ed1ab_0
201
+ - msys2-conda-epoch=20160418=1
202
+ - multidict=6.0.4=py311ha68e1ae_1
203
+ - multiprocess=0.70.15=py311ha68e1ae_1
204
+ - munkres=1.1.4=pyh9f0ad1d_0
205
+ - nest-asyncio=1.6.0=pyhd8ed1ab_0
206
+ - networkx=3.2.1=pyhd8ed1ab_0
207
+ - numpy=1.26.3=py311h0b4df5a_0
208
+ - openh264=2.4.0=h63175ca_0
209
+ - openjpeg=2.5.0=h3d672ee_3
210
+ - openssl=3.2.0=hcfcfb64_1
211
+ - orc=1.9.2=hf0b6bd4_0
212
+ - orjson=3.9.10=py311h5443569_0
213
+ - packaging=23.2=pyhd8ed1ab_0
214
+ - pandas=2.2.0=py311hf63dbb6_0
215
+ - parso=0.8.3=pyhd8ed1ab_0
216
+ - pcre2=10.42=h17e33f8_0
217
+ - pickleshare=0.7.5=py_1003
218
+ - pip=23.3.2=pyhd8ed1ab_0
219
+ - pixman=0.43.0=h63175ca_0
220
+ - pkgutil-resolve-name=1.3.10=pyhd8ed1ab_1
221
+ - platformdirs=4.1.0=pyhd8ed1ab_0
222
+ - ply=3.11=py_1
223
+ - prompt-toolkit=3.0.42=pyha770c72_0
224
+ - psutil=5.9.8=py311ha68e1ae_0
225
+ - pthread-stubs=0.4=hcd874cb_1001
226
+ - pthreads-win32=2.9.1=hfa6e2cd_3
227
+ - pure_eval=0.2.2=pyhd8ed1ab_0
228
+ - pyarrow=14.0.2=py311h6a6099b_2_cpu
229
+ - pydantic=2.5.3=pyhd8ed1ab_0
230
+ - pydantic-core=2.14.6=py311hc37eb10_1
231
+ - pydub=0.25.1=pyhd8ed1ab_0
232
+ - pygments=2.17.2=pyhd8ed1ab_0
233
+ - pyparsing=3.1.1=pyhd8ed1ab_0
234
+ - pyqt=5.15.9=py311h125bc19_5
235
+ - pyqt5-sip=12.12.2=py311h12c1d0e_5
236
+ - pysocks=1.7.1=pyh0701188_6
237
+ - python=3.11.7=h2628c8c_1_cpython
238
+ - python-dateutil=2.8.2=pyhd8ed1ab_0
239
+ - python-multipart=0.0.6=pyhd8ed1ab_0
240
+ - python-tzdata=2023.4=pyhd8ed1ab_0
241
+ - python-xxhash=3.4.1=py311ha68e1ae_0
242
+ - python_abi=3.11=4_cp311
243
+ - pytorch=2.1.2=py3.11_cuda12.1_cudnn8_0
244
+ - pytorch-cuda=12.1=hde6ce7c_5
245
+ - pytorch-mutex=1.0=cuda
246
+ - pytz=2023.3.post1=pyhd8ed1ab_0
247
+ - pywin32=306=py311h12c1d0e_2
248
+ - pyyaml=6.0.1=py311ha68e1ae_1
249
+ - pyzmq=25.1.2=py311h9250fbb_0
250
+ - qt-main=5.15.8=h9e85ed6_18
251
+ - re2=2023.06.02=hcbb65ff_0
252
+ - referencing=0.32.1=pyhd8ed1ab_0
253
+ - regex=2023.12.25=py311ha68e1ae_0
254
+ - requests=2.31.0=pyhd8ed1ab_0
255
+ - rich=13.7.0=pyhd8ed1ab_0
256
+ - rpds-py=0.17.1=py311hc37eb10_0
257
+ - ruff=0.1.14=py311hc14472d_1
258
+ - safetensors=0.3.3=py311hc37eb10_1
259
+ - scikit-learn=1.4.0=py311h142b183_0
260
+ - scipy=1.12.0=py311h0b4df5a_2
261
+ - semantic_version=2.10.0=pyhd8ed1ab_0
262
+ - setuptools=69.0.3=pyhd8ed1ab_0
263
+ - shellingham=1.5.4=pyhd8ed1ab_0
264
+ - sip=6.7.12=py311h12c1d0e_0
265
+ - six=1.16.0=pyh6c4a22f_0
266
+ - snappy=1.1.10=hfb803bf_0
267
+ - sniffio=1.3.0=pyhd8ed1ab_0
268
+ - soupsieve=2.5=pyhd8ed1ab_1
269
+ - stack_data=0.6.2=pyhd8ed1ab_0
270
+ - svt-av1=1.8.0=h63175ca_0
271
+ - sympy=1.12=pyh04b8f61_3
272
+ - tbb=2021.11.0=h91493d7_1
273
+ - threadpoolctl=3.2.0=pyha21a80b_0
274
+ - tk=8.6.13=h5226925_1
275
+ - tokenizers=0.15.1=py311h91c4a10_0
276
+ - toml=0.10.2=pyhd8ed1ab_0
277
+ - tomli=2.0.1=pyhd8ed1ab_0
278
+ - tomlkit=0.12.0=pyha770c72_0
279
+ - toolz=0.12.1=pyhd8ed1ab_0
280
+ - tornado=6.3.3=py311ha68e1ae_1
281
+ - tqdm=4.66.1=pyhd8ed1ab_0
282
+ - traitlets=5.14.1=pyhd8ed1ab_0
283
+ - transformers=4.37.1=pyhd8ed1ab_0
284
+ - typer=0.9.0=pyhd8ed1ab_0
285
+ - typing-extensions=4.9.0=hd8ed1ab_0
286
+ - typing_extensions=4.9.0=pyha770c72_0
287
+ - tzdata=2023d=h0c530f3_0
288
+ - ucrt=10.0.22621.0=h57928b3_0
289
+ - urllib3=2.1.0=pyhd8ed1ab_0
290
+ - vc=14.3=hcf57466_18
291
+ - vc14_runtime=14.38.33130=h82b7239_18
292
+ - vs2015_runtime=14.38.33130=hcb4865c_18
293
+ - wcwidth=0.2.13=pyhd8ed1ab_0
294
+ - websockets=11.0.3=py311ha68e1ae_1
295
+ - wheel=0.42.0=pyhd8ed1ab_0
296
+ - win_inet_pton=1.1.0=pyhd8ed1ab_6
297
+ - x264=1!164.3095=h8ffe710_2
298
+ - x265=3.5=h2d74725_3
299
+ - xorg-libxau=1.0.11=hcd874cb_0
300
+ - xorg-libxdmcp=1.1.3=hcd874cb_0
301
+ - xxhash=0.8.2=hcfcfb64_0
302
+ - xz=5.2.6=h8d14728_0
303
+ - yaml=0.2.5=h8ffe710_2
304
+ - yarl=1.9.4=py311ha68e1ae_0
305
+ - zeromq=4.3.5=h63175ca_0
306
+ - zipp=3.17.0=pyhd8ed1ab_0
307
+ - zlib=1.2.13=hcfcfb64_5
308
+ - zstd=1.5.5=h12be248_0
309
+ - pip:
310
+ - carvekit==4.1.1
311
+ - fastapi==0.108.0
312
+ - loguru==0.7.2
313
+ - opencv-python==4.8.1.78
314
+ - pillow==10.1.0
315
+ - starlette==0.32.0.post1
316
+ - torchaudio==2.1.2
317
+ - torchvision==0.16.2
318
+ - typing==3.7.4.3
319
+ - uvicorn==0.25.0
320
+ - win32-setctime==1.1.0
321
+
notebooks/crop.ipynb CHANGED
@@ -61,7 +61,7 @@
61
  },
62
  {
63
  "cell_type": "code",
64
- "execution_count": 5,
65
  "metadata": {},
66
  "outputs": [],
67
  "source": [
@@ -113,30 +113,6 @@
113
  "show_bounding_boxes('../data/nobg/γƒγ‚±γƒƒγƒˆγƒ’γƒ³γ‚Ήγ‚ΏγƒΌγ‚·γƒΌγƒ«γƒ‰/2020022922273500_s.png')\n"
114
  ]
115
  },
116
- {
117
- "cell_type": "code",
118
- "execution_count": 8,
119
- "metadata": {},
120
- "outputs": [
121
- {
122
- "name": "stdout",
123
- "output_type": "stream",
124
- "text": [
125
- "[]\n"
126
- ]
127
- }
128
- ],
129
- "source": [
130
- "file_path = '../data/nobg/every-pal-in-palworld-a-complete-paldeck-list/016 Palworld Teafant.png.png'\n",
131
- "\n",
132
- "image_pil = Image.open(file_path)\n",
133
- "image = np.array(image_pil)\n",
134
- "\n",
135
- "# Get the bounding boxes of the objects in the image\n",
136
- "contours = get_object_bounding_boxes(image)\n",
137
- "print(contours)"
138
- ]
139
- },
140
  {
141
  "cell_type": "code",
142
  "execution_count": 9,
@@ -145,8 +121,8 @@
145
  "source": [
146
  "import os\n",
147
  "\n",
148
- "input_dir = \"../data/nobg\"\n",
149
- "output_dir = \"../data/cropped\"\n",
150
  "\n",
151
  "def get_max_bounding_rect(contours):\n",
152
  " if len(contours) == 0:\n",
 
61
  },
62
  {
63
  "cell_type": "code",
64
+ "execution_count": 10,
65
  "metadata": {},
66
  "outputs": [],
67
  "source": [
 
113
  "show_bounding_boxes('../data/nobg/γƒγ‚±γƒƒγƒˆγƒ’γƒ³γ‚Ήγ‚ΏγƒΌγ‚·γƒΌγƒ«γƒ‰/2020022922273500_s.png')\n"
114
  ]
115
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  {
117
  "cell_type": "code",
118
  "execution_count": 9,
 
121
  "source": [
122
  "import os\n",
123
  "\n",
124
+ "input_dir = \"../data/nobg/ポケヒン公式\"\n",
125
+ "output_dir = \"../data/cropped/ポケヒン公式\"\n",
126
  "\n",
127
  "def get_max_bounding_rect(contours):\n",
128
  " if len(contours) == 0:\n",
notebooks/nobg.ipynb CHANGED
@@ -2,20 +2,9 @@
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
- "execution_count": 1,
6
  "metadata": {},
7
- "outputs": [
8
- {
9
- "name": "stderr",
10
- "output_type": "stream",
11
- "text": [
12
- "c:\\Users\\hiroga\\miniconda3\\envs\\pokemon-pal\\Lib\\site-packages\\tqdm\\auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
13
- " from .autonotebook import tqdm as notebook_tqdm\n",
14
- "c:\\Users\\hiroga\\miniconda3\\envs\\pokemon-pal\\Lib\\site-packages\\torchvision\\transforms\\functional.py:1603: UserWarning: The default value of the antialias parameter of all the resizing transforms (Resize(), RandomResizedCrop(), etc.) will change from None to True in v0.17, in order to be consistent across the PIL and Tensor backends. To suppress this warning, directly pass antialias=True (recommended, future default), antialias=None (current default, which means False for Tensors and True for PIL), or antialias=False (only works on Tensors - PIL will still use antialiasing). This also applies if you are using the inference transforms from the models weights: update the call to weights.transforms(antialias=True).\n",
15
- " warnings.warn(\n"
16
- ]
17
- }
18
- ],
19
  "source": [
20
  "import torch\n",
21
  "from carvekit.api.high import HiInterface\n",
 
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
+ "execution_count": 2,
6
  "metadata": {},
7
+ "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
8
  "source": [
9
  "import torch\n",
10
  "from carvekit.api.high import HiInterface\n",
notebooks/train.ipynb CHANGED
@@ -196,12 +196,12 @@
196
  " test_losses.append(running_test_loss/len(test_loader))\n",
197
  " print(f\"Epoch {epoch+1}: Train Loss = {train_losses[-1]}, Test Loss = {test_losses[-1]}\")\n",
198
  " \n",
199
- " # Save the model\n",
200
- " model_dir = '../models/'\n",
201
- " if not os.path.exists(model_dir):\n",
202
- " os.makedirs(model_dir)\n",
203
- " tensors = {name: param for name, param in model.named_parameters()}\n",
204
- " save_file(tensors, f\"{model_dir}SimpleCNN_{epoch+1}_{data_dir.replace('.', '').replace('/', '_')}_{image_size}x{image_size}.safetensors\")\n",
205
  " save_file(tensors, f\"{model_dir}model.safetensors\")\n",
206
  "\n",
207
  " # Plotting the losses\n",
 
196
  " test_losses.append(running_test_loss/len(test_loader))\n",
197
  " print(f\"Epoch {epoch+1}: Train Loss = {train_losses[-1]}, Test Loss = {test_losses[-1]}\")\n",
198
  " \n",
199
+ " # Save the model\n",
200
+ " model_dir = '../models/'\n",
201
+ " if not os.path.exists(model_dir):\n",
202
+ " os.makedirs(model_dir)\n",
203
+ " tensors = {name: param for name, param in model.named_parameters()}\n",
204
+ " save_file(tensors, f\"{model_dir}SimpleCNN_{epoch+1}_{data_dir.replace('.', '').replace('/', '_')}_{image_size}x{image_size}.safetensors\")\n",
205
  " save_file(tensors, f\"{model_dir}model.safetensors\")\n",
206
  "\n",
207
  " # Plotting the losses\n",