GithubHelp home page GithubHelp logo

text-deep-fake's People

Contributors

grenlayk avatar nikoryagin avatar sphericalpotatoinvacuum 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

Watchers

 avatar  avatar  avatar  avatar

text-deep-fake's Issues

RRDB in colorization

  • Use RRDB in colorization model
  • Train on 32x32 crops
  • 1 channel input and 3 channel output

[BUG] extracting info['bounding_box'] in prepare_dataset.py

Encountered an error when running prepare_dataset.py with the following command.

python prepare_dataset.py

mainly due to the following error.

TypeError: crop_minAreaRect() takes 6 positional arguments but 33 were given.

This has to do with the format of imageur5k_annotations_train.json where "bounding_box" data is stored in a string format.

This can be fixed by replacing *info['bounding_box'] with *eval(info['bounding_box']).

Needed Training Time

Hi authors,

Thanks for the great work! I am curious how long does it takes to train the model?

prepare_dataset.py not work

Traceback (most recent call last):
File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/types.py", line 608, in convert
st = os.stat(rv)
FileNotFoundError: [Errno 2] No such file or directory: 'dataset_info'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "prepare_dataset.py", line 90, in
main() # pylint: disable=no-value-for-parameter
File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 781, in main
with self.make_context(prog_name, args, **extra) as ctx:
File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 700, in make_context
self.parse_args(ctx, args)
File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 1048, in parse_args
value, args = param.handle_parse_result(ctx, opts, args)
File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 1623, in handle_parse_result
value = self.full_process_value(ctx, value)
File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 1965, in full_process_value
return Parameter.full_process_value(self, ctx, value)
File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 1592, in full_process_value
value = self.get_default(ctx)
File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 1917, in get_default
return Parameter.get_default(self, ctx)
File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 1534, in get_default
return self.type_cast_value(ctx, rv)
File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 1568, in type_cast_value
return _convert(value, (self.nargs != 1) + bool(self.multiple))
File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 1565, in _convert
return self.type(value, self, ctx)
File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/types.py", line 46, in call
return self.convert(value, param, ctx)
File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/types.py", line 614, in convert
self.path_type, filename_to_ui(value)
File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/_compat.py", line 474, in filename_to_ui
value = value.encode("utf-8", "surrogateescape").decode("utf-8", "replace")
AttributeError: 'PosixPath' object has no attribute 'encode'
(venv) [jorj@jorj-systemproductname text-deep-fake-main]$ cd /home/jorj/Загрузки/text-deep-fake-main/IMGUR5K-Handwriting-Dataset-main/
(venv) [jorj@jorj-systemproductname IMGUR5K-Handwriting-Dataset-main]$ python prepare_dataset.py
0it [00:00, ?it/s] 2023-07-07 18:57:47.034 | ERROR | main:main:84 - An error has been caught in function 'main', process 'MainProcess' (252331), thread 'MainThread' (140470161389376):
Traceback (most recent call last):

File "prepare_dataset.py", line 90, in
main() # pylint: disable=no-value-for-parameter

File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
│ │ │ └ {}
│ │ └ ()
│ └ <function BaseCommand.main at 0x7fc1c157a8c0>

File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
│ │ └ <click.core.Context object at 0x7fc1baaf79d0>
│ └ <function Command.invoke at 0x7fc1c150ab90>

File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
│ │ │ │ │ └ {'annotations_path': PosixPath('dataset_info'), 'save_path': PosixPath('cropped'), 'no_split': False, 'reduce': None}
│ │ │ │ └ <click.core.Context object at 0x7fc1baaf79d0>
│ │ │ └ <function main at 0x7fc1ba7d9e60>
│ │ └
│ └ <function Context.invoke at 0x7fc1c150b050>
└ <click.core.Context object at 0x7fc1baaf79d0>
File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
│ │ └ {'annotations_path': PosixPath('dataset_info'), 'save_path': PosixPath('cropped'), 'no_split': False, 'reduce': None}
│ └ ()
└ <function main at 0x7fc1ba7d9e60>

File "prepare_dataset.py", line 84, in main
img_cropped = crop_minAreaRect(img, *info['bounding_box'])
│ │ └ {'word': 'SIRIÜS', 'bounding_box': '[97.0, 1011.5, 103.0, 36.0, 4.5]'}
│ └ array([[[165, 210, 224],
│ [163, 210, 224],
│ [163, 210, 224],
│ ...,
│ [148, 200, 213],
│ [150...
└ <function crop_minAreaRect at 0x7fc1c156ecb0>

TypeError: crop_minAreaRect() takes 6 positional arguments but 33 were given
0it [00:00, ?it/s]
2023-07-07 18:57:47.039 | ERROR | click.core:invoke:610 - An error has been caught in function 'invoke', process 'MainProcess' (252331), thread 'MainThread' (140470161389376):
Traceback (most recent call last):

File "prepare_dataset.py", line 90, in
main() # pylint: disable=no-value-for-parameter

File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
│ │ │ └ {}
│ │ └ ()
│ └ <function BaseCommand.main at 0x7fc1c157a8c0>

File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
│ │ └ <click.core.Context object at 0x7fc1baaf79d0>
│ └ <function Command.invoke at 0x7fc1c150ab90>

File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
│ │ │ │ │ └ {'annotations_path': PosixPath('dataset_info'), 'save_path': PosixPath('cropped'), 'no_split': False, 'reduce': None}
│ │ │ │ └ <click.core.Context object at 0x7fc1baaf79d0>
│ │ │ └ <function main at 0x7fc1ba7d9e60>
│ │ └
│ └ <function Context.invoke at 0x7fc1c150b050>
└ <click.core.Context object at 0x7fc1baaf79d0>

File "/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
│ │ └ {'annotations_path': PosixPath('dataset_info'), 'save_path': PosixPath('cropped'), 'no_split': False, 'reduce': None}
│ └ ()
└ <function main at 0x7fc1ba7d9e60>

File "prepare_dataset.py", line 85, in main
cv2.imwrite(str(output_path / f'{ann_id}.png'), img_cropped)
│ │ │ └ None
│ │ └ PosixPath('cropped/train')
│ └
└ <module 'cv2.cv2' from '/home/jorj/Загрузки/text-deep-fake-main/venv/lib/python3.7/site-packages/cv2/cv2.cpython-37m-x86_64-l...

cv2.error: OpenCV(4.1.2) /io/opencv/modules/imgcodecs/src/loadsave.cpp:715: error: (-215:Assertion failed) !_img.empty() in function 'imwrite'

Is there any code available?

I am really interested in this amazing work. And currently I am looking for a code implementation to study.
Really looking forward to your code.🙂️

No such file or directory: 'data/IMGUR5K/train/words.json' ?

This is an interesting work. but i got an error when I try to run the project by follow command
python run.py './src/config/baseline.py'
but I have download IMGUR5K dataset and put it under data floder. So waht should i do to generate training dataset from IMGUR5K?

error of pretrain models

when train the model ,there is a error:

RuntimeError: Error(s) in loading state_dict for DataParallel:
Missing key(s) in state_dict: "module.Transformation.GridGenerator.inv_delta_C", "module.Transformation.GridGenerator.P_hat".

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.