Comments (2)
Thank you for your interests very much. I really missed your point. Before, what I did was I normalized all the input images. There is no problem with that, so ignore your problem. You can directly use this link(https://github.com/jiwei0921/RGBD-SOD-datasets) to download and test images, which is available. I will pay attention to the problems you mentioned and update them in time.
Thanks again.
from dmra.
Hi @jiwei0921 I think I ran into a similar issue as @zhoufengbuaa .
Versions:
Pytorch==1.1
Pillow==5.4.0
When trying to load the files: 1342_ro90 & 1323_flr in the data_loaders __getitem__
method I get the error:
int() argument must be a string, a bytes-like object or a number, not 'PngImageFile'
When depth = np.array(depth, dtype=np.uint8)
is called.
I'm going to test removing those files from the provided training dataset and see if that fixes the issue. Will report back if that fixes the issue.
Here's the code I used to find the files w/ issues:
import PIL.Image
import numpy as np
import os
base = REPLACE_WITH_DIRECTORY_ROOT
img_root = os.path.join(base, 'train_images')
lbl_root = os.path.join(base, 'train_masks')
depth_root = os.path.join(base, 'train_depth')
file_names = os.listdir(img_root)
for i, name in enumerate(file_names):
if not name.endswith('.jpg'):
continue
lbl = os.path.join(lbl_root, name[:-4]+'.png')
img = os.path.join(img_root, name)
dep = os.path.join(depth_root, name[:-4]+'.png')
try:
imgL = PIL.Image.open(lbl)
np.array(imgL, dtype=np.int32)
imgI = PIL.Image.open(img)
np.array(imgI, dtype=np.uint8)
imgD = PIL.Image.open(dep)
np.array(imgD, dtype=np.uint8)
except Exception as e:
print(e)
print(name +" => " + str(i) + "\n")
from dmra.
Related Issues (9)
- about ConvLSTM
- RuntimeError: The size of tensor a (150) must match the size of tensor b (152) at non-singleton dimension 3 HOT 1
- def forward() drb5.shape=(1,64,100,152) but others's shape =(1,64,100,150) HOT 1
- PiCANet experiment in the paper HOT 2
- RuntimeError: The size of tensor a (150) must match the size of tensor b (152) at non-singleton dimension 3 HOT 3
- inconsistent depth size in DUT-RGBD-400*600 HOT 1
- About learning rate HOT 1
- how to make dataset? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dmra.