Skip to content
This repository was archived by the owner on Feb 27, 2023. It is now read-only.

Commit 4a56aed

Browse files
committed
Newer model, better images
1 parent 77f4e62 commit 4a56aed

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import tensorflow as tf
22

3-
IMG_SIZE = 1024
3+
IMG_SIZE = 512
44
OUTPUT_CHANNELS = 1
55

66
def downsample(filters, size, apply_batchnorm=True,strides = 2,name=''):

removestars.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515

1616
IMG_SIZE = 512
17-
MODEL_SIZE = 1024
17+
MODEL_SIZE = 512
1818
all_outputs = 1
19-
pad_width = 2
19+
pad_width = 8
2020
total_steps = 0
2121
progress_bar = None
2222
current_progress= 0
@@ -35,9 +35,9 @@ def process_tile(channel,i,j,pad_width,model,output_image):
3535
current_tile = current_tile.resize((IMG_SIZE-pad_width*2,IMG_SIZE-pad_width*2))
3636
blank_image.paste(current_tile,(pad_width,pad_width))
3737
blank_image = blank_image.resize((MODEL_SIZE,MODEL_SIZE))
38-
blank_image = np.asarray(blank_image,dtype="float16").reshape(1,MODEL_SIZE,MODEL_SIZE)/512
38+
blank_image = np.asarray(blank_image,dtype="float32").reshape(1,MODEL_SIZE,MODEL_SIZE)/512
3939
predicted_section = model.predict(blank_image,verbose=0)
40-
predicted_section = predicted_section.reshape(MODEL_SIZE,MODEL_SIZE)*1024
40+
predicted_section = predicted_section.reshape(MODEL_SIZE,MODEL_SIZE)*512
4141
predicted_section = Image.fromarray(predicted_section).convert('L')
4242
predicted_section = predicted_section.resize((IMG_SIZE,IMG_SIZE))
4343
predicted_section = predicted_section.crop((pad_width,pad_width,IMG_SIZE-pad_width,IMG_SIZE-pad_width))

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
tensorflow
22
numpy
33
pillow
4-
tqdm
4+
tqdm
5+
tensorflowjs
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:4b4e7b7a2066cc91cdf36d898dae5b98c0d005808c9e1906f640183ed116fb40
2+
oid sha256:985845db41f3949875762f4fa034b2a7a910ec4efde40086b8d6e52beef872fe
33
size 124532216

weights/weights.index

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)