Introduction: Yesterday, the students participating in the 17th smart car competition sent me a demonstration video of a wireless charging car model on station B: Open source, the 17th smart car competition, BOT electronic energy-saving car, just play. I can't beat you in the game.
Key words: smart car competition, animal recognition, PaddleHub
§ 01 animal identification
1, Animal recognition in smart car competition
in The 16th National College Student smart car competition Medium Indoor Vision Group The car model is required to detect the noise near the track Target Complete the corresponding actions according to the contents of the target (animals, fruits).
in order to improve the accuracy requirements of visual recognition in vehicle model works The 17th smart car competition Medium Intelligent Vision Group It is required to identify the sub categories in the major categories, that is, the software in the single chip microcomputer needs to be able to identify the sub categories in animals, fruits and vehicles. Therefore, the accuracy of the visual model is greatly improved.
2, PaddleHub one click animal recognition
I saw it in AI Studio artificial intelligence learning and Shixun community of Baidu the day before yesterday PaddleHub one click animal recognition The teaching case shows the open source animal recognition model customized in PaddleHub:
it supports one click animal recognition. It is an application for taking photos and identifying pictures. Let's test this open source network to see how many different animal species there are in each animal collection of the Organizing Committee of last year's smart car competition.
1. Preliminary test
(1) Install PaddleHub
install the paddlehub in the Notebook.
!pip install paddlehub==1.6.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
(2) Test sample picture
test_img_path = ["./1.JPG", "./2.JPG", "./3.JPG"] import matplotlib.pyplot as plt import matplotlib.image as mpimg for imgname in test_img_path: img1 = mpimg.imread(imgname) plt.figure(figsize=(10,10)) plt.imshow(img1) plt.axis('off') plt.show()
(3) Sample picture test results
Ⅰ. Test code
#------------------------------------------------------------ import paddlehub as hub module = hub.Module(name='resnet50_vd_animals') #------------------------------------------------------------ import cv2 np_images = [cv2.imread(image_path) for image_path in test_img_path] results = module.classification(images=np_images) for r in results: printf(r)
Ⅱ. Identification results
{'National treasure panda': 0.9751655459403992} {'inanimate': 0.9993972778320312} {'Arctic fox': 0.8418184518814087}
2. Smart car competition animal collection
in the collection of animals in the intelligent vision group of the 16th intelligent car mirror competition, there are mainly five kinds of animals: dogs, cattle, cats, horses and pigs. These animals are often seen in human life. With the development of human society, many different varieties have been cultivated in the world. The following uses the animal recognition model in PaddleHub to tell us the species of these animals.
(1) Test code
from headm import * import os test_img_path = ["./1.JPG", "./2.JPG", "./3.JPG"] cat_dir = '/home/aistudio/data/fruitanimal' cat_num = 101 cat_img = [os.path.join(cat_dir, '%02d.jpg'%(i+1)) for i in range(cat_num)] ''' import matplotlib.pyplot as plt import matplotlib.image as mpimg for imgname in cat_img: img1 = mpimg.imread(imgname) plt.figure(figsize=(10,10)) plt.imshow(img1) plt.axis('off') plt.show() break ''' import paddlehub as hub module = hub.Module(name='resnet50_vd_animals') import cv2 np_images = [cv2.imread(image_path) for image_path in cat_img] results = module.classification(images=np_images) for r in results: printf(r)
(2) Identification results
Ⅰ. Dog recognition results
through identification, you can see a total of 101 pictures. There are 35 kinds of dogs identified, of which the two most breeds are golden retriever and Welsh corky.
Serial number | type | number |
---|---|---|
1 | Lhasa dog | 1 |
2 | Shiba Inu | 8 |
3 | Eskimo Dog | 1 |
4 | jack russell terrier | 2 |
5 | Japanese Akita | 2 |
6 | Pug | 7 |
7 | West Highland White Terrier | 1 |
8 | Welsh Ke Ji | 14 |
9 | Labrador | 4 |
10 | American Akita | 1 |
11 | German Shepherd | 3 |
12 | Tamaska dog | 1 |
13 | German Spitz | 1 |
14 | China Tibetan Mastiff | 1 |
15 | Stafford Bullterrier | 1 |
16 | Rottweiler | 2 |
17 | Border Collie | 2 |
18 | Poodle lady dog | 3 |
19 | The Dachshund | 1 |
20 | Saint Bernard | 1 |
21 | inanimate | 1 |
22 | Chihuahua | 5 |
23 | boston terrier | 2 |
24 | Alaskan sled dog | 2 |
25 | Dalmatian | 1 |
26 | Golden Retriever | 10 |
27 | Maltese Maltese | 1 |
28 | Chinese garden dog | 2 |
29 | Siberian Husky Dog | 7 |
30 | French Bulldog | 5 |
31 | Yorkshire Terrier | 1 |
32 | Boxer | 1 |
33 | Beagle | 3 |
34 | Lowchen | 1 |
35 | Curly Bichon frise | 2 |
{'Japanese Akita ': 0.4390193223953247} {'Poodle/Poodle': 0.7055565714836121} {'Golden Retriever': 0.8339270949363708} {'Beagle': 0.4970936179161072} {'German Spitz ': 0.5624755620956421} {'Golden Retriever': 0.6434336304664612} ...... {'Golden Retriever': 0.7351966500282288} {'Labrador': 0.9914411306381226} {'Siberian Husky Dog': 0.5635216236114502}
Ⅱ. Identification results of cattle
There are 93 pictures in the picture collection of cattle, of which 22 are identified, and the most cattle is Xiangxi yellow cattle.
Serial number | type | number |
---|---|---|
1 | Indian bison | 5 |
2 | White Yak | 2 |
3 | Dairy cattle | 6 |
4 | And cattle | 4 |
5 | Wild goat | 1 |
6 | Southern cattle | 2 |
7 | African buffalo | 9 |
8 | Dexter cattle | 1 |
9 | Musk ox | 2 |
10 | Simmental | 1 |
11 | Qinchuan | 2 |
12 | Highland cattle | 3 |
13 | Limousin cattle | 1 |
14 | calf | 3 |
15 | China Holstein | 9 |
16 | Swiss brown cattle | 3 |
17 | buffalo | 8 |
18 | Xiangxi Yellow Cattle | 15 |
19 | Jersey | 1 |
20 | Java bison | 1 |
21 | Yak | 8 |
22 | American bison | 6 |
{'Indian bison': 0.7731859087944031} {'And cattle': 0.34460482001304626} {'China Holstein ': 0.4629508852958679} {'China Holstein ': 0.4254103899002075} {'China Holstein ': 0.395224004983902} . . . . . . {'Limousin cattle': 0.2524842321872711} {'African buffalo': 0.5881295204162598} {'American bison': 0.6179811358451843} {'calf ': 0.2019311934709549} {'Simmental': 0.10599607974290848}
Ⅲ. Cat recognition results
there are 99 pictures of cats, and 37 species are identified. The two most species: domestic cat and tiger spotted cat.
Serial number | type | number |
---|---|---|
1 | Red cat | 2 |
2 | Manchekan cat | 1 |
3 | Norwegian Forest Cat | 3 |
4 | Japanese cat | 1 |
5 | Shorthair | 7 |
6 | American bristle cat | 3 |
7 | Domestic cat | 17 |
8 | Ocelot | 2 |
9 | Persian cat | 1 |
10 | Highland cat | 2 |
11 | Teacup cat | 1 |
12 | Streptopelia roseogrisea | 1 |
13 | American silver short haired cat | 2 |
14 | Silk dog | 1 |
15 | Scotland fold | 2 |
16 | Chinese Li Hua | 2 |
17 | Cow cat | 4 |
18 | USA Shorthair | 2 |
19 | Folding cat | 1 |
20 | Purebred cat | 1 |
21 | Maine cat | 1 |
22 | Cohen house cat | 1 |
23 | Devon rex | 1 |
24 | european burmese | 1 |
25 | Tiger spotted cat | 14 |
26 | Ragdor cat | 1 |
27 | british shorthair | 9 |
28 | Bombay cat | 1 |
29 | Native cat | 2 |
30 | Cream cat | 2 |
31 | Siberian cat | 2 |
32 | Turkish Angora cat | 1 |
33 | snowshoe | 1 |
34 | Chinese garden cat | 2 |
35 | Corat cat | 1 |
36 | Thailand Siam cat | 2 |
37 | Russian knapweed | 1 |
{'Domestic cat': 0.26924195885658264} {'Scotland fold': 0.47249680757522583} {'Cow cat': 0.48933151364326477} {'Tiger spotted cat': 0.6846295595169067} {'Turkish Angora cat': 0.16593654453754425} {'Ocelot': 0.6253762245178223} . . . . . . {'American silver short haired cat': 0.42112547159194946} {'Shorthair': 0.35389307141304016} {'American bristle cat': 0.43220415711402893} {'American bristle cat': 0.4108104407787323} {'Red cat': 0.2033773958683014}
Ⅳ. Horse recognition results
there are 95 pictures of horses, and 10 kinds of horses are identified. Most of them are horses.
Serial number | type | number |
---|---|---|
1 | Ili horses | 1 |
2 | fine horse | 77 |
3 | Apalusama | 1 |
4 | Arabian horse | 2 |
5 | Mongolian horse | 1 |
6 | Wuzhumuqinma | 3 |
7 | Mini Horse | 2 |
8 | Pony | 1 |
9 | Don | 4 |
10 | Ferghana horse | 3 |
{'fine horse': 0.6022858023643494} {'fine horse': 0.950950562953949} {'fine horse': 0.8656469583511353} {'fine horse': 0.6158687472343445} . . . . . . {'fine horse': 0.5660824179649353} {'Mongolian horse': 0.3801785707473755} {'fine horse': 0.5563110113143921} {'fine horse': 0.4901660680770874} {'fine horse': 0.9210300445556641}
Ⅴ. Identification results of pigs
there are 88 pictures of the second elder martial brother, and 14 types are identified. The most are domestic pigs and breeding pigs.
Serial number | type | number |
---|---|---|
1 | Domestic pig | 25 |
2 | Special wild boar | 2 |
3 | Landrace | 1 |
4 | Hampshire pig | 1 |
5 | Pet pig | 9 |
6 | Fragrant pig | 7 |
7 | Heishan pig | 4 |
8 | Congjiang Xiang pig | 4 |
9 | Xi Xi | 2 |
10 | Rongchang pig | 1 |
11 | Breeding pig | 16 |
12 | Binary sow | 5 |
13 | Beijing black pig | 7 |
14 | Small fragrant pig | 4 |
{'Domestic pig': 0.5635786056518555} {'Fragrant pig': 0.5747232437133789} {'Landrace': 0.34550777077674866} {'Breeding pig': 0.32950359582901} {'Small fragrant pig': 0.4352666139602661} . . . . . . {'Domestic pig': 0.4807981252670288} {'Domestic pig': 0.6012528538703918} {'Domestic pig': 0.816167414188385} {'Domestic pig': 0.6905205845832825} {'Small fragrant pig': 0.4659614562988281}
§ 02 wireless charging
yesterday, the students participating in the 17th smart car competition sent me a demonstration video of a wireless charging model on station B:

■ links to relevant literature:
- Racing rules of the 16th National University intelligent vehicle competition
- Supplementary description of the 16th National College Student smart car competition speed group - indoor Vision Group
- Instructions for targets of indoor visual AI Group in the 16th smart car competition
- The 17th smart car competition
- Intelligent Vision Group
- PaddleHub one click animal recognition
- resnet50_vd_animals
- mobilenet_v2_animals
- Open source, the 17th smart car competition, BOT electronic energy-saving car, just play. I can't beat you in the game.
● relevant chart links:
- Figure 1.1 task of intelligent vehicle in image recognition
- Figure 1.1 1 Giant Panda
- Figure 1.1 2 face pictures
- Figure 1.1 3 arctic fox
- Figure 1.2 1 picture of dog
- Figure 1.2 2 pictures of cattle
- Figure 1.2 3 pictures of cats
- Figure 1.2 4 photos of horses
- Figure 1.2 5 photos of pigs
- Figure 1 blogger's electronic car
- Figure 2 the model runs after charging on the track