Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trian #3

Closed
wangyuxin87 opened this issue May 7, 2019 · 9 comments
Closed

trian #3

wangyuxin87 opened this issue May 7, 2019 · 9 comments

Comments

@wangyuxin87
Copy link

Traceback (most recent call last):
File "train.py", line 66, in
train(train_img_path, train_gt_path, pths_path, batch_size, lr, num_workers, epoch_iter, save_interval)
File "train.py", line 35, in train
for i, (img, gt_score, gt_geo, ignored_map) in enumerate(train_loader):
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 637, in next
return self._process_next_batch(batch)
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 658, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
TypeError: function takes exactly 5 arguments (1 given)

How can I fix it?

@wangyuxin87
Copy link
Author

Waiting for your response!

@SakuraRiven
Copy link
Owner

@wangyuxin87 hi, the code has been only tested on my environment, which is shown in README. So if you are using another environment which causes that bug, change num_workers to 0 and try again. I hope this helps : )

@wangyuxin87
Copy link
Author

Thanks for your code and response!
I have some new issue, can you help me?

root@bfd0e7a2dba1:/home/yxwang/pytorch/EAST# CUDA_VISIBLE_DEVICES=6,7 python3 train.py
Traceback (most recent call last):
File "train.py", line 66, in
train(train_img_path, train_gt_path, pths_path, batch_size, lr, num_workers, epoch_iter, save_interval)
File "train.py", line 35, in train
for i, (img, gt_score, gt_geo, ignored_map) in enumerate(train_loader):
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 615, in next
batch = self.collate_fn([self.dataset[i] for i in indices])
File "/usr/local/lib/python3.5/dist-packages/torch/utils/data/dataloader.py", line 615, in
batch = self.collate_fn([self.dataset[i] for i in indices])
File "/home/yxwang/pytorch/EAST/dataset.py", line 384, in getitem
lines = f.readlines()
File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)

Waiting for your response!

@SakuraRiven
Copy link
Owner

Putting #coding=utf-8 in the 1st line may help

@wangyuxin87
Copy link
Author

I try # coding=utf-8 or # coding:utf-8 in the 1st line of dataset.py, it does not work.... Do you have any other idea? Thanks

@SakuraRiven
Copy link
Owner

@wangyuxin87
Copy link
Author

Thanks! It has worked. Do you add ICDAR 2013 in your training images? I think it will improve the performance.

@SakuraRiven
Copy link
Owner

The data distribution in 13 and 15 still exists difference, so you can try and welcome to share the results : )

@wangyuxin87
Copy link
Author

The results get worse when I change the basic network to Resnet50, do you have any idea?
By the way, it obtains the same performance with extra dataset(ICDAR2013).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants