Python Forum
Project using Python and Opencv
Thread Rating:
  • 2 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Project using Python and Opencv
#1
Good Day!

I am doing a project about non invasive tag number for cows. I want to use image recognition but I don't know if it can be done using python and opencv/scimage. The non invasive tag number is identifying the cow inside the barn using image recognition. The set-up for the camera will be top view and the basis of the detection is the size of the cow. Do you think is it possible to do? Also My target for this project is 3-5 cows for 1 camera. I see some multiple face detection but I don't know if this is possible. . . . hope someone can help me. . .  . Cry Smile
Reply
#2
Hello!
From my minimal opencv experience I can tell what you want to do is certainly possible, in theory. In practice, I doubt telling cows apart by their size is pratical. This might've been a worthy solution if cows were lined up right in front of camera, to compare easily. But with their random positions, movements and orientations, it is one heck of an undertaking! :D
Reply
#3
I think it would be possible, but I think you would have to build it from the ground up. Facial recognition is done based on common features of human faces, which cow faces/color patterns don't have. I know that there are other image recognition techniques that would work. When I was an undergrad they had a system on campus that could find one of 1,000 t-shirts in a bunch of t-shirts that had just been thrown in a room. But I think they were doing that with a neural net with lots of training.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#4
Why not use facial recognition? I would imagine a cow face is as unique as a human face and the same data points could be applied.  (To be honest, though, they all look like hamburger to me.)  Just curious.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#5
(Apr-23-2017, 12:45 PM)ichabod801 Wrote: which cow faces/color patterns don't have.

I would tend to disagree, as an example, I think you would find it difficult (especially in one herd) to find two cows whose eyes are the same size (height and width), same distance apart, same length and width of the head, same size and shape of the ears and so on.

Having grown up on a farm, you really could distinguish between not just cows, but other animals as well (horses, goats, pigs, etc.)
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#6
(Apr-23-2017, 12:48 PM)sparkz_alot Wrote: Why not use facial recognition?

I suppose it is not the best approach considering OPs described set up:
Quote: The set-up for the camera will be top view

Other than that I agree, CV algorithms should be able to tell cows apart by their facial features and/or body marks. Use of Haar features is quite generic in object recognition, for example.
Reply
#7
Take a photo of each cow from the top for use as a template and track/count the cows with a particle filter maybe? Probably have to write most of it yourself though.
Reply
#8
(Apr-23-2017, 11:37 AM)j.crater Wrote: Hello!
From my minimal opencv experience I can tell what you want to do is certainly possible, in theory. In practice, I doubt telling cows apart by their size is pratical. This might've been a worthy solution if cows were lined up right in front of camera, to compare easily. But with their random positions, movements and orientations, it is one heck of an undertaking! :D

Well, the set up will be in a barn and inside the barn there will only be 3-5 cows for a certain area. Well, I already starting the coding but I am having a problem installing the opencv. It always state this "RuntimeError: module compiled against API version 0xa but this version of numpy is 0x7 Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> import cv2 ImportError: numpy.core.multiarray failed to import" I dont know what is the problem. I follow all the instruction to the videos and websites none solve my problem.

(Apr-23-2017, 12:45 PM)ichabod801 Wrote: I think it would be possible, but I think you would have to build it from the ground up. Facial recognition is done based on common features of human faces, which cow faces/color patterns don't have. I know that there are other image recognition techniques that would work. When I was an undergrad they had a system on campus that could find one of 1,000 t-shirts in a bunch of t-shirts that had just been thrown in a room. But I think they were doing that with a neural net with lots of training.


Hello,
The problem of building it from the ground is the camera is prone for damage. i think your talking about ANN(Artificial Neural Network). Yeah it is kinda hard to learn by myself.

Other than that I agree, CV algorithms should be able to tell cows apart by their facial features and/or body marks. Use of Haar features is quite generic in object recognition, for example.

Thanks, I wiil study the Haar Features.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how to detect irregular circles in python with opencv johansigaran 4 3,692 May-01-2020, 02:07 AM
Last Post: johansigaran
  face tracking using optical flow method using python+opencv Aftab 1 6,985 Mar-22-2017, 07:54 AM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020