GithubHelp home page GithubHelp logo

unet-gan-matting's People

Contributors

am1n3e avatar bettorun avatar eti-p-doray 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unet-gan-matting's Issues

Is there anyone can download the dataset?

I follow the instructions completely to download the dataset, but it failed. The error as follows:

selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_TIMED_OUT
(Session info: headless chrome=89.0.4389.82)

Without trimap ?

I understand this was probably a project for your personal use, but I found this approach for background removal much different from other better known ones like Segmentation, etc. and wanted to give it a try. Is eval/running it only possible if we have a Trimap and can I not just use any of my normal images to remove its background (I dont have trimaps for them).

I didn't find the GAN part in the project

In the beginning, I used the model I trained to eval found that the picture output was too pink. I thought maybe the dataset I trained was too little, but I used the 83256 you provided to eval the result is also pink, just like the figure 6(a) in your paper when GAN is not used.

Not able to download images

Looks like google image search changed some meta information , so google image download is broken now.
Anywhere I can find the dataset ?
Thanks in advance

Error message running Training

I'm getting an error message when running the Training.

C:\unet-gan-matting-master>python train.py scripts/data
Traceback (most recent call last):
File "train.py", line 13, in
from script import resize
ModuleNotFoundError: No module named 'script'

Am I missing something?

Item no.: 1 --> Item name = portrait transparent background Evaluating... Looks like we cannot locate the path the 'chromedriver' (use the '--chromedriver' argument to specify the path to the executable.) or google chrome browser is not installed on your machine (exception: Message: session not created: This version of ChromeDriver only supports Chrome version 81 )

Item no.: 1 --> Item name = portrait transparent background
Evaluating...
Looks like we cannot locate the path the 'chromedriver' (use the '--chromedriver' argument to specify the path to the executable.) or google chrome browser is not installed on your machine (exception: Message: session not created: This version of ChromeDriver only supports Chrome version 81
)

How to resolved ? .. thanks

train.py: module 'tensorflow' has no attribute 'get_variable'

I got this error when running train.py

2019-10-14 23:49:24.635561: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
Traceback (most recent call last):
  File "train.py", line 226, in <module>
    main(args)
  File "train.py", line 72, in main
    train_ids = tf.get_variable('train_ids', initializer=ids[0:split_point], trainable=False)
AttributeError: module 'tensorflow' has no attribute 'get_variable'

I'm running windows 10 and I tried python 3.5 and 3.6 with requirements-gpu.txt installed
I think you specified wrong tensorflow version.

I tried replacing strings like that

    # train_ids = tf.get_variable('train_ids', initializer=ids[0:split_point], trainable=False)
    # valid_ids = tf.get_variable('valid_ids', initializer=ids[split_point:len(ids)], trainable=False)
    # global_step = tf.get_variable('global_step', initializer=0, trainable=False)
    train_ids = tf.Variable(tf.ones(ids[0:split_point]), name="train_ids")
    valid_ids = tf.Variable(tf.ones(ids[split_point:len(ids)]), name="valid_ids")
    global_step = tf.Variable(tf.ones(0), name="global_step")

But I got another error

2019-10-14 23:54:15.875251: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
2019-10-14 23:54:17.429887: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll
2019-10-14 23:54:17.553446: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: GeForce GTX 1060 6GB major: 6 minor: 1 memoryClockRate(GHz): 1.8475
pciBusID: 0000:1f:00.0
2019-10-14 23:54:17.560973: I tensorflow/stream_executor/platform/default/dlopen_checker_stub.cc:25] GPU libraries are statically linked, skip dlopen check.
2019-10-14 23:54:17.566947: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2019-10-14 23:54:17.572106: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2019-10-14 23:54:17.582708: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: GeForce GTX 1060 6GB major: 6 minor: 1 memoryClockRate(GHz): 1.8475
pciBusID: 0000:1f:00.0
2019-10-14 23:54:17.588355: I tensorflow/stream_executor/platform/default/dlopen_checker_stub.cc:25] GPU libraries are statically linked, skip dlopen check.
2019-10-14 23:54:17.593767: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2019-10-14 23:54:18.321282: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-10-14 23:54:18.326692: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165]      0
2019-10-14 23:54:18.330506: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0:   N
2019-10-14 23:54:18.334713: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 4708 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:1f:00.0, compute capability: 6.1)
Traceback (most recent call last):
  File "train.py", line 228, in <module>
    main(args)
  File "train.py", line 75, in main
    train_ids = tf.Variable(tf.ones(ids[0:split_point]), name="train_ids")
  File "C:\Users\ivan\Desktop\unet-gan-matting-master\vendor\python\lib\site-packages\tensorflow_core\python\ops\array_ops.py", line 2583, in ones
    output = fill(shape, constant(one, dtype=dtype), name=name)
  File "C:\Users\ivan\Desktop\unet-gan-matting-master\vendor\python\lib\site-packages\tensorflow_core\python\ops\array_ops.py", line 171, in fill
    result = gen_array_ops.fill(dims, value, name=name)
  File "C:\Users\ivan\Desktop\unet-gan-matting-master\vendor\python\lib\site-packages\tensorflow_core\python\ops\gen_array_ops.py", line 3599, in fill
    _six.raise_from(_core._status_to_exception(e.code, message), None)
  File "<string>", line 2, in raise_from
tensorflow.python.framework.errors_impl.InvalidArgumentError: dims must be a vector, got shape [6069,2] [Op:Fill] name: ones/

Facing issues while using it in colab

After some experimentation, I found that chromedriver doesn't work in colab. I used !./chromedriver in colab cell

The result was
src/tcmalloc.cc:283] Attempt to free invalid pointer 0x1951c81affc0

But when i try locally ./chromedriver :

`
Starting ChromeDriver 78.0.3904.105 (60e2d8774a8151efa6a00b1f358371b1e
0e07ee2-refs/branch-heads/3904@{#877}) on port 9515
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks
to prevent access by malicious code.

Any suggestions what can be done ??
I have tried
!sudo apt-get install libjemalloc-dev !apt install libtcmalloc-minimal4
`

An error occurred while running the evaluation script

When I run the evaluation script
with:
python3 eval.py data/matting/input/107_0.jpg data/matting/trimap/107_trimap.jpg result.jpg --checkpoint -1

An IndexError occurs on eval.py line 48 : alpha = cv2.split(foreground)[3]

The output images have pink/red hue over it

I have been able to train the GAN and evaluate for a set of input and trimap pair. But all the images I get as output have a pink/red hue all over it. Am I doing something wrong over here?

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.