Closed abagshaw closed 7 years ago
That makes sense - if I have some time I might have a go at it. Maybe I'm wrong - but it appears that cv2
is imported and used in more files than just ./net/yolo/test.p
, for example ./utils/im_transform.py
and ./net/help.py
?
You're right. ./utils/im_transform.py
is for training data augmentation, while ./net/help.py
is for camera demonstration. I supposed you just want to use the trained weights for something else.
You're right - I'm not interested in training my own data. Ok thanks for that information - if I get anywhere with this I'll let you know, thanks!
Related to the above, it seems the conda
package for opencv2
conflicts with python 3.
The following specifications were found to be in conflict:
- opencv 2.4.11*
- python 3.5*
Use "conda info <package>" to see the dependencies for each package.
What is the best way to get the current codebase running? I'm trying compiling OpenCV, but feels like an overkill for the few places it's used.
Agreed. I am working on abstracting away image I/O. In the meantime, please change to PIL or some equivalent as suggested above.
@lunardog The menpo
channel has a compatible python 3 opencv package. A conda env file like the following may work:
name: darkflow
channels:
- menpo
dependencies:
- python=3.5
- opencv3
- numpy
- scipy
- notebook
- pillow
- pip:
- tensorflow
Any updates on this? Has anyone managed to get a lighter image library working with darkflow?
Hey @abagshaw I am sorry I was too busy, at least in the next 01 month. There is this guy @ryansun1900 who understands the code in this repository very well. Maybe he can help you out.
if you don't mind, may i know why u don't want to use opencv? i think its great library..., it has UMat
object(Transparent API), which makes use of graphic card for processing. in C++ it is:
UMat frame; //note if you use UMat and don't have graphic card, then image will be processed using processor, else it will be processed using graphic card (Thanks to T-API)
VideoCapture cap(0);
cap>>frame; //overloaded operator, copies image directly to UMat object from web camera
with few syntax changes, above code is almost same in python. also not to mention it also has ffmpeg integration, so u can use IP cameras directly
VideoCapture cap("IP_ADDRESS");
//C++
`
camera = cv2.VideoCapture('IP_ADDRESS') #Python`
To be honest, I've kind of warmed up to OpenCV the more I've used it over the past little while. The reason why I was wanting to switch to something else is that it's a fairly hefty library to include when it's only being used in a few places for image transformations and drawing predictions (I suppose it's being used a little more now with the video integration).
Ideally if there was some other lighter and leaner image processing library that can handle the same np.ndarray
that OpenCV uses than that could be used for the core image transformations. That way if someone is using darkflow only for predicting images and no other fancy stuff (camera, video, etc.) they don't have to install the whole OpenCV library. Honestly though this should be fairly low on the priority list...if it's on the priority list at all. Getting YOLO 9000 would be much more exciting for me :)
You could do everything in tensorflow. Tensor are basically equivalent to numpy arrays and tensorflow does have tensors to hold images and methods to do image processing stuff (resize, pad , crop, etc...) also this would allow you to use the tensorflow input queue pipeline...
I'm trying to use this but I'd really rather use this without OpenCV - is that possible?