naoto0804 / synshadow Goto Github PK
View Code? Open in Web Editor NEWLearning from Synthetic Shadows for Shadow Detection and Removal [Inoue and Yamasaki, IEEE TCSVT 2021].
License: MIT License
Learning from Synthetic Shadows for Shadow Detection and Removal [Inoue and Yamasaki, IEEE TCSVT 2021].
License: MIT License
Hi Authors,
Congrats for this interesting work. Can you please update the license (like MIT or Apache 2.0 etc) of this repository, so that other people can actually use your code and try out your solution? Many thanks!
Traceback (most recent call last):
File "train.py", line 29, in
for i, data_i in enumerate(dataloader, start=iter_counter.epoch_iter):
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 628, in next
data = self._next_data()
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 1333, in _next_data
return self._process_data(data)
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 1359, in _process_data
data.reraise()
File "/usr/local/lib/python3.8/dist-packages/torch/_utils.py", line 543, in reraise
raise exception
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/_utils/fetch.py", line 58, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/_utils/fetch.py", line 58, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/content/SynShadow/src/data/synth_dataset.py", line 44, in getitem
mask_index = next(self.mask_iter)
File "/content/SynShadow/src/data/util.py", line 9, in InfiniteSampler
yield order[i]
IndexError: index -1 is out of bounds for axis 0 with size 0
Hello, I would like to ask. I want to match the pictures that have not been taught. Can this project be realized? Do you have any recommended open source projects to realize the generation?
Thank you for sharing. I want to train spmnet on ISTD, but I got the error after some epochs:
C:\anaconda\envs\taka1\lib\site-packages\numpy\lib\polynomial.py:628: RuntimeWarning: invalid value encountered in true_divide
lhs /= scale
Intel MKL ERROR: Parameter 4 was incorrect on entry to DGELSD.
Traceback (most recent call last):
File "train.py", line 31, in
for i, data_i in enumerate(dataloader, start=iter_counter.epoch_iter):
File "C:\anaconda\envs\taka1\lib\site-packages\torch\utils\data\dataloader.py", line 521, in next
data = self._next_data()
File "C:\anaconda\envs\taka1\lib\site-packages\torch\utils\data\dataloader.py", line 561, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "C:\anaconda\envs\taka1\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\anaconda\envs\taka1\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\SynShadow\src\data\paired_dataset.py", line 82, in getitem
return self.postprocess(input_dict)
File "C:\SynShadow\src\data\base_dataset.py", line 49, in postprocess
d['input'], d['target'], d['mask'].squeeze())
File "C:\SynShadow\src\util\illum_affine_model.py", line 98, in fit_brightening_params
1
File "<array_function internals>", line 6, in polyfit
File "C:\anaconda\envs\taka1\lib\site-packages\numpy\lib\polynomial.py", line 629, in polyfit
c, resids, rank, s = lstsq(lhs, rhs, rcond)
File "<array_function internals>", line 6, in lstsq
File "C:\anaconda\envs\taka1\lib\site-packages\numpy\linalg\linalg.py", line 2306, in lstsq
x, resids, rank, s = gufunc(a, b, rcond, signature=signature, extobj=extobj)
File "C:\anaconda\envs\taka1\lib\site-packages\numpy\linalg\linalg.py", line 100, in _raise_linalgerror_lstsq
raise LinAlgError("SVD did not converge in Linear Least Squares")
numpy.linalg.LinAlgError: SVD did not converge in Linear Least Squares
Thanks.
I revise code in illum_affine_model.py line 100 except ValueError: -> except :
Then, I didn't get error.
On the other hand, when I trained spmnet on ISTD,w_l2 and b_l2 loss decreased fastly, but L1 loss didn't decrease. The results from this checkpoints are bad.
I trained spmnet on SynShadow(USR/shadowfree). W_l2 and b_l2 loss decreased slowly, and L1 loss also decreased. The results are good.
In addition,do you have some validation set to evaluate benchmark during training?
Great job! Congradulations!
For the matte images, I could not get the download link after clicking it. When they will be available? Thanks a lot.
Hello, your work is very exciting, thank you for your contribution to this field.
There is no training code for DHAN. I would like to know further details about DHAN under the setting of SynShadow->ISTD+.
Can you provide the corresponding code? I saw the evaluation results in the paper.
Thank you for your work and look forward to your reply.
Thanks for your great work. Could you please provide an complete instruction for synthetic dataset generation? A little confusing about the darken function. I don't find the definition of the parameter "opt.intercepts_mode".
Thank you~
Hello, thank you for sharing. I want to know if there is a script to generate shadows separately. I want to make my own data set with shadows.
Hello, Thanks for sharing your work
Is it possible to change the size of the matte images?
Or are they restricted to 256*256by design?
Hello,
I would like to test your model of shadow removal on a random image but I am a bit confused where to save the image as well as which command to type in.
For now, I saved the image under datasets/test/, but when I run
python test.py --dataset_root ../datasets/
I get the following error:
AssertionError: ../datasets/test/input is not a valid directory
If I create an input
directory, then the program is asking me for a target
directory and a mask
directory. Both should contain the same number of elements as the input
directory.
But if I test on a random image, I do not have any target or mask, so I do not know how to proceed. Could you please help me?
Thanks!
Guillaume
Hi naoto!
Thank for your great work! It's really helpful for my work. Can you tell me some details about how to fine-tuning the model from the Synthetic Dataset to a real dataset? It will be useful to my work. Thank for your work again.
AttributeError: module 'tensorflow._api.v2.summary' has no attribute 'FileWriter'
Could you please provide the codes and models for generating matte images? Thanks
I have downloaded the he models for shadow detection, and put i into ./checkpoints.
When I run:
python test.py --dataset_mode demo --model detect --netG dsd --dataset_root ../Samples/
I get the following error:
FileNotFoundError: [Errno 2] No such file or directory: '/SynShadow-main/src/models/n
etworks/base/resnext/resnext_101_32x4d.pth'
How to infer an image.
Hello, Thank for sharing your code. I want to know if there is a script to generate Synthesized image(with shadow-free image, matte, attenuation parameter)!
Hello, Thanks for sharing your work.
Could you provide base body models and ShapeNetCore.v2 in shadow_matte_generator subdirectory. Some link is failure.
Hi! I've obtained great results with some picky pics. Have you upgrade the code to be compatible with pyhon 3.8 (using to tensorflow2.x) or have you tested how difficult would be the upgrade?? thksss great work
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.