Code Monkey home page Code Monkey logo

cartoonize's People

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cartoonize's Issues

Not using my Nvidia

I see this output:

2022-02-23 01:08:39.308680: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:163] no NVIDIA GPU device is present: /dev/nvidia0 does not exist

But my Nvidia is installed and works well. How to debug?

I have set to use the GPU in the yaml file btw.

Can I cartoonize videos by AMD GPU?

I find that the cuda is needed in this project, but my GPU is from AMD, so can I cartoonize videos( images are ok), or some ways can achieve this indirectly?

Our server hiccuped :/ Please upload another file! :)

when i upload a fake .jpg to your website it show this message , how can i get the same effect?
my website shows
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

RuntimeError: The session is unavailable because no secret key was set. Set the secret_key on the application to something unique and secret.

    • [04/Jan/2021 11:20:21] "POST /cartoonize HTTP/1.1" 500 -

docker run error

i run this project at docker. the env is ubuntu18.04. but error. please

[2021-03-01 03:01:03 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2021-03-01 03:01:03 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080 (1)
[2021-03-01 03:01:03 +0000] [1] [INFO] Using worker: threads
[2021-03-01 03:01:03 +0000] [9] [INFO] Booting worker with pid: 9
2021-03-01 03:01:04.082719: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
2021-03-01 03:01:04.082791: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory
2021-03-01 03:01:04.082804: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
WARNING:tensorflow:From /usr/local/lib/python3.7/site-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.
Instructions for updating:
Please use layer.__call__ method instead.
WARNING:tensorflow:From /usr/local/lib/python3.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1635: calling BaseResourceVariable.init (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
[2021-03-01 03:01:04 +0000] [9] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/gthread.py", line 92, in init_process
super().init_process()
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.7/site-packages/gunicorn/util.py", line 358, in import_app
mod = importlib.import_module(module)
File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/app/app.py", line 44, in
wb_cartoonizer = WB_Cartoonize(os.path.abspath("white_box_cartoonizer/saved_models/"), opts['gpu'])
File "./white_box_cartoonizer/cartoonize.py", line 27, in init
self.load_model(weights_dir, gpu)
File "./white_box_cartoonizer/cartoonize.py", line 54, in load_model
self.final_out = guided_filter.guided_filter(self.input_photo, network_out, r=1, eps=5e-3)
File "./white_box_cartoonizer/guided_filter.py", line 30, in guided_filter
N = tf_box_filter(tf.ones((1, x_shape[1], x_shape[2], 1), dtype=x.dtype), r)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/ops/array_ops.py", line 2659, in ones
output = _constant_if_small(one, shape, dtype, name)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/ops/array_ops.py", line 2391, in _constant_if_small
if np.prod(shape) < 1000:
File "<array_function internals>", line 6, in prod
File "/usr/local/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 3031, in prod
keepdims=keepdims, initial=initial, where=where)
File "/usr/local/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 87, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/framework/ops.py", line 728, in array
" array.".format(self.name))
NotImplementedError: Cannot convert a symbolic Tensor (strided_slice:0) to a numpy array.
[2021-03-01 03:01:04 +0000] [9] [INFO] Worker exiting (pid: 9)
[2021-03-01 03:01:05 +0000] [1] [INFO] Shutting down: Master
[2021-03-01 03:01:05 +0000] [1] [INFO] Reason: Worker failed to boot.

Need transparent backgound in cartoonized images

I have gone through your code. It's working well for cartoonization of images. I have taken input as a transparent background image and need output also with transparent background cartoonized image.
Now I am getting white background images. How can I achieve this? Please guide me ASAP.

Thanks in Advance
Hima Bindu Y

upload 50M vedio(1080p) ,but throw Past duration 0.796791 too large

configure info : config.yaml

---
run_local: true #Set this to true if you are running locally, false if you have configured the Google buckets and algorithmia code. 
gpu: true #Set this to true if you want to use the GPU
trim-video: false #Set this to false if you want to process full video
trim-video-length: 3600 #Max number of seconds you want to trim the video from start
original_frame_rate: false #If False output_frame_rate will be used else original video detected frame rate will be used, if no metadata found will use output_frame_rate  
output_frame_rate: '24/1' #Set the output frame rate, if original resolution
colab-mode: true #Set true if you are executing in colab mode
original_resolution: true # Set to true if you don't want to resize the original video
resize-dim: 720 #The width of the video will be resized to specified number maintaining aspect ratio

modify templates/index_cartoonized.html check max_file_size

  const fsize = fi.files.item(i).size; 
                const file = Math.round((fsize / 1024)); 
                // The size of the file.
                //Change the max_file_size as per your need 
                const max_file_size = 33330720;

error info:

ov/2021 13:22:07] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [08/Nov/2021 13:22:09] "GET /static/sample_images/emma2.jpg HTTP/1.1" 200 -
127.0.0.1 - - [08/Nov/2021 13:22:09] "GET /static/sample_images/emma2_cartoonized.jpg HTTP/1.1" 200 -
127.0.0.1 - - [08/Nov/2021 13:22:09] "GET /static/sample_images/spice.jpeg HTTP/1.1" 200 -
127.0.0.1 - - [08/Nov/2021 13:22:09] "GET /static/sample_images/cake.jpeg HTTP/1.1" 200 -
127.0.0.1 - - [08/Nov/2021 13:22:09] "GET /static/sample_images/spice_cartoonized.jpeg HTTP/1.1" 200 -
127.0.0.1 - - [08/Nov/2021 13:22:09] "GET /static/sample_images/cake_cartoonized.jpeg HTTP/1.1" 200 -
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 131, in wrapper
    return f(self, stream, *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 253, in _parse_multipart
    form, files = parser.parse(stream, boundary, content_length)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 584, in parse
    return self.cls(form), self.cls(files)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/datastructures.py", line 419, in __init__
    for key, value in mapping or ():
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 582, in <genexpr>
    form = (p[1] for p in formstream if p[0] == "form")
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 537, in parse_parts
    for ellt, ell in self.parse_lines(file, boundary, content_length):
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 480, in parse_lines
    for line in iterator:
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 761, in make_line_iter
    for item in _iter_basic_lines():
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 737, in _iter_basic_lines
    new_data = next(_iter, "")
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 681, in _make_chunk_iter
    item = _read(buffer_size)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 943, in read
    return self.on_disconnect()
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 911, in on_disconnect
    raise ClientDisconnected()
werkzeug.exceptions.ClientDisconnected: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "app.py", line 73, in cartoonize
    if flask.request.files.get('image'):
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/local.py", line 347, in __getattr__
    return getattr(self._get_current_object(), name)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/utils.py", line 90, in __get__
    value = self.func(obj)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wrappers/base_request.py", line 514, in files
    self._load_form_data()
  File "/usr/local/lib/python3.7/dist-packages/flask/wrappers.py", line 168, in _load_form_data
    RequestBase._load_form_data(self)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wrappers/base_request.py", line 319, in _load_form_data
    self._get_stream_for_parsing(), mimetype, content_length, options
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 232, in parse
    return parse_func(self, stream, mimetype, content_length, options)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 135, in wrapper
    exhaust()
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 925, in exhaust
    self.read(chunk)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 943, in read
    return self.on_disconnect()
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 911, in on_disconnect
    raise ClientDisconnected()
werkzeug.exceptions.ClientDisconnected: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
None
[2021-11-08 13:27:16,006] ERROR in app: Exception on /cartoonize [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 131, in wrapper
    return f(self, stream, *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 253, in _parse_multipart
    form, files = parser.parse(stream, boundary, content_length)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 584, in parse
    return self.cls(form), self.cls(files)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/datastructures.py", line 419, in __init__
    for key, value in mapping or ():
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 582, in <genexpr>
    form = (p[1] for p in formstream if p[0] == "form")
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 537, in parse_parts
    for ellt, ell in self.parse_lines(file, boundary, content_length):
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 480, in parse_lines
    for line in iterator:
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 761, in make_line_iter
    for item in _iter_basic_lines():
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 737, in _iter_basic_lines
    new_data = next(_iter, "")
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 681, in _make_chunk_iter
    item = _read(buffer_size)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 943, in read
    return self.on_disconnect()
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 911, in on_disconnect
    raise ClientDisconnected()
werkzeug.exceptions.ClientDisconnected: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "app.py", line 73, in cartoonize
    if flask.request.files.get('image'):
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/local.py", line 347, in __getattr__
    return getattr(self._get_current_object(), name)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/utils.py", line 90, in __get__
    value = self.func(obj)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wrappers/base_request.py", line 514, in files
    self._load_form_data()
  File "/usr/local/lib/python3.7/dist-packages/flask/wrappers.py", line 168, in _load_form_data
    RequestBase._load_form_data(self)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wrappers/base_request.py", line 319, in _load_form_data
    self._get_stream_for_parsing(), mimetype, content_length, options
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 232, in parse
    return parse_func(self, stream, mimetype, content_length, options)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/formparser.py", line 135, in wrapper
    exhaust()
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 925, in exhaust
    self.read(chunk)
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 943, in read
    return self.on_disconnect()
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/wsgi.py", line 911, in on_disconnect
    raise ClientDisconnected()
werkzeug.exceptions.ClientDisconnected: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.7/dist-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "app.py", line 168, in cartoonize
    flash("Our server hiccuped :/ Please upload another file! :)")
  File "/usr/local/lib/python3.7/dist-packages/flask/helpers.py", line 410, in flash
    session['_flashes'] = flashes
  File "/usr/local/lib/python3.7/dist-packages/werkzeug/local.py", line 350, in __setitem__
    self._get_current_object()[key] = value
  File "/usr/local/lib/python3.7/dist-packages/flask/sessions.py", line 101, in _fail
    raise RuntimeError('The session is unavailable because no secret '
RuntimeError: The session is unavailable because no secret key was set.  Set the secret_key on the application to something unique and secret.
127.0.0.1 - - [08/Nov/2021 13:27:16] "POST /cartoonize HTTP/1.1" 500 -

The system cannot find the file specified

The system cannot find the path specified.
'F:\PongGame\Test\cartoonize\static\uploaded_videos\e0db715a-a588-4442-900a-c4145bcc56ee.mp4': Invalid argument
The system cannot find the path specified.
'F:\PongGame\Test\cartoonize\static\uploaded_videos\e0db715a-a588-4442-900a-c4145bcc56ee_modified.mp4': Invalid argument
Traceback (most recent call last):
  File "F:\PongGame\Test\cartoonize\app.py", line 149, in cartoonize
    cartoon_video_path = wb_cartoonizer.process_video(modified_video_path, output_frame_rate)
  File "./white_box_cartoonizer\cartoonize.py", line 113, in process_video
    out.close()
  File "C:\Users\Shivam\AppData\Local\Programs\Python\Python37\lib\site-packages\skvideo\io\abstract.py", line 474, in close
    if self._proc is None:  # pragma: no cover
AttributeError: 'FFmpegWriter' object has no attribute '_proc'
None
127.0.0.1 - - [17/Jan/2021 01:12:57] "POST /cartoonize HTTP/1.1" 200 -
The system cannot find the path specified.
'F:\PongGame\Test\cartoonize\static\uploaded_videos\1ae5112d-a042-4366-8f06-b5d954955c61.mp4': Invalid argument
The system cannot find the path specified.
'F:\PongGame\Test\cartoonize\static\uploaded_videos\1ae5112d-a042-4366-8f06-b5d954955c61_modified.mp4': Invalid argument
Traceback (most recent call last):
  File "F:\PongGame\Test\cartoonize\app.py", line 149, in cartoonize
    cartoon_video_path = wb_cartoonizer.process_video(modified_video_path, output_frame_rate)
  File "./white_box_cartoonizer\cartoonize.py", line 113, in process_video
    out.close()

This seem to only happen with video files, whereas the images are working fine.

OS :- Windows 10
Python Version :- 3.7
GPU Enabled :- Yes
Debug :- True

error - cannot import markup from jinja2

[2023-10-10 12:43:22 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2023-10-10 12:43:22 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080 (1)
[2023-10-10 12:43:22 +0000] [1] [INFO] Using worker: threads
[2023-10-10 12:43:22 +0000] [9] [INFO] Booting worker with pid: 9
[2023-10-10 12:43:24 +0000] [9] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/gthread.py", line 92, in init_process
super().init_process()
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.7/site-packages/gunicorn/util.py", line 358, in import_app
mod = importlib.import_module(module)
File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/app/app.py", line 13, in
from flask import Flask, render_template, make_response, flash
File "/usr/local/lib/python3.7/site-packages/flask/init.py", line 19, in
from jinja2 import Markup, escape
ImportError: cannot import name 'Markup' from 'jinja2' (/usr/local/lib/python3.7/site-packages/jinja2/init.py)
[2023-10-10 12:43:24 +0000] [9] [INFO] Worker exiting (pid: 9)
[2023-10-10 12:43:24 +0000] [1] [INFO] Shutting down: Master
[2023-10-10 12:43:24 +0000] [1] [INFO] Reason: Worker failed to boot.

Error satrting it

I am experimenting it on Arch and I get this:

[2022-02-22 22:52:25 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2022-02-22 22:52:25 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080 (1)
[2022-02-22 22:52:25 +0000] [1] [INFO] Using worker: threads
[2022-02-22 22:52:25 +0000] [9] [INFO] Booting worker with pid: 9
[2022-02-22 22:52:26 +0000] [9] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/gthread.py", line 92, in init_process
    super().init_process()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process
    self.load_wsgi()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python3.7/site-packages/gunicorn/util.py", line 358, in import_app
    mod = importlib.import_module(module)
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/app/app.py", line 14, in <module>
    from flask import Flask, render_template, make_response, flash
  File "/usr/local/lib/python3.7/site-packages/flask/__init__.py", line 21, in <module>
    from .app import Flask, Request, Response
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 25, in <module>
    from . import cli, json
  File "/usr/local/lib/python3.7/site-packages/flask/json/__init__.py", line 21, in <module>
    from itsdangerous import json as _json
ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.7/site-packages/itsdangerous/__init__.py)
[2022-02-22 22:52:26 +0000] [9] [INFO] Worker exiting (pid: 9)
[2022-02-22 22:52:26 +0000] [1] [INFO] Shutting down: Master
[2022-02-22 22:52:26 +0000] [1] [INFO] Reason: Worker failed to boot.

Any clue how to fix it? Cheers!

When I upload video, I encounter an issue, kindly help me with this

Hi Professor,

Could you please help me with this?
Reproduce step: install it on windows, when cartoonize the video, there is an error as follow;

Best regards,

'D:\Workspace\cartoonize\static\uploaded_videos\22a98314-0571-4b48-93b3-def5f768314a_modified.mp4': Invalid argument
Traceback (most recent call last):
File "app.py", line 149, in cartoonize
cartoon_video_path = wb_cartoonizer.process_video(modified_video_path, output_frame_rate)
File "./white_box_cartoonizer\cartoonize.py", line 113, in process_video
out.close()
File "D:\ProgramData\Anaconda3\lib\site-packages\skvideo\io\abstract.py", line 474, in close
if self._proc is None: # pragma: no cover
AttributeError: 'FFmpegWriter' object has no attribute '_proc'
None
[2021-02-10 23:48:13,763] ERROR in app: Exception on /cartoonize [POST]
Traceback (most recent call last):
File "app.py", line 149, in cartoonize
cartoon_video_path = wb_cartoonizer.process_video(modified_video_path, output_frame_rate)
File "./white_box_cartoonizer\cartoonize.py", line 113, in process_video
out.close()
File "D:\ProgramData\Anaconda3\lib\site-packages\skvideo\io\abstract.py", line 474, in close
if self._proc is None: # pragma: no cover
AttributeError: 'FFmpegWriter' object has no attribute '_proc'

Video Size

Can we upload a video with more than 30 MB?

ngrok authentication

Now ngrok asks for auth token. I made my own but I don't know how to set it up in Google's Collab.
Thanks.

Docker run error

Hi,
I've got the following error trying to run following the Docker orientation :
image

Did I miss something ? ๐Ÿ˜“

slim API

Hi,

No bug here, i was just asking myself why you used the slim api for Conv2d layers?

thx

Tensorflow depencies issue

Tried installing dependencies, got this error "ERROR: No matching distribution found for tensorflow==2.1.0 (from -r requirements.txt (line 5))"

Can you confirm that this is the right version of TensorFlow used

Full Video Problems!!

Can't Process Full Video changing the code in app.py to:

os.system("ffmpeg -hide_banner -loglevel warning -ss 0 -i '{}' -filter:v scale={}:-2 -r 15 -c:a copy '{}'".format(os.path.abspath(original_video_path), width_resize, os.path.abspath(modified_video_path)))

what else I need to do?

THANKS FROM COLOMBIA!!!

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.