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

[Bug] Error with "Positional Encoding as Spatial Inductive Bias in GANs" inference result have artifact #494

Open
3 tasks done
junseokoh1 opened this issue Feb 9, 2023 · 1 comment

Comments

@junseokoh1
Copy link

junseokoh1 commented Feb 9, 2023

Prerequisite

Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

Environment

The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70.
If you want to use the GeForce RTX 3090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name))
sys.platform: linux
Python: 3.8.0 (default, Nov 6 2019, 21:49:08) [GCC 7.3.0]
CUDA available: True
CUDA_HOME: /usr/local/cuda
NVCC: Build cuda_11.0_bu.TC445_37.28540450_0
GPU 0: GeForce RTX 3090
GPU 1: GeForce GTX 1080 Ti
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
PyTorch: 1.8.0
PyTorch compiling details: PyTorch built with:

  • GCC 7.3
  • C++ Version: 201402
  • Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191122 for Intel(R) 64 architecture applications
  • Intel(R) MKL-DNN v1.7.0 (Git Hash 7aed236906b1f7a05c0917e5257a1af05e9ff683)
  • OpenMP 201511 (a.k.a. OpenMP 4.5)
  • NNPACK is enabled
  • CPU capability usage: AVX2
  • CUDA Runtime 10.2
  • NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70
  • CuDNN 7.6.5
  • Magma 2.5.2
  • Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=10.2, CUDNN_VERSION=7.6.5, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -O2 -fPIC
    -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.8.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON,

TorchVision: 0.9.0
OpenCV: 4.7.0
MMCV: 1.7.0
MMGen: 0.7.2+f9f00fd
MMCV Compiler: GCC 7.3
MMCV CUDA Compiler: 10.2

Reproduces the problem - code sample

I used official code from your github.
Nothing chaged.

Reproduces the problem - command or script

Comment that i used

For fish
CUDA_VISIBLE_DEVICES=1 python3 tools/utils/singan_inference.py configs/positional_encoding_in_gans/singan_csg_fish.py
/home/uhrgan/Neurocomputing/mmgeneration/infer_param/singan_csg_fis_20210406_175532-f0ec7b61.pth --samples-path output/fish --save-prev-res --seed 22

For bohemina - CSG
CUDA_VISIBLE_DEVICES=1 python3 tools/utils/singan_inference.py configs/positional_encoding_in_gans/singan_csg_bohemian.py
/home/uhrgan/Neurocomputing/mmgeneration/infer_param/singan_csg_bohemian_20210407_195455-5ed56db2.pth --samples-path output/bohemina_csg --save-prev-res --seed 22

For bohemina - SPE
CUDA_VISIBLE_DEVICES=1 python3 tools/utils/singan_inference.py configs/positional_encoding_in_gans/singan_spe-dim4_bohemian.py
/home/uhrgan/Neurocomputing/mmgeneration/infer_param/singan_spe-dim4_bohemian_20210406_175820-6e484a35.pth --samples-path output/bohemina_spe --save-prev-res --seed 22

Following guide line I also add test_cfg to sigan_bohemian.py & singan_fish.py file.

config file that i used.

base = [
'../base/models/singan/singan.py', '../base/datasets/singan.py',
'../base/default_runtime.py'
]

num_scales = 10 # start from zero
model = dict(
generator=dict(num_scales=num_scales),
discriminator=dict(num_scales=num_scales))

train_cfg = dict(
noise_weight_init=0.1,
iters_per_scale=2000,
)

test_cfg = dict(
delete = True,
pkl_data = '/home/uhrgan/Neurocomputing/mmgeneration/infer_param/singan_csg_fis_20210406_175532-f0ec7b61.pkl'
)

data = dict(
train=dict(
img_path='./data/singan/fish-crop.jpg', min_size=25, max_size=300))

optimizer = None
lr_config = None
checkpoint_config = dict(by_epoch=False, interval=2000, max_keep_ckpts=3)

custom_hooks = [
dict(
type='MMGenVisualizationHook',
output_dir='visual',
interval=500,
bgr2rgb=True,
res_name_list=['fake_imgs', 'recon_imgs', 'real_imgs']),
dict(
type='PickleDataHook',
output_dir='pickle',
interval=-1,
after_run=True,
data_name_list=['noise_weights', 'fixed_noises', 'curr_stage'])
]

total_iters = 22000

But result have artifact

rand_sample_1

Reproduces the problem - error message

There is no error message, but result have artifacts

Additional information

No response

@junseokoh1
Copy link
Author

Results for bohemina. Also there is few artifact, and result for SPE have changed color
rand_sample_1
rand_sample_0

@junseokoh1 junseokoh1 changed the title [Bug] Error with p"Positional Encoding as Spatial Inductive Bias in GANs" inference result have artifact [Bug] Error with "Positional Encoding as Spatial Inductive Bias in GANs" inference result have artifact Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant