Comments (3)
Yeah there were some issues. I rewrote the code and now it works fine. I also used opencv to load the image. It saves me some computation and eleminated the error. I am not sure how you are loading the image. the scipy method is taken down so i used opencv. You can check out my reposetory fot the code that i wrote.
https://github.com/akshatgarg99/FRR-Net/blob/master/utils/dataLoader.py
from pytorch-semseg.
I'm also trying to work with CamVid. Have you also been having trouble with the transform
method?
I'm trying to use the DataLoader but it gives me this error:
Traceback (most recent call last):
File "train.py", line 229, in <module>
train(cfg, writer, logger)
File "train.py", line 118, in train
for (images, labels) in trainloader:
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 336, in __next__
return self._process_next_batch(batch)
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
TypeError: Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 106, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 106, in <listcomp>
samples = collate_fn([dataset[i] for i in batch_indices])
File "/content/pytorch-semseg/ptsemseg/loader/camvid_loader.py", line 57, in __getitem__
img, lbl = self.transform(img, lbl)
File "/content/pytorch-semseg/ptsemseg/loader/camvid_loader.py", line 74, in transform
lbl = torch.from_numpy(lbl).long()
TypeError: can't convert np.ndarray of type numpy.int8. The only supported types are: double, float, float16, int64, int32, and uint8.
from pytorch-semseg.
Thanks a lot! That's exactly what I was looking for.
from pytorch-semseg.
Related Issues (20)
- Where I run 'python train.py [-h] [--config [CONFIG]]' HOT 1
- pspnet training HOT 2
- About the speed results of ICNet
- SegNet on Pascal:: TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; HOT 1
- Any good results from SegNet? HOT 9
- ValueError: Segmentation map contained invalid class values HOT 2
- RecursionError: maximum recursion depth exceeded in __instancecheck__ HOT 1
- test.py error HOT 1
- mscoco pre-trained model
- Any tip to train models from scratch using cityscape dataset? HOT 1
- Semantic Segmentation Tool
- benchmark_RELEASE
- Pretrained Models
- Problem while trying to train HardNet on CamVid dataset
- KeyError: 'name' HOT 2
- Where is model being saved after training?
- python-cdo HOT 1
- Poly learning rate scheduler not doing anything HOT 1
- Error in fcn8s_pascal.yml 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 pytorch-semseg.