📜 ⬆️ ⬇️

Neurocoole Part 3. About chick marking

And about the fact that chickens, too, are crazy.

image
Beauty bird in the nest

One not very impressive article about markup images of chickens.


Articles about neurocooler
')
Spoiler header
  1. Intro to learning about neural networks
  2. Iron, software and config for monitoring chickens
  3. A bot that posts events from the life of chickens - without a neural network
  4. Dataset markup
  5. A working model for the recognition of chickens in the hen house
  6. The result - a working bot that recognizes chickens in the hen house

It took 1.5 months, we finally accepted the fact that the camera can not be hung better, deleted unnecessary photos from the server and realized that they all accumulate and accumulate. And even I don’t check what is happening in the hen house (and sometimes electricity is cut down there and the bot just keeps silent). And it is time to mark.


At first, we hoped that there were drag and drop layouts that would make life easier. They exist , yes. But adequate or difficult to install, or last updated many years ago, others do not support the necessary formats and do not allow to add metadata, some are too advanced (pixel-by-pixel markup, masks) that we don’t need, the fourth are a specific plugin.


In fact, we just need to spread the pictures into classes, we don’t even need to select the object in the photo - it is still there or not. The markup I end up doing is this:



What is an object ID?


The object is a chicken, the absence of something at all, two hens, an egg, two eggs, a lack of light or something irrelevant (someone's hand stealing dinosaur eggs, ghosts, a cat), etc. The object identifier is simply a unique number in the database. For example, 14 is the psycho hen, -1 is the absence of light, 0 is the absence of something, 10 is eight eggs in the nest. Objects have attributes, for example, variegation of the back and collar, the main color. Attributes are pronounced.


The object has a type (chicken, egg, etc.). Just in case I broke the eggs into classes and types according to the number, if you wish, you can combine them. The type also has an attribute quantity.


At first I sat down at pgAdmin and honestly did everything through sql, which is not much different from sitting in the console of the database, so at some point I still set myself a Vine and opened the Navikat. Still, it is more convenient and faster, although sometimes you need to add a forgotten sequence or constraint or delete an extra one, you will still have to open the dock and write a query). And csv-shki then easier to fill. Although it is possible to create formulas in excel for requests for an insert, this is how I do it too, yes =)


All this resulted in a tiny er-chart:



image

Nice, fine, then easy to upload in the right format, even json, even xml, even csv, and in general, in the absence of the desired format and the presence of desire, concatenation will do almost anything.


The main table in the schema is chicoopfiles. This is a file and object mapping. Since the file corresponds to only one object, I enter the objects in the table with the files immediately.


If someone is interested in why the chicken is psycho, then the story is this: it was the most common motley chicken, but something happened to it. Now, occasionally, she shakes her head and takes a few steps back (usually, shaking her head in chickens is due to the fact that they freeze in the winter, but this is more often the cock suffers because of the large crest: it's easier to freeze it). For this reason, Mom suspected that she was not rushing, but it turned out that she was rushing better than anyone. Chicken definitely gone, but it’s rushing and trotting well!


image
It's psycho in the nest

Mom recently started a new chickens - very young, white, already have small white eggs. Unlike old-time power birds, these are full of childish energy, they are constantly rushing, prying, climbing into the nest, sometimes for some reason sitting in it, sleeping, then some old woman chases them out. There is no sense to mark such people, as they, as a rule, are not in a nest to carry an egg (although it happens from time to time, but in general they chose another nest for themselves). Since they are not very different, I marked them up as one white chicken.


New chickens are very funny. Mom noticed that they very badly rush, but if you close them in a small room without caches, then they rush well. Obviously, the chickens are not laying in the nest. And yes, my father recently discovered their hiding place under the logs, where they piled 22 eggs ...


In the photos it is noticeable that the birds gradually acquire color - the skin on the head and the comb are poured red, the chickens are no longer bluish-white factory birds. They also stop being afraid of people and pile up in a corner, which the camera won't tell about anymore.


image
Curiosity

About how to distinguish chickens that are very similar. In general, it is best to distinguish chickens by "face" - the shape of the eyes, the ridge, the skin folds. Yes, it is possible, and the chickens themselves distinguish and remember each other (otherwise they could not build a complex hierarchy of dominance of one individual over another with transitive properties: hen A dominates B, hen B dominates B, then A dominates B). But our camera is hanging so that it is simply impossible. We have to rely on the color.


In this case, we get sometimes difficult to see chickens. We have red star and red twin hens. These are two red hens, one of which got the nickname Internet Star, because for some time I used her photo as an avatar, my parents were amused, and now the chicken wears such a nickname. The second is just very similar to her. In the photos they can be distinguished by dark spots. The Star has a more colorful collar and dark spots on the shoulders; her friend has a darker spot on the back of the collar.


image
Left - red star, right - red twin

Well, a little about the handhearted chickens and how they almost ate me.


Source: https://habr.com/ru/post/330740/


All Articles