Comments (5)
Ok, after some debugging I was able to run the code.
If you want, I could post my code here, so that users that will have to use Google Colab have it ready.
Let me know!
Cheers
from ocr_tablenet.
@LivingDeadCloud, thanks! If you don't mind I would appreciate it!
Sorry, I did not have time to help you in between... :/
Yeah no problem, I will post it next week!
from ocr_tablenet.
Hey everyone
Sorry for the delay. I'm going to post the code now. Just notice that I haven't used the code ever since my original post, so it may need some small adjustment.
Here's my code to run TableNet in Google Colab:
# Mount drive
from google.colab import drive
drive.mount('/content/drive', force_remount=True)
# Install all requirements
!pip install -r /content/drive/MyDrive/TableNet/requirements.txt # Change this with the path to requirements.txt
# Install additional packages
!pip install tesseract
!pip install torchtext==0.8.0
!pip install torch==1.7.1
!pip install pytorch-lightning==1.2.2
!pip install torchmetrics
!pip install deprecate
!apt install tesseract-ocr
!apt install libtesseract-dev
# Run the code
# python predict.py --model_weights='<weights path>' --image_path='<image path>' # Default command line
result = !python /content/drive/MyDrive/TableNet/predict.py --model_weights='/content/drive/MyDrive/TableNet/best_model.ckpt' --image_path='/content/drive/MyDrive/TableNet/TablesImages/Your_image.png' # Change paths to "predict.py" and "Your_image.png" according to your drive
# Look the result
result
Now, result
is a IPython.utils.text.SList
type variable, so here you may need some adjustments to predict.py function. However it should be pretty straightforward from here.
If someone is willing to post their code to get result as a more useful type of variable, for exampel a Pandas dataframe, that would be great!
Cheers
from ocr_tablenet.
@LivingDeadCloud Thanks! I will add this to README.md
from ocr_tablenet.
@LivingDeadCloud, thanks! If you don't mind I would appreciate it!
Sorry, I did not have time to help you in between... :/
from ocr_tablenet.
Related Issues (20)
- How I can get the coordinates of the cells HOT 2
- unable to predict on an image using "predict.py". HOT 3
- How to improve the recognition effect non-training set? HOT 1
- Entry point not found - torchvision HOT 1
- Gpu getting filled up after 3-4 epoch HOT 1
- How to process png image HOT 4
- A Bug? HOT 2
- SList Object to Pandas DataFrame Conversion
- Finetuning "best_model.cktp" on the same dataset
- Python version HOT 1
- Suggest to loosen the dependency on albumentations HOT 2
- add license
- How to convert to onnx or anywhere to download onnx version? and how to use onnx? HOT 1
- encounter ModuleNotFoundError: No module named 'tensorboard' when running in Conda virtual environment
- ValueError: operands could not be broadcast together with shapes (896,896,4) (3,) (896,896,4) HOT 1
- ValueError: `Dataloader` returned 0 length. Please make sure that your Dataloader at least returns 1 batch
- RuntimeError: [enforce fail at inline_container.cc:145] . PytorchStreamReader failed reading zip archive: invalid header or archive is corrupted HOT 1
- Excuse me, can you detect wireless form HOT 1
- Whether the wireless table can be detected 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 ocr_tablenet.