Skip to content

Commit 47ce49b

Browse files
committed
init
1 parent 8af5289 commit 47ce49b

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
log_file
22
wikiart_credential.json
3-
image-super-resolution
3+
image-super-resolution
4+
data

examples/generate_portrait_data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def get_export_path(_path):
3333

3434
export_path = [get_export_path(i) for i in image_path]
3535

36+
3637
logging.info('Step 2: process for portrait dataset')
3738
processed_files = portrait_data_pipeline(image_path, export_path=export_path)
3839
logging.info('total {} images'.format(len(processed_files)))

wikiartcrawler/image_processors.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ def process_single_image(_image_path, _export_path):
198198
pre_isr_image_path = new_file_path(_export_path, 'pre_isr', export_dir)
199199
Image.fromarray(cv_img_out).save(pre_isr_image_path)
200200
isr_model.predict(pre_isr_image_path, _export_path)
201+
if not debug_mode:
202+
os.remove(pre_isr_image_path)
201203
return _export_path
202204
return None
203205

0 commit comments

Comments
 (0)