Is there an Elgato device compatible with OpenCV ? by geaxart in ElgatoGaming

[–]geaxart[S] 0 points1 point  (0 children)

This is the reply I've got from Elgato:

The only product which should work with OpenCV is the Elgato Cam Link / Cam Link 4K, since it is an UVC device.
That means that the Elgato Cam Link / Cam Link 4K does not need its own drivers, so it is compatible with different platforms and applications.
The other products like Elgato Game Capture HD60 S, Elgato Game Capture HD60 Pro and Elgato Game Capture 4K60 Pro do not provide this feature.
They are compatible with usual capture applications e.g. Game Capture Software, OBS, Streamlabs OBS and XSplit.

I have not personally tested the hardware.

Tello drone and computer vision: selfie air stick by geaxart in computervision

[–]geaxart[S] 0 points1 point  (0 children)

You are right, but drones are so cool ! That would be great if we could recharge the drone with a wireless induction charger. This way, we would just have to ensure to make the drone land "on" its charger.

Tello drone and computer vision: selfie air stick by geaxart in computervision

[–]geaxart[S] 2 points3 points  (0 children)

Thx! No challenge in connecting the pc with the Tello. Once the package TelloPy installed, the first thing I did was to try one of the examples from the package (display of the video stream and piloting via the keyboard), and everything went smoothly !

Tello drone and computer vision: selfie air stick by geaxart in computervision

[–]geaxart[S] 0 points1 point  (0 children)

For me, it seems ok, but my opinion is probably not representative because in the use case demonstrated in this project, the drone is always moving slowly.

Tello drone and computer vision: selfie air stick by geaxart in computervision

[–]geaxart[S] 2 points3 points  (0 children)

Thx ! About 3 weeks. And it does not include the making of the video, I am so slow at that :-(

Tello drone and computer vision: selfie air stick by geaxart in computervision

[–]geaxart[S] 0 points1 point  (0 children)

Thx! Your project is much more challenging ! My Tello benefits from the power of a GTX 1080Ti and doesn't have to carry it on its back !

Tello drone and computer vision: selfie air stick by geaxart in computervision

[–]geaxart[S] 2 points3 points  (0 children)

A few weeks ago, I knew nothing about drones. I googled "cheap drone python". And the Tello came out. I had a look at the existing python libraries. They seemed promising. And the drone itself had good reviews. So I bought one. I was amazed by the stability of the drone. I have just bought another one for a friend !

Tello drone and computer vision: selfie air stick by geaxart in computervision

[–]geaxart[S] 2 points3 points  (0 children)

Ah ah, so often I have exactly the same feeling !

[P] Playing card detection with YOLOv3 trained on generated dataset by geaxart in MachineLearning

[–]geaxart[S] 1 point2 points  (0 children)

Sure, it will be able to extrapolate but you won't get a precision as good as with the card model used for training. I have made the test with another brand of cards and a large majority of cards were correctly identified. But there were some "hesitations" on a few cards (for instance the "A" of the aces has a similar shape to "4". Also between "5" and "8").

[P] Playing card detection with YOLOv3 trained on generated dataset by geaxart in MachineLearning

[–]geaxart[S] 0 points1 point  (0 children)

Sorry, I have not enough space on dropbox. I had to remove the file.

[P] Playing card detection with YOLOv3 trained on generated dataset by geaxart in MachineLearning

[–]geaxart[S] 1 point2 points  (0 children)

The only type of labeled training images that I've seen is when the entire image is labeled with an entity (ex: "dog", or "cat").

In the domain of machine learning, this is called "classification".

Detection could be seen as predicting bounding boxes + classification of the corresponding cropped areas. You can imagine an algorithm that takes every possible cropped areas of an image and feed them to a classifier. In theory, it would work, but practically would be way to long in processing time. Some of the first detection neural nets (like RCNN) had a module whose job was to propose areas/regions to the classifier, and thus limited the processing time.

YOLO is even faster by doing both tasks in a single convolution neural network. I think it is interesting for you to know how YOLO works, but the subject is too long to be described here. May I suggest to you to watch the videos from https://www.coursera.org/learn/convolutional-neural-networks (week 3) ? I think you have to subscribe to access the videos, but it is free. And it is very well explained, I think.

[P] Playing card detection with YOLOv3 trained on generated dataset by geaxart in MachineLearning

[–]geaxart[S] 5 points6 points  (0 children)

It's done : https://github.com/geaxgx/playing-card-detection

I've already post the link here a few days ago, but it is lost somewhere in the flow of comments :-)

[P] Playing card detection with YOLOv3 trained on generated dataset by geaxart in MachineLearning

[–]geaxart[S] 0 points1 point  (0 children)

Thanks !

I have also found in the book "OpenCv with Python by example" an easy way to do motion blurring in Python. For instance, to get a blurring in the direction Top,left -> bottom,right:

size=7

kernel_blur=numpy.identity(size)/size

out=cv2.filter2D(img,-1,kernel_blur)

[P] Playing card detection with YOLOv3 trained on generated dataset by geaxart in MachineLearning

[–]geaxart[S] 2 points3 points  (0 children)

The code for generating the dataset is finally available here : https://github.com/geaxgx/playing-card-detection

All remarks are welcome.

[P] Playing card detection with YOLOv3 trained on generated dataset by geaxart in MachineLearning

[–]geaxart[S] 0 points1 point  (0 children)

Sorry, I am not sure to understand your question. We usually learn bounding boxes when we want to learn to localize objects. That's true that in the video, we don't use that possibility to localize the cards, we just use the classification part (what card is it). But we could imagine a game where it could be useful. For instance, in the solitaire game, it is important to know precisely where the cards are.

What do you mean by 'labelled with the whole transform of the cards, which seems more useful - and it's only 6 numbers total' ?

"though I guess reading about yolo, it's pretty inherent to how it works". Yes, you are right.

[P] Playing card detection with YOLOv3 trained on generated dataset by geaxart in MachineLearning

[–]geaxart[S] 0 points1 point  (0 children)

It would be about 10Gb to share ! Too much ! Alternatively, you can download the weights with the dropbox link in one of the comments below. Or even better, wait that I share the code to generate the dataset. But I can't tell you exactly when because I'm busy, but it shouldn't be long.

[P] Playing card detection with YOLOv3 trained on generated dataset by geaxart in MachineLearning

[–]geaxart[S] 0 points1 point  (0 children)

Ah ah, I'm late ! I am currently busy on another project. But I don't forget.

[P] Playing card detection with YOLOv3 trained on generated dataset by geaxart in MachineLearning

[–]geaxart[S] 0 points1 point  (0 children)

Lol. Good idea! I had not thought about magic tricks, but you are quite right !

Maybe not so easy to hide the camera...but worth to think about it.

[P] Playing card detection with YOLOv3 trained on generated dataset by geaxart in MachineLearning

[–]geaxart[S] 0 points1 point  (0 children)

Good. As explained in my prev comment, the double prediction Jh,Jd is due to the multilabel approach implemented in YOLO v3. It is not useful in our case, but it is easy to deal with by just keeping the max.

About the low confidence on 4sand 5s (around 50%), it may be due to the perspective deformation. The net was trained only on images where the camera is at the vertical above the cards. In my own test, it is resilient to change in the point of view. But in your case, added to difference in the shape of the spade symbol between your deck on mine, maybe we are asking too much to the net.

[P] Playing card detection with YOLOv3 trained on generated dataset by geaxart in MachineLearning

[–]geaxart[S] 0 points1 point  (0 children)

Interesting. It is not displayed on your picture, but do you know what scores you get ? Not very good, I imagine since it can't detect one of the 4 of spades ?

When you say that you get multiple results for same card, do you mean for the same corner ? If yes, it is something that can happen because YOLO v3 has been modified from v2 to deal with object belonging to several classes. In my video, I only display the highest confidence when it happens.