Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main #155

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Main #155

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .gitignore
100755 → 100644
Empty file.
572 changes: 572 additions & 0 deletions .ipynb_checkpoints/gm_Generate New Label-checkpoint.ipynb

Large diffs are not rendered by default.

315 changes: 315 additions & 0 deletions .ipynb_checkpoints/gm_Label Check-checkpoint.ipynb

Large diffs are not rendered by default.

2,631 changes: 2,631 additions & 0 deletions .ipynb_checkpoints/gm_TestTimeTrainingTest-checkpoint.ipynb

Large diffs are not rendered by default.

764 changes: 764 additions & 0 deletions .ipynb_checkpoints/gm_Visualize-checkpoint.ipynb

Large diffs are not rendered by default.

Empty file modified data/__init__.py
100755 → 100644
Empty file.
Empty file modified data/base_dataset.py
100755 → 100644
Empty file.
Empty file modified data/image_folder.py
100755 → 100644
Empty file.
1 change: 0 additions & 1 deletion data/pix2pix_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def initialize(self, opt):
label_paths = label_paths[:opt.max_dataset_size]
image_paths = image_paths[:opt.max_dataset_size]
instance_paths = instance_paths[:opt.max_dataset_size]

if not opt.no_pairing_check:
for path1, path2 in zip(label_paths, image_paths):
assert self.paths_match(path1, path2), \
Expand Down
Empty file modified datasets/coco_stuff/train_img/000000017914.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_img/000000029286.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_img/000000138805.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_img/000000184101.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_img/000000197384.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_img/000000203744.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_img/000000284465.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_img/000000350505.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_img/000000371376.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_img/000000426773.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_img/000000475177.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_img/000000500044.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_img/000000580986.jpg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_inst/000000017914.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_inst/000000029286.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_inst/000000138805.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_inst/000000184101.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_inst/000000197384.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_inst/000000203744.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_inst/000000284465.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_inst/000000350505.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_inst/000000371376.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_inst/000000426773.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_inst/000000475177.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_inst/000000500044.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified datasets/coco_stuff/train_inst/000000580986.png
100755 → 100644
Empty file modified datasets/coco_stuff/train_label/000000017914.png
100755 → 100644
Empty file modified datasets/coco_stuff/train_label/000000029286.png
100755 → 100644
Empty file modified datasets/coco_stuff/train_label/000000138805.png
100755 → 100644
Empty file modified datasets/coco_stuff/train_label/000000184101.png
100755 → 100644
Empty file modified datasets/coco_stuff/train_label/000000197384.png
100755 → 100644
Empty file modified datasets/coco_stuff/train_label/000000203744.png
100755 → 100644
Empty file modified datasets/coco_stuff/train_label/000000284465.png
100755 → 100644
Empty file modified datasets/coco_stuff/train_label/000000350505.png
100755 → 100644
Empty file modified datasets/coco_stuff/train_label/000000371376.png
100755 → 100644
Empty file modified datasets/coco_stuff/train_label/000000426773.png
100755 → 100644
Empty file modified datasets/coco_stuff/train_label/000000475177.png
100755 → 100644
Empty file modified datasets/coco_stuff/train_label/000000500044.png
100755 → 100644
Empty file modified datasets/coco_stuff/train_label/000000580986.png
100755 → 100644
Empty file modified datasets/coco_stuff/val_img/000000000139.jpg
100755 → 100644
Empty file modified datasets/coco_stuff/val_img/000000000785.jpg
100755 → 100644
Empty file modified datasets/coco_stuff/val_img/000000001268.jpg
100755 → 100644
Empty file modified datasets/coco_stuff/val_img/000000001490.jpg
100755 → 100644
Empty file modified datasets/coco_stuff/val_img/000000001503.jpg
100755 → 100644
Empty file modified datasets/coco_stuff/val_img/000000001584.jpg
100755 → 100644
Empty file modified datasets/coco_stuff/val_img/000000001818.jpg
100755 → 100644
Empty file modified datasets/coco_stuff/val_img/000000001993.jpg
100755 → 100644
Empty file modified datasets/coco_stuff/val_inst/000000000139.png
100755 → 100644
Empty file modified datasets/coco_stuff/val_inst/000000000785.png
100755 → 100644
Empty file modified datasets/coco_stuff/val_inst/000000001268.png
100755 → 100644
Empty file modified datasets/coco_stuff/val_inst/000000001490.png
100755 → 100644
Empty file modified datasets/coco_stuff/val_inst/000000001503.png
100755 → 100644
Empty file modified datasets/coco_stuff/val_inst/000000001584.png
100755 → 100644
Empty file modified datasets/coco_stuff/val_inst/000000001818.png
100755 → 100644
Empty file modified datasets/coco_stuff/val_inst/000000001993.png
100755 → 100644
Empty file modified datasets/coco_stuff/val_label/000000000139.png
100755 → 100644
Empty file modified datasets/coco_stuff/val_label/000000000785.png
100755 → 100644
Empty file modified datasets/coco_stuff/val_label/000000001268.png
100755 → 100644
Empty file modified datasets/coco_stuff/val_label/000000001490.png
100755 → 100644
Empty file modified datasets/coco_stuff/val_label/000000001503.png
100755 → 100644
Empty file modified datasets/coco_stuff/val_label/000000001584.png
100755 → 100644
Empty file modified datasets/coco_stuff/val_label/000000001818.png
100755 → 100644
Empty file modified datasets/coco_stuff/val_label/000000001993.png
100755 → 100644
Empty file modified docs/images/teaser.jpg
100755 → 100644
572 changes: 572 additions & 0 deletions gm_Generate New Label.ipynb

Large diffs are not rendered by default.

315 changes: 315 additions & 0 deletions gm_Label Check.ipynb

Large diffs are not rendered by default.

Binary file added gm_TTTT/test2_img/004.jpg
Binary file added gm_TTTT/test2_label/004.png
Binary file added gm_TTTT/test_img/001_06.jpg
Binary file added gm_TTTT/test_label/001.png
Binary file added gm_TTTT/test_label1/001_01.png
Binary file added gm_TTTT/test_label2/001_02.png
Binary file added gm_TTTT/test_label3/001_03.png
Binary file added gm_TTTT/test_label4/001_04.png
Binary file added gm_TTTT/test_label5/001_05.png
Binary file added gm_TTTT/test_label6/001_06.png
Binary file added gm_TTTT/val_img/001.jpg
Binary file added gm_TTTT/val_img2/003_03.jpg
Binary file added gm_TTTT/val_img3/008_02.jpg
Binary file added gm_TTTT/val_label/001.png
Binary file added gm_TTTT/val_label2/003.png
Binary file added gm_TTTT/val_label2_01/003_01.png
Binary file added gm_TTTT/val_label2_02/003_02.png
Binary file added gm_TTTT/val_label2_03/003_03.png
Binary file added gm_TTTT/val_label3/008.png
Binary file added gm_TTTT/val_label3_01/008_01.png
Binary file added gm_TTTT/val_label3_02/008_02.png
2,631 changes: 2,631 additions & 0 deletions gm_TestTimeTrainingTest.ipynb

Large diffs are not rendered by default.

764 changes: 764 additions & 0 deletions gm_Visualize.ipynb

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions gm_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
"""
Copyright (C) 2019 NVIDIA Corporation. All rights reserved.
Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).
"""

import os
from collections import OrderedDict

import data
from options.test_options import TestOptions
from models.pix2pix_model import Pix2PixModel
from util.visualizer import Visualizer
from util import html

opt = TestOptions().parse()

dataloader = data.create_dataloader(opt)

model = Pix2PixModel(opt)
model.eval()

visualizer = Visualizer(opt)

# create a webpage that summarizes the all results
# web_dir = os.path.join(opt.results_dir, opt.name,
# '%s_%s' % (opt.phase, opt.which_epoch))


webpage = html.HTML(web_dir,
'Experiment = %s, Phase = %s, Epoch = %s' %
(opt.name, opt.phase, opt.which_epoch))

# test
for i, data_i in enumerate(dataloader):
if i * opt.batchSize >= opt.how_many:
break

generated = model(data_i, mode='inference')

img_path = data_i['path']
for b in range(generated.shape[0]):
print('process image... %s' % img_path[b])
visuals = OrderedDict([('input_label', data_i['label'][b]),
('synthesized_image', generated[b])])
visualizer.save_images(webpage, visuals, img_path[b:b + 1])

webpage.save()
Empty file modified models/__init__.py
100755 → 100644
Empty file.
1 change: 1 addition & 0 deletions models/networks/Synchronized-BatchNorm-PyTorch
Submodule Synchronized-BatchNorm-PyTorch added at 755399
14 changes: 14 additions & 0 deletions models/networks/sync_batchnorm/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
# File : __init__.py
# Author : Jiayuan Mao
# Email : [email protected]
# Date : 27/01/2018
#
# This file is part of Synchronized-BatchNorm-PyTorch.
# https://github.com/vacancy/Synchronized-BatchNorm-PyTorch
# Distributed under MIT License.

from .batchnorm import set_sbn_eps_mode
from .batchnorm import SynchronizedBatchNorm1d, SynchronizedBatchNorm2d, SynchronizedBatchNorm3d
from .batchnorm import patch_sync_batchnorm, convert_model
from .replicate import DataParallelWithCallback, patch_replication_callback
Loading