Neurokuryatnik part 3. About the marking of chickens

    And about the fact that chickens are also crazy.

    image
    Beauty bird in the nest

    One not-so-impressive article on markup of chicken images.


    Articles about the neuro-chicken house

    Spoiler heading
    1. Intro about training yourself in 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. Layout of datasets
    5. Working model for chicken recognition in the chicken coop
    6. The result - a working bot that recognizes chickens in the chicken coop

    1.5 months passed, we finally reconciled with the fact that the camera can’t be hung better, we deleted unnecessary photos from the server and realized that they were all being accumulated and accumulated. And even I don’t check what is happening in the chicken coop (sometimes electricity is cut off there and the bot is simply silent). And it’s time to mark up already.


    At first, we hoped that there were tools for drag and drop layouts that make life easier. They exist , yes. But adequate ones are either difficult to install, or were last updated many years ago, others do not support the required formats and do not allow adding metadata, still others are too advanced (pixel-by-pixel markup, masks), which we don’t need, fourths are a specific plugin.


    In fact, we just need to sort the pictures into classes, we don’t even need to highlight the object in the photo - it is still present or not. As a result, I do the markup like this:


    • I dump the list of files for the day into the console.
    • I drop the list in Calc / Excel.
    • I pull the date and time of creation from the file name.
    • Sort by time.
    • I find the file in the dump, open it, put down the identifier of the object (in the table).
    • At the end of the markup, upload the file to the database.

    What is an object identifier?


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


    The object has a type (chicken, egg, etc.). Just in case, I broke the chicken eggs into classes and types by number, if desired, it can be combined. The type also has an attribute quantity.


    At first I sat down with pgAdmin and honestly did everything through sql, which is not very different from sitting in the db console, so at some point I still set myself a vine and opened the navigator. Still, it’s more convenient and faster, although it may be necessary to add a forgotten sequence or constraint or remove an extra one, you still have to open the dock and write a request). And csv-shki then easier to fill. Although you can compile formulas in excel requests for insert, so I do too, yes =)


    All this resulted in a tiny er-chart:



    image

    Cute, fine, then it’s easy to upload in the right format, at least json, at least xml, at least csv, and in general, in the absence of the required format and the presence of desire, concatenation will do almost anything.


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


    If someone wondered why the chicken is psycho, then the story is this: it was the most common motley chicken, but something happened to it. Now, from time to time, she shakes her head and takes a few steps back (usually, chickens shake their heads because they freeze in winter, but this is more likely to be caused by a rooster because of a large crest: it is easier to freeze). For this reason, my mother suspected that she was not rushing, but it turned out that she was rushing better than anyone. The chicken definitely went, but rushes and rushes well!


    image
    This is psycho in the nest

    Mom recently had new chickens - very young, white, already have small white eggs. Unlike the sedate old birds, these birds are full of childish energy, they rush about all the time, curious, climb into the nest, sometimes for some reason they sit and sleep in it, then some old woman drives them out. There is no point in marking such ones, as they, as a rule, are not in the nest in order to lay an egg (although sometimes it happens, but in general they chose another nest). Since they do not differ much, I marked them as one white chicken.


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


    In the photographs, it is noticeable that the birds gradually acquire color - the skin on the head and the comb are poured red, the hens cease to be bluish-white factory birds. They also cease to be afraid of people and gather in a corner, which the camera will not tell about.


    image
    Curiosity

    About how to distinguish between chickens that are very similar. In general, chickens are best distinguished by their “face” - the shape of their eyes, comb, and skin folds. Yes, this is possible, and the chickens themselves distinguish and remember each other (otherwise they could not build a complex hierarchy of domination of one individual over another with transitive properties: chicken A dominates B, chicken B dominates B, then A dominates B). But our camera hangs in such a way that it is simply impossible. We have to rely on coloring.


    In this case, we sometimes get difficult to see chickens. We have chickens red star and red twin. These are two red hens, one of which received the nickname Internet Star, because for some time I used her photo as an avatar, it amused my parents and now the chicken wears such a nickname. The second is just very similar to her. In photographs, 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 manual impudent hens and how they almost devoured me.



    Also popular now: