Comments (2)
Hi @xieyufei1993, when training model I got an error such as:
(fots) loitg@loitg-Precision-T3600:~/Desktop/tu_workspace/FOTS$ python main_train.py
use config:
initial_epoch 0
epoch_num 30000
lr 0.001
decay 0.0005
use_gpu True
batch_size 64
num_workers 10
optmizer RMSprop
betas (0.5, 0.999)
epsilon 0.0001
shrink_side_ratio 0.6
shrink_ratio 0.2
model FOTS
patience 2
load_weights False
lambda_inside_score_loss 4.0
lambda_side_vertex_code_loss 1.0
lambda_side_vertex_coord_loss 1.0
load_model_path checkpoints/model.pth
save_path save_model/
total_img 16243
validation_split_ratio 0.1
max_train_img_size 736
max_predict_img_size 2400
parse <bound method parse of <config.DefaultConfig object at 0x7fe4ff6d5cc0>>
end the parse!!!Epoch 1 / 30000
Traceback (most recent call last):
File "main_train.py", line 95, in
main()
File "main_train.py", line 90, in main
save_step=5, weight_decay=weight_decay)
File "main_train.py", line 32, in train
for i, (img, score_map, geo_map, training_mask) in enumerate(trainloader):
File "/home/loitg/miniconda3/envs/fots/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 582, in next
return self._process_next_batch(batch)
File "/home/loitg/miniconda3/envs/fots/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
RuntimeError: Traceback (most recent call last):
File "/home/loitg/miniconda3/envs/fots/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/loitg/Desktop/tu_workspace/FOTS/data/dataset.py", line 672, in collate_fn
images = torch.stack(images, 0)
RuntimeError: expected a non-empty list of TensorsHow to fix this error ?. I hope to see your reply soon.
I am facing the exact error. if someone has workaround, please let me know.
from fots.
If you are using ICDAR dataset, the annotation text file normally has "gt_" before the image name.
So you need to edit your dataset.py file starting from line 581 as below:
if os.path.exists(txt_root + "/gt_"+im_name[0:-4] + '.txt'): txt_fn = "gt_"+im_name[0:-4] + '.txt' elif os.path.exists(txt_root + "/gt_"+im_name[0:-5] + '.txt'): txt_fn = "gt_"+im_name[0:-5] + '.txt'
from fots.
Related Issues (20)
- how to download your trained model file HOT 7
- Could share the trained models on the ICDAR? HOT 2
- 复现精度问题 HOT 7
- No recognize branch HOT 1
- please upload the model HOT 1
- Synth800K or synth90K HOT 1
- Where is the part of the RoIRotate? HOT 3
- ModuleNotFoundError: No module named 'pretrainedmodels' HOT 2
- 您好,现在代码测试和训练完全正确是吧,精度怎么样?
- ModuleNotFoundError: No module named 'logger.logger' HOT 1
- license?
- Training on own data
- poly in wrong direction?
- Isn't creating txt files for images
- What are metric values for the re-implementation? HOT 1
- No module named 'pretrainedmodels' HOT 1
- How to resume training
- raise RuntimeError('Cannot compile lanms: {}'.format(BASE_DIR))
- sth problem with training my own data
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 fots.