Roman commited on
Commit
02841d1
1 Parent(s): 1974e22

chore: clean compile function

Browse files
filters.py CHANGED
@@ -218,14 +218,11 @@ class Filter:
218
 
219
  def compile(self):
220
  """Compile the filter on a representative inputset."""
221
- # Generate a random representative set of images used for compilation, following Torch's
222
- # shape format (batch, in_channels, image_height, image_width) for each samples
223
- # This version's compiler only handles tuples of 1-batch array as inputset, meaning we need
224
- # to define the inputset as a Tuple[np.ndarray[shape=(1, 3, H, W)]]
225
  np.random.seed(42)
226
- # inputset = tuple(
227
- # np.random.randint(0, 256, size=((1, 3) + INPUT_SHAPE), dtype=np.int64) for _ in range(100)
228
- # )
229
  inputset = tuple(
230
  np.random.randint(0, 256, size=(INPUT_SHAPE + (3, )), dtype=np.int64) for _ in range(100)
231
  )
 
218
 
219
  def compile(self):
220
  """Compile the filter on a representative inputset."""
221
+ # Generate a random representative set of images used for compilation, following shape
222
+ # PIL's shape RGB format for Numpy arrays (image_width, image_height, 3)
223
+ # Additionally, this version's compiler only handles tuples of 1-batch array as inputset,
224
+ # meaning we need to define the inputset as a Tuple[np.ndarray[shape=(H, W, 3)]]
225
  np.random.seed(42)
 
 
 
226
  inputset = tuple(
227
  np.random.randint(0, 256, size=(INPUT_SHAPE + (3, )), dtype=np.int64) for _ in range(100)
228
  )
filters/black and white/deployment/client.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d29a4e9e982ee241d8add504f07bcf97f4d8a0e9ac829beadca47a776071b529
3
  size 385
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c7e1c5c599fcc4e07bd722acdb7714449806fca6b3ba3817bbf24f30b8eaeb88
3
  size 385
filters/black and white/deployment/server.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a5c5140caae2aa8da37b2cde5f5fa4d91ad4eab377e026e64f8d85824c615eb7
3
  size 5740
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e17cf05929c3d85ccb22e328253482cd7df9801ce401887d0bf31fba9a388699
3
  size 5740
filters/blur/deployment/client.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4ae0e376e218678bda97cc74d9ec982f3bc2d6481de0f1d7ce9fe1aa86bb949f
3
  size 391
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2916f7efa8bc228ec36546a2b7546d7a18748bf412369a6b156b40ef959a64b6
3
  size 391
filters/blur/deployment/server.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9743554d7f410d98e8cb2a42419805ee2474f7a7a72d53a0af6878d5ac57ae83
3
  size 8716
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dbec6d836330771abc58d883ad0d412aaaa80890a95d326ff7e5b7d6a4c06dd6
3
  size 8716
filters/identity/deployment/client.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1e6069504c9bdbee4a7512503f0e0f14540dda5e81f07b8c06945e2fd130e816
3
  size 376
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0645e87469aabe50f6b2026483c56823e0cba7869927f7b7625be5e8220b444
3
  size 376
filters/identity/deployment/server.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0977f6308e0545c9f46a4a1558e7ac9d8b9768d4a975e6a7b300c87c7aa31eb5
3
  size 2537
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:479fc7ced59e53aab5beed63d8f79824e936e3cc46fffcd7be235f7ccc365d25
3
  size 2537
filters/inverted/deployment/client.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1e6069504c9bdbee4a7512503f0e0f14540dda5e81f07b8c06945e2fd130e816
3
  size 376
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0645e87469aabe50f6b2026483c56823e0cba7869927f7b7625be5e8220b444
3
  size 376
filters/inverted/deployment/server.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0c896a6ba50a4bdc05f6c2d7681d5bb2bb73455badad095eb89afff81371d851
3
  size 4152
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e005c8bb973987b999eff041c3bd8026c91edeb38c5c3c881831edb843f6f31
3
  size 4152
filters/ridge detection/deployment/client.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:284b77b3d44bde414f4d5024ed82d3661bb458d5161d4295d95fc093e1d43255
3
  size 395
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:db5a84074c5aaea704ac457be16762df2c5bfea22fe0a01d3667802bb7bbd956
3
  size 395
filters/ridge detection/deployment/server.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7ff23c15ac778614572e8133436479cad9386ae0ad4a73198ed265e9faee4677
3
  size 6440
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e82a31c2b3e7b0928a3a63865251be73eaced7904421ca4eb817d784ff4e3933
3
  size 6440
filters/rotate/deployment/client.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1e6069504c9bdbee4a7512503f0e0f14540dda5e81f07b8c06945e2fd130e816
3
  size 376
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0645e87469aabe50f6b2026483c56823e0cba7869927f7b7625be5e8220b444
3
  size 376
filters/rotate/deployment/server.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a4ff1894d64c954ef5030cc7f09edd1e33502b4a90879c7e1f98e3b00041a458
3
  size 4387
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f25b860acc97a759d8649bf9d5377cffc79fce725234d85e9d0c9b678c4c510b
3
  size 4387
filters/sharpen/deployment/client.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3b724ed4b2985d5bafe983054848abc35479add2fa265f8337336604908a1e62
3
  size 396
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b86b76dbb486d07be8890f0de14ee8a27a3b5b2fa2f82bed9ea1aa9ecbfa15b6
3
  size 396
filters/sharpen/deployment/server.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c19c95cdcea6a43e45a06370f67bd770f55e41757d0c85ca6815b56d704c2a92
3
  size 8735
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00c9f80281335d19b8aec5e8f6f43f5c889504094b973a16062c868a4fc0b373
3
  size 8735