Comments (6)
The dataset path arrangement is defined at the function "load_dataset_folds", which is in the "train.py" file.
When running this code you have to set the -path parameter with the folder that contains the datasets and use -db to set the dataset name.
I hope this helps
from document-image-binarization.
Is that what you mean?
path/db/dbp
I define path as datasets, and db in "phi" is "PHI/train/phi_GR", so my directory is "datasets/PHI/train/phi_GR", right?
And in this directory, there are two subfolders with the suffix GR and GT, which contain the original image and the fine standard respectively.
Am I doing the right thing?
from document-image-binarization.
I did this but made a mistake.
Traceback (most recent call last):
File "train.py", line 305, in
main()
File "train.py", line 252, in main
x_test, y_test = utilDataGenerator.generate_chunks(array_test_files, x_sufix, y_sufix, args.window, args.window)
File "/public/home///document-image-binarization-master/binarize/utilDataGenerator.py", line 74, in generate_chunks
x_data = x_data.reshape(x_data.shape[0], x_data.shape[1], x_data.shape[2], 1)
IndexError: tuple index out of range
After that, I deleted two subfolders with the suffix GR and GT, and this error also occurred, so I think it maybe a path error.
from document-image-binarization.
Yes, that is right. The path should be:
datasets/PHI/train/phi_GR
datasets/PHI/train/phi_GT
datasets/PHI/test/phi_GR
datasets/PHI/test/phi_GT
And you should run something like this:
python -u train.py -path datasets -db phi ...rest of parameters...
The extensions of the images should be ".png"
You may also add some prints in the code to debug what is happening.
from document-image-binarization.
Thanks! My problem has been solved!Also, I trained with my own data set, and it worked well.
Finally,can you tell me about dbp, if you like?
from document-image-binarization.
"-dbp" parameter is only used for the datasets Dibco and Palm.
It allows you to indicate the fold number of Dibco and the GT number of Palm.
In Dibco there are datasets for several years skipped from 2009 to 2016, so you can enter dbp values from 0 to 6 to select the year you want.
On Palm there are 2 annotators, so with dbp you can enter 0 to select the first annotator and 1 for the second.
from document-image-binarization.
Related Issues (13)
- Source code missing in the repository HOT 1
- run_th_test method not found HOT 1
- During testing best threshold is not set HOT 1
- data prepare error HOT 1
- threshold must be numeric and non-NAN, try sys.maxsize for untruncated representation HOT 4
- Ensiedeln and Salzinnes datasets have no corresponding ground-truth binarized images? HOT 1
- packaging HOT 8
- Requirements not working HOT 4
- what method/tool you use for data augmentation HOT 1
- 可以给下具体环境的配置信息吗 HOT 1
- 请问python是什么版本的 HOT 1
- How to achieve the publication results by using the pre-trained model and binatize.py? HOT 3
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 document-image-binarization.