Giter Club home page Giter Club logo

marconet's People

Contributors

csxmli2016 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

marconet's Issues

Multi-GPU training

Hi, Multi-GPU training has been consistently failing. Would it be possible to provide a screenshot of 'pip list' to see the version of each package installed, or if there is an environment image file available?

error: OpenCV(4.8.1) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

i am unable to load screen. this is the code i used

import cv2

cap = cv2.VideoCapture('rtsp://admin:[email protected]:554/1')
facedetect=cv2.CascadeClassifier('haarcascade_frontalface_default.xml')

while True:
ret, frame = cap.read()
gray=cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
faces=facedetect.detectMultiScale(gray, 1.3 ,5)
for (x,y,w,h) in faces:
cv2.rectangle(frame, (x,y), (x+w, y+h),(50,50,255), 1)
cv2.imshow("Frame", frame)
k=cv2.waitKey(1)
if k==ord('q'):
break
cap.release()
cv2.destroyAllWindows()

Encountered error while generating package metadata.

running the last step: BASICSR_EXT=True pip install basicsr
an error happens. Any idea to solve it?

The above exception was the direct cause of the following exception:

  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-bposqbk9/basicsr_fb8418c801af48a4803eaa93cd2b1f3b/setup.py", line 147, in <module>
      setup(
    File "/root/anaconda3/envs/marconet/lib/python3.8/site-packages/setuptools/__init__.py", line 106, in setup
      _install_setup_requires(attrs)
    File "/root/anaconda3/envs/marconet/lib/python3.8/site-packages/setuptools/__init__.py", line 79, in _install_setup_requires
      _fetch_build_eggs(dist)
    File "/root/anaconda3/envs/marconet/lib/python3.8/site-packages/setuptools/__init__.py", line 84, in _fetch_build_eggs
      dist.fetch_build_eggs(dist.setup_requires)
    File "/root/anaconda3/envs/marconet/lib/python3.8/site-packages/setuptools/dist.py", line 917, in fetch_build_eggs
      return _fetch_build_eggs(self, requires)
    File "/root/anaconda3/envs/marconet/lib/python3.8/site-packages/setuptools/installer.py", line 38, in _fetch_build_eggs
      resolved_dists = pkg_resources.working_set.resolve(
    File "/root/anaconda3/envs/marconet/lib/python3.8/site-packages/pkg_resources/__init__.py", line 827, in resolve
      dist = self._resolve_dist(
    File "/root/anaconda3/envs/marconet/lib/python3.8/site-packages/pkg_resources/__init__.py", line 863, in _resolve_dist
      dist = best[req.key] = env.best_match(
    File "/root/anaconda3/envs/marconet/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1133, in best_match
      return self.obtain(req, installer)
    File "/root/anaconda3/envs/marconet/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1145, in obtain
      return installer(requirement)
    File "/root/anaconda3/envs/marconet/lib/python3.8/site-packages/setuptools/installer.py", line 98, in _fetch_build_egg_no_warn
      raise DistutilsError(str(e)) from e
  distutils.errors.DistutilsError: Command '['/root/anaconda3/envs/marconet/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp7br8i0db', '--quiet', '--index-url', 'http://mirrors.cloud.aliyuncs.com/pypi/simple/', 'cython']' returned non-zero exit status 1.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

NameError: name 'fused_act_ext' is not defined

`(test) evan@ZhaodeMacBook-Pro MARCONet % python test_sr.py
################################################################
Input Path : ./Testsets/LQs
Save Path : ./Testsets/LQs_07-05_17-51_MARCONet
The format of text label : using predicted text label
Transformer Encoder : 43.062275 M Parameters
Structure Prior Network : 27.970194 M Parameters
Super-Resolution Network : 16.865923 M Parameters
################################################################
Restoring real_lq01.png. The predicted text: 上海市定额专用发票
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in real_lq01. Continue...
Restoring real_lq02.png. The predicted text: 人民币贰仟柒佰捌拾元整
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in real_lq02. Continue...
Restoring real_lq03.png. The predicted text: 品名规格
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in real_lq03. Continue...
Restoring real_lq04.png. The predicted text: 价税合计(大写)
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in real_lq04. Continue...
Restoring real_lq05.png. The predicted text: 开户行及账号。
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in real_lq05. Continue...
Restoring real_lq06.png. The predicted text: 15772774
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in real_lq06. Continue...
Restoring real_lq07.png. The predicted text: 收款人:
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in real_lq07. Continue...
Restoring real_lq08.png. The predicted text: 经营项目:
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in real_lq08. Continue...
Restoring real_lq09.png. The predicted text: 纳税人识别号:
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in real_lq09. Continue...
Restoring real_lq10.png. The predicted text: 收款单位
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in real_lq10. Continue...
Restoring real_lq11.png. The predicted text: 盖章有效
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in real_lq11. Continue...
Restoring real_lq12.png. The predicted text: 单位(个人
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in real_lq12. Continue...
Restoring real_lq13.png. The predicted text: 半数是保留给受迁殖影响的居民。另
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in real_lq13. Continue...
Restoring syn_lq01.png. The predicted text: 不该等待?我和我女朋友被
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in syn_lq01. Continue...
Restoring syn_lq02.png. The predicted text: 奥弄到崇拜,不过大战场狼不
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in syn_lq02. Continue...
Restoring syn_lq03.png. The predicted text: 的地址就是不知道要把它添加在
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in syn_lq03. Continue...
Restoring syn_lq04.png. The predicted text: 。应该可以玩!显卡很古老了,应该
Traceback (most recent call last):
File "/Users/evan/Documents/GitHub/MARCONet/test_sr.py", line 138, in main
prior_cha, prior_fea64, prior_fea32 = modelTSPGAN(styles=w0.repeat(labels.size(0), 1), labels=labels, noise=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 62, in forward
return self.TextGenerator(styles, labels, noise)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 140, in forward
styles = self.style_mlp(styles)#
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/Documents/GitHub/MARCONet/models/networks.py", line 195, in forward
out = fused_leaky_relu(out, bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/evan/anaconda3/envs/test/lib/python3.11/site-packages/basicsr/ops/fused_act/fused_act.py", line 65, in forward
out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale)
^^^^^^^^^^^^^
NameError: name 'fused_act_ext' is not defined
Error in syn_lq04. Continue...

`

How to prepare the dataset?

Hi~ This is really a great job for textSR.
Can you tell me how to prepare text images with different backgrounds for training?
I vaguely remember seeing an issue before, you said that you used DIV2k pictures and nlp_chinese_corpus to generate training data. But I couldn't find it, so I came to you to confirm.
Thanks again for your work, looking forward to your answer.

use_new_bbox

hi, I want to know where does the model named "net_new_bbox.pth" come from please?

测试的时候会有这个问题

python test_sr.py -i ./Testsets/LQsWithText -m
################################################################
Input Path : ./Testsets/LQsWithText
Save Path : ./Testsets/LQsWithText_10-15_18-00_MARCONet
The format of text label : using given text label (Please DOUBLE CHECK the LR image name)
Mainly Trained on : Chinese
Transformer Encoder : 43.062275 M Parameters
Structure Prior Network : 27.970194 M Parameters
Super-Resolution Network : 16.865923 M Parameters
################################################################
[ WARN:[email protected]] global loadsave.cpp:248 cv::findDecoder imread_('./Testsets/LQsWithText\real_lqe01_娓呰偤涓滃寳灏忔湪鑰?Traceback (most recent call last):
File "test_sr.py", line 221, in
main(args.test_path, save_path, args.manual, args.eng)
File "test_sr.py", line 79, in main
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
cv2.error: OpenCV(4.8.1) D:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

crop_DF2K.py不理解

文章中说“The text background is obtained from DIV2K [1] and Flick2K [59] datasets, in which each image is randomly cropped and upsampled to ×4 ∼16 to synthesize the complex background”,代码中实现的似乎与文章不符,代码中的逻辑也不大理解,可以麻烦稍微介绍一下代码逻辑吗~

   for split in SplitNames:
        fis = os.listdir(osp.join(TestImgPath, split))
        for fi in fis:
            KeyLists = os.listdir(osp.join(TestImgPath, split, fi))
            for key in KeyLists:
                ImgLists = os.listdir(osp.join(TestImgPath, split, fi, key))
                for ImgName in ImgLists:
                    ImgPath = osp.join(TestImgPath, split, fi, key, ImgName)
                    A = Image.open(ImgPath).convert('RGB')
                    w,h = A.size
                    print([split,fi,key,ImgName])
                    for ss in ScaleLists: 
                        new_w = w*ss//10
                        new_h = h*ss//10
                        if ss < ScaleLists[0]:
                            A = A.resize((new_w, new_h), Image.LANCZOS)

                        HowmanyEach = min(new_w//CropSize, new_h//CropSize) * 2 * 2
                        for j in range(HowmanyEach):
                            _, Crop, V, M = GetHighPatch(A, CropSize)
                            total = total + 1
                            SaveName = '{}_{}_{}_{}_{:05d}_{:02d}.png'.format(split, fi, key, ImgName[:-4],j,ss)
                            Crop.save(os.path.join(SavePath, SaveName))

Training model for English Data

Hi @csxmli2016 

Thank you for creating such a good project!

I want to train this model for English data. I also have some custom LR and HR-paired image data. After reading your paper, I came to know that you are using synthetic data generated by GAN. 

  • Can I use my custom data to train the model?

  • To train with English data, I have to use only English corpus, right? And, the data generated using text corpus and background image will get stored or not?

  • Regarding the model inference and size: To deploy the model of inferencing, do I have to use all the checkpoint files present in the MACRONet release section, or do I only need to use OCR and model checkpoints?

There are some good OCRs, or text recognition, MORAN for English data. I think I can use this model for OCR.

Thank you!

关于裁剪图像

运行python ./scripts/crop_DF2K时报错,
(marcotrain) shenweilu@node5:/MARCONet/Train$ python ./scripts/crop_DF2K.py
Traceback (most recent call last):
File "/home/shenweilu/MARCONet/Train/./scripts/crop_DF2K.py", line 79, in
SplitNames = os.listdir(TestImgPath)
FileNotFoundError: [Errno 2] No such file or directory: '
/DIV2K_train_HR'
当我把路径改成绝对路径后还是会报错
(marcotrain) shenweilu@node5:~/MARCONet/Train$ python ./scripts/crop_DF2K.py
Traceback (most recent call last):
File "/home/shenweilu/MARCONet/Train/./scripts/crop_DF2K.py", line 85, in
KeyLists = os.listdir(osp.join(TestImgPath, split, fi))
NotADirectoryError: [Errno 20] Not a directory: '/home/shenweilu/MARCONet/Train/scripts/DIV2K_train_HR/0759.png'
请告诉我需要裁剪的数据集,我该把数据集放在那里,数据集的结构是怎样的,期待您的回复

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.