Deep Learning: Recognise your home pets!

栏目: IT技术 · 发布时间: 4年前

内容简介:Check my GitHub repository forHere is the roadmap to this article:Here we go!

Deep Learning Object-Detection

Deep Learning: Recognise your home pets!

Ever wondered how would a face recognition for a pet would work? Phone Unlock? I’ll be presenting the project in a way that you guys too will be able to recognize your own pet.

(rights: own image)

Check my GitHub repository for source code . If any issues encountered please do send an email to me.

ROADMAP

Here is the roadmap to this article:

1] Introduction

2] Prerequisites for demo and usage

3] Examples and results

4] Future Improvements

Here we go!

1] Introduction

If you’re not familiar with object detection please check out an article that I wrote recently about the Yolo architectures, despite talking about yolov4 there and using yolov3 here, the main concepts remain.

2] Prerequisites for demo and usage

System prerequisites are the same found on my Github repository. So go ahead and clone my repository.

git clone https://github.com/miki998/pet_recognition

Once you’re done downloading, you’ll have to get some extra files that I, unfortunately, could not upload to git due to its size. You’ll have to ask me and I will share you the links through google drive.

Put them in the following folder ./DARK/weights . Double-check you meet all requirements, (requirements.txt). Alright, you’re now good to go.

Standard Run

Supposedly all, if everything is in the order you simply have to put images of the pets you want the model to remember/recognize. And then

python3 train.py -<arguments>

Arguments will be explained when you simply run python3 train.py.

If you want to add more pets (i.e cats or dogs) for the model to recognize then train them separately and in an incremental fashion (meaning, one after the other plus, you can add multiple images of the same pet)

To recognize a pet

python3 recog.py -<arguments>

Arguments will be explained when you simply run python3 train.py.

Docker container Run (preferred method)

The commands are similar to previous ones, simply do the following before starting (start a container with the image that you supposedly built beforehand, you can find instructions in the README.md from the repository)

docker run -it -p 9999 --ipc=host <docker-image-name>

Note that <docker-image-name> is the name you gave to the image when you built it.

3] Examples and results

First of all, a batch of examples for the different trained detections for the two pets that we support (cat and dogs)

We have eyes detection:

(own image)

body detection:

(own image)

face detection:

(own image)

After a recognition model training (i.e lbph features creation and storing) on 7 different pets (we didn’t test out the limits of recognition and note that we tested all pets in a similar environment) here is my preferred pet!

(own created gif)

4] Future improvements

We have a “sort of “ real-time recognition on a limited set of pets (since we used it on a product for home pets that obviously limits the range of pets we are required to recognize) through some tricks on real-time that involves not catching all the time images from video or reducing resolution or using overpowered chips (I wasn’t in charge of this part). We are still trying to improve the recognition parts since there is an obvious limitation in numbers (the size of weights increasing at least linearly to the number of pets), other features involving automated face landmarks added with large scale diffeomorphism registration could help to normalize faces, also finding other features could help (i.e behavioral since we have body detection). In the detection part, tons of things could be done e.g replacing by EfficientDet and TensorRT, parallelizing through image split when we have the first body detections.

Conclusion

Thanks for reading and if you liked it or found this article useful please do follow me on medium and GitHub for more projects. For the weights simply email me, they are quite heavy plus I only provide detection weights since recognition weights are specific to pets you want to recognize.


以上所述就是小编给大家介绍的《Deep Learning: Recognise your home pets!》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

J语言实用教程

J语言实用教程

杨朝杰 / 电子工业出版社 / 1999-04-01 / 30.0

一起来看看 《J语言实用教程》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

URL 编码/解码
URL 编码/解码

URL 编码/解码

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具