Comments (6)
Hi @lzx1413 ,
Currently, I used opencv to get the shape of the image when creating pascal file. Do you have an alternative way to get shape of an image?
libs/labelFile.py:
img = cv2.imread(imagePath)
imageShape = img.shape
from labelimg.
in labelImg.py
image = QImage.fromData(self.imageData)
self.image_shape.append(image.width())
self.image_shape.append(image.height())
self.image_shape.append(3)//this is not good enough but I don not find a good function to meet it
then the parameters can be send to the save function
from labelimg.
If you only need shape of image, you could you PIL.
from PIL import Image
with Image.open(filename) as im:
width, height = im.size
It is easy to install, openCV is very heavy and hard to install. It comes up for non-IT person use your tools.
from labelimg.
Hi ,
Sorry. I am busy with other stuffs this month. I will remove Opencv next month. If possible, you can send a PR and test it, I will review and merge it.
from labelimg.
Hi,
@ck196 yep,I just want to make the size of the software after packaged less :)
@tzutalin I have make a lot of change on this project,so it may be not easy to create a pr to merge it to this branch.It's just a suggestion to rm the opencv
from labelimg.
Fix it
4a3a47a
from labelimg.
Related Issues (20)
- Open directory issue HOT 2
- Issue with Semi Automatic Classification Plugin in QGIS - Python error HOT 1
- Question: How to use 'best.pt' file trained from Google Colab on VScode?
- Crashing in Ubuntu 22.04 LTS HOT 1
- unexpected type 'float' HOT 4
- [suggestion] Some suggestions for improving the usability of the software [建議] 提高軟件易用性的一些建議
- Glib Critical Error After running labelimg.py
- Classes I wrote previously don't come as option after re-opening labelImg in PASCAL VOC format. How do I open/start where I left after closing labelImg ?
- Not able to labeling after openning LabelImg envirnment
- lib.resoures are not found
- labelImg crashing when scrolling (Windows, Python 3.10)
- Cannot install labellmg
- error HOT 1
- mac os m1 from PyQt5.QtCore import PYQT_VERSION_STR, QDir, QFile HOT 1
- How to change the box color of every class? HOT 1
- Difficult Hotkey
- How to use labelImg again for annotation with previusly annotaed some classes.
- no module named 'libs.resources'
- How to add polygon shape instead of rectangle
- Why exit and reopen the labelimg program without any issues with the annotated information, while all the newly created annotation information is lost.
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 labelimg.