Skip to content

Commit

Permalink
Believe this fixes pytorch issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nadermx committed Jul 8, 2021
1 parent 7a32fc2 commit c6a7fb1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name="backgroundremover",
version="0.1.4",
version="0.1.5",
description="Background remover from image and video",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion src/backgroundremover/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
A library to remove background from videos and images
"""

__version__ = "0.1.4"
__version__ = "0.1.5"
__author__ = 'Johnathan Nader'
__credits__ = 'BackgroundRemover.app'
10 changes: 3 additions & 7 deletions src/backgroundremover/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
import tempfile
from .bg import DEVICE, Net, iter_frames, remove_many
import shlex
try:
multiprocessing.set_start_method('spawn')
except RuntimeError:
pass
multiprocessing.set_start_method('spawn', force=True)


def worker(worker_nodes,
worker_index,
Expand Down Expand Up @@ -119,8 +117,7 @@ def matte_key(output, file_path,

for frame in frames:
if command is None:
command = ['nice', '-10',
'ffmpeg',
command = ['ffmpeg',
'-y',
'-f', 'rawvideo',
'-vcodec', 'rawvideo',
Expand All @@ -145,7 +142,6 @@ def matte_key(output, file_path,
proc.stdin.close()
proc.wait()
print(F"FINISHED ALL FRAMES ({total_frames})!")

return

p.join()
Expand Down

0 comments on commit c6a7fb1

Please sign in to comment.