【算法介绍】
基于YOLOv8的200种鸟类智能检测与识别系统是一款基于深度学习的目标检测系统,该系统利用YOLOv8框架,通过11788张图片训练出一个能够进行鸟类智能检测与识别的模型,可以识别200种不同的鸟类。
该系统采用Python与PyQt5开发,拥有简洁的用户界面,支持图片、视频以及摄像头进行实时目标检测,并能够保存检测结果。用户可以通过点击图片、视频或摄像头图标,选择需要检测的内容,系统会自动显示检测结果,包括目标位置、目标总数、置信度以及检测用时等信息。
该系统在生态保护、科学研究、野生动物监测以及生态旅游等领域具有广泛的应用前景。它可以帮助研究者和保护人员准确监测鸟类种群的动态,评估生物多样性,及时发现稀有或濒危鸟种,制定更有效的保护措施。同时,它也可以为科学研究提供大量精确的鸟类观察数据,协助进行行为学、迁徙学和生态学的研究。
此外,在野生动物监测方面,该系统能够减少人为干扰,提高数据收集效率和准确度,有助于森林管理及非法狩猎的预防。在生态旅游业中,鸟类检测与识别技术可以提升游客体验,实现自动化识别和解说服务,让游客更深入地了解自然界的奥妙。
【效果展示】
【测试环境】
windows10
anaconda3+python3.8
torch==1.9.0+cu111
ultralytics==8.2.95
【模型可以检测出类别】
001-Black_footed_Albatross
002-Laysan_Albatross
003-Sooty_Albatross
004-Groove_billed_Ani
005-Crested_Auklet
006-Least_Auklet
007-Parakeet_Auklet
008-Rhinoceros_Auklet
009-Brewer_Blackbird
010-Red_winged_Blackbird
011-Rusty_Blackbird
012-Yellow_headed_Blackbird
013-Bobolink
014-Indigo_Bunting
015-Lazuli_Bunting
016-Painted_Bunting
017-Cardinal
018-Spotted_Catbird
019-Gray_Catbird
020-Yellow_breasted_Chat
021-Eastern_Towhee
022-Chuck_will_Widow
023-Brandt_Cormorant
024-Red_faced_Cormorant
025-Pelagic_Cormorant
026-Bronzed_Cowbird
027-Shiny_Cowbird
028-Brown_Creeper
029-American_Crow
030-Fish_Crow
031-Black_billed_Cuckoo
032-Mangrove_Cuckoo
033-Yellow_billed_Cuckoo
034-Gray_crowned_Rosy_Finch
035-Purple_Finch
036-Northern_Flicker
037-Acadian_Flycatcher
038-Great_Crested_Flycatcher
039-Least_Flycatcher
040-Olive_sided_Flycatcher
041-Scissor_tailed_Flycatcher
042-Vermilion_Flycatcher
043-Yellow_bellied_Flycatcher
044-Frigatebird
045-Northern_Fulmar
046-Gadwall
047-American_Goldfinch
048-European_Goldfinch
049-Boat_tailed_Grackle
050-Eared_Grebe
051-Horned_Grebe
052-Pied_billed_Grebe
053-Western_Grebe
054-Blue_Grosbeak
055-Evening_Grosbeak
056-Pine_Grosbeak
057-Rose_breasted_Grosbeak
058-Pigeon_Guillemot
059-California_Gull
060-Glaucous_winged_Gull
061-Heermann_Gull
062-Herring_Gull
063-Ivory_Gull
064-Ring_billed_Gull
065-Slaty_backed_Gull
066-Western_Gull
067-Anna_Hummingbird
068-Ruby_throated_Hummingbird
069-Rufous_Hummingbird
070-Green_Violetear
071-Long_tailed_Jaeger
072-Pomarine_Jaeger
073-Blue_Jay
074-Florida_Jay
075-Green_Jay
076-Dark_eyed_Junco
077-Tropical_Kingbird
078-Gray_Kingbird
079-Belted_Kingfisher
080-Green_Kingfisher
081-Pied_Kingfisher
082-Ringed_Kingfisher
083-White_breasted_Kingfisher
084-Red_legged_Kittiwake
085-Horned_Lark
086-Pacific_Loon
087-Mallard
088-Western_Meadowlark
089-Hooded_Merganser
090-Red_breasted_Merganser
091-Mockingbird
092-Nighthawk
093-Clark_Nutcracker
094-White_breasted_Nuthatch
095-Baltimore_Oriole
096-Hooded_Oriole
097-Orchard_Oriole
098-Scott_Oriole
099-Ovenbird
100-Brown_Pelican
101-White_Pelican
102-Western_Wood_Pewee
103-Sayornis
104-American_Pipit
105-Whip_poor_Will
106-Horned_Puffin
107-Common_Raven
108-White_necked_Raven
109-American_Redstart
110-Geococcyx
111-Loggerhead_Shrike
112-Great_Grey_Shrike
113-Baird_Sparrow
114-Black_throated_Sparrow
115-Brewer_Sparrow
116-Chipping_Sparrow
117-Clay_colored_Sparrow
118-House_Sparrow
119-Field_Sparrow
120-Fox_Sparrow
121-Grasshopper_Sparrow
122-Harris_Sparrow
123-Henslow_Sparrow
124-Le_Conte_Sparrow
125-Lincoln_Sparrow
126-Nelson_Sharp_tailed_Sparrow
127-Savannah_Sparrow
128-Seaside_Sparrow
129-Song_Sparrow
130-Tree_Sparrow
131-Vesper_Sparrow
132-White_crowned_Sparrow
133-White_throated_Sparrow
134-Cape_Glossy_Starling
135-Bank_Swallow
136-Barn_Swallow
137-Cliff_Swallow
138-Tree_Swallow
139-Scarlet_Tanager
140-Summer_Tanager
141-Artic_Tern
142-Black_Tern
143-Caspian_Tern
144-Common_Tern
145-Elegant_Tern
146-Forsters_Tern
147-Least_Tern
148-Green_tailed_Towhee
149-Brown_Thrasher
150-Sage_Thrasher
151-Black_capped_Vireo
152-Blue_headed_Vireo
153-Philadelphia_Vireo
154-Red_eyed_Vireo
155-Warbling_Vireo
156-White_eyed_Vireo
157-Yellow_throated_Vireo
158-Bay_breasted_Warbler
159-Black_and_white_Warbler
160-Black_throated_Blue_Warbler
161-Blue_winged_Warbler
162-Canada_Warbler
163-Cape_May_Warbler
164-Cerulean_Warbler
165-Chestnut_sided_Warbler
166-Golden_winged_Warbler
167-Hooded_Warbler
168-Kentucky_Warbler
169-Magnolia_Warbler
170-Mourning_Warbler
171-Myrtle_Warbler
172-Nashville_Warbler
173-Orange_crowned_Warbler
174-Palm_Warbler
175-Pine_Warbler
176-Prairie_Warbler
177-Prothonotary_Warbler
178-Swainson_Warbler
179-Tennessee_Warbler
180-Wilson_Warbler
181-Worm_eating_Warbler
182-Yellow_Warbler
183-Northern_Waterthrush
184-Louisiana_Waterthrush
185-Bohemian_Waxwing
186-Cedar_Waxwing
187-American_Three_toed_Woodpecker
188-Pileated_Woodpecker
189-Red_bellied_Woodpecker
190-Red_cockaded_Woodpecker
191-Red_headed_Woodpecker
192-Downy_Woodpecker
193-Bewick_Wren
194-Cactus_Wren
195-Carolina_Wren
196-House_Wren
197-Marsh_Wren
198-Rock_Wren
199-Winter_Wren
200-Common_Yellowthroat
【训练数据集】
https://blog.csdn.net/FL1623863129/article/details/136336080
【训练信息】
参数 | 值 |
训练集图片数 | 6929 |
验证集图片数 | 1980 |
训练map | 82.9% |
训练精度(Precision) | 78.0% |
训练召回率(Recall) | 76.7% |
验证集测试精度信息
类别 | MAP50(单位:%) |
all | 83 |
001-Black_footed_Albatross | 74 |
002-Laysan_Albatross | 82 |
003-Sooty_Albatross | 56 |
004-Groove_billed_Ani | 72 |
005-Crested_Auklet | 67 |
006-Least_Auklet | 78 |
007-Parakeet_Auklet | 100 |
008-Rhinoceros_Auklet | 90 |
009-Brewer_Blackbird | 63 |
010-Red_winged_Blackbird | 100 |
011-Rusty_Blackbird | 30 |
012-Yellow_headed_Blackbird | 100 |
013-Bobolink | 100 |
014-Indigo_Bunting | 96 |
015-Lazuli_Bunting | 93 |
016-Painted_Bunting | 98 |
017-Cardinal | 95 |
018-Spotted_Catbird | 88 |
019-Gray_Catbird | 97 |
020-Yellow_breasted_Chat | 100 |
021-Eastern_Towhee | 100 |
022-Chuck_will_Widow | 85 |
023-Brandt_Cormorant | 57 |
024-Red_faced_Cormorant | 83 |
025-Pelagic_Cormorant | 62 |
026-Bronzed_Cowbird | 95 |
027-Shiny_Cowbird | 25 |
028-Brown_Creeper | 87 |
029-American_Crow | 67 |
030-Fish_Crow | 24 |
031-Black_billed_Cuckoo | 68 |
032-Mangrove_Cuckoo | 63 |
033-Yellow_billed_Cuckoo | 65 |
034-Gray_crowned_Rosy_Finch | 100 |
035-Purple_Finch | 100 |
036-Northern_Flicker | 100 |
037-Acadian_Flycatcher | 50 |
038-Great_Crested_Flycatcher | 72 |
039-Least_Flycatcher | 57 |
040-Olive_sided_Flycatcher | 68 |
041-Scissor_tailed_Flycatcher | 90 |
042-Vermilion_Flycatcher | 98 |
043-Yellow_bellied_Flycatcher | 64 |
044-Frigatebird | 95 |
045-Northern_Fulmar | 85 |
046-Gadwall | 88 |
047-American_Goldfinch | 100 |
048-European_Goldfinch | 100 |
049-Boat_tailed_Grackle | 54 |
050-Eared_Grebe | 83 |
051-Horned_Grebe | 65 |
052-Pied_billed_Grebe | 100 |
053-Western_Grebe | 99 |
054-Blue_Grosbeak | 100 |
055-Evening_Grosbeak | 100 |
056-Pine_Grosbeak | 99 |
057-Rose_breasted_Grosbeak | 100 |
058-Pigeon_Guillemot | 95 |
059-California_Gull | 56 |
060-Glaucous_winged_Gull | 56 |
061-Heermann_Gull | 74 |
062-Herring_Gull | 46 |
063-Ivory_Gull | 100 |
064-Ring_billed_Gull | 70 |
065-Slaty_backed_Gull | 72 |
066-Western_Gull | 56 |
067-Anna_Hummingbird | 73 |
068-Ruby_throated_Hummingbird | 86 |
069-Rufous_Hummingbird | 77 |
070-Green_Violetear | 96 |
071-Long_tailed_Jaeger | 45 |
072-Pomarine_Jaeger | 53 |
073-Blue_Jay | 75 |
074-Florida_Jay | 90 |
075-Green_Jay | 100 |
076-Dark_eyed_Junco | 91 |
077-Tropical_Kingbird | 98 |
078-Gray_Kingbird | 89 |
079-Belted_Kingfisher | 89 |
080-Green_Kingfisher | 91 |
081-Pied_Kingfisher | 99 |
082-Ringed_Kingfisher | 84 |
083-White_breasted_Kingfisher | 100 |
084-Red_legged_Kittiwake | 84 |
085-Horned_Lark | 100 |
086-Pacific_Loon | 82 |
087-Mallard | 100 |
088-Western_Meadowlark | 100 |
089-Hooded_Merganser | 96 |
090-Red_breasted_Merganser | 80 |
091-Mockingbird | 76 |
092-Nighthawk | 91 |
093-Clark_Nutcracker | 100 |
094-White_breasted_Nuthatch | 100 |
095-Baltimore_Oriole | 100 |
096-Hooded_Oriole | 90 |
097-Orchard_Oriole | 96 |
098-Scott_Oriole | 82 |
099-Ovenbird | 97 |
100-Brown_Pelican | 94 |
101-White_Pelican | 100 |
102-Western_Wood_Pewee | 55 |
103-Sayornis | 46 |
104-American_Pipit | 97 |
105-Whip_poor_Will | 73 |
106-Horned_Puffin | 100 |
107-Common_Raven | 64 |
108-White_necked_Raven | 80 |
109-American_Redstart | 96 |
110-Geococcyx | 100 |
111-Loggerhead_Shrike | 69 |
112-Great_Grey_Shrike | 78 |
113-Baird_Sparrow | 67 |
114-Black_throated_Sparrow | 98 |
115-Brewer_Sparrow | 59 |
116-Chipping_Sparrow | 74 |
117-Clay_colored_Sparrow | 83 |
118-House_Sparrow | 53 |
119-Field_Sparrow | 70 |
120-Fox_Sparrow | 94 |
121-Grasshopper_Sparrow | 79 |
122-Harris_Sparrow | 97 |
123-Henslow_Sparrow | 86 |
124-Le_Conte_Sparrow | 79 |
125-Lincoln_Sparrow | 93 |
126-Nelson_Sharp_tailed_Sparrow | 84 |
127-Savannah_Sparrow | 95 |
128-Seaside_Sparrow | 83 |
129-Song_Sparrow | 85 |
130-Tree_Sparrow | 82 |
131-Vesper_Sparrow | 81 |
132-White_crowned_Sparrow | 98 |
133-White_throated_Sparrow | 81 |
134-Cape_Glossy_Starling | 98 |
135-Bank_Swallow | 71 |
136-Barn_Swallow | 78 |
137-Cliff_Swallow | 45 |
138-Tree_Swallow | 83 |
139-Scarlet_Tanager | 100 |
140-Summer_Tanager | 100 |
141-Artic_Tern | 62 |
142-Black_Tern | 84 |
143-Caspian_Tern | 62 |
144-Common_Tern | 38 |
145-Elegant_Tern | 61 |
146-Forsters_Tern | 58 |
147-Least_Tern | 87 |
148-Green_tailed_Towhee | 96 |
149-Brown_Thrasher | 100 |
150-Sage_Thrasher | 86 |
151-Black_capped_Vireo | 91 |
152-Blue_headed_Vireo | 59 |
153-Philadelphia_Vireo | 70 |
154-Red_eyed_Vireo | 76 |
155-Warbling_Vireo | 55 |
156-White_eyed_Vireo | 90 |
157-Yellow_throated_Vireo | 72 |
158-Bay_breasted_Warbler | 100 |
159-Black_and_white_Warbler | 99 |
160-Black_throated_Blue_Warbler | 91 |
161-Blue_winged_Warbler | 92 |
162-Canada_Warbler | 91 |
163-Cape_May_Warbler | 87 |
164-Cerulean_Warbler | 88 |
165-Chestnut_sided_Warbler | 82 |
166-Golden_winged_Warbler | 100 |
167-Hooded_Warbler | 86 |
168-Kentucky_Warbler | 98 |
169-Magnolia_Warbler | 97 |
170-Mourning_Warbler | 91 |
171-Myrtle_Warbler | 100 |
172-Nashville_Warbler | 79 |
173-Orange_crowned_Warbler | 48 |
174-Palm_Warbler | 72 |
175-Pine_Warbler | 80 |
176-Prairie_Warbler | 87 |
177-Prothonotary_Warbler | 100 |
178-Swainson_Warbler | 89 |
179-Tennessee_Warbler | 72 |
180-Wilson_Warbler | 94 |
181-Worm_eating_Warbler | 89 |
182-Yellow_Warbler | 97 |
183-Northern_Waterthrush | 90 |
184-Louisiana_Waterthrush | 73 |
185-Bohemian_Waxwing | 98 |
186-Cedar_Waxwing | 97 |
187-American_Three_toed_Woodpecker | 100 |
188-Pileated_Woodpecker | 100 |
189-Red_bellied_Woodpecker | 91 |
190-Red_cockaded_Woodpecker | 100 |
191-Red_headed_Woodpecker | 100 |
192-Downy_Woodpecker | 100 |
193-Bewick_Wren | 72 |
194-Cactus_Wren | 94 |
195-Carolina_Wren | 93 |
196-House_Wren | 52 |
197-Marsh_Wren | 82 |
198-Rock_Wren | 95 |
199-Winter_Wren | 88 |
200-Common_Yellowthroat | 100 |
【部分实现源码】
class Ui_MainWindow(QtWidgets.QMainWindow):signal = QtCore.pyqtSignal(str, str)def setupUi(self):self.setObjectName("MainWindow")self.resize(1280, 728)self.centralwidget = QtWidgets.QWidget(self)self.centralwidget.setObjectName("centralwidget")self.weights_dir = './weights'self.picture = QtWidgets.QLabel(self.centralwidget)self.picture.setGeometry(QtCore.QRect(260, 10, 1010, 630))self.picture.setStyleSheet("background:black")self.picture.setObjectName("picture")self.picture.setScaledContents(True)self.label_2 = QtWidgets.QLabel(self.centralwidget)self.label_2.setGeometry(QtCore.QRect(10, 10, 81, 21))self.label_2.setObjectName("label_2")self.cb_weights = QtWidgets.QComboBox(self.centralwidget)self.cb_weights.setGeometry(QtCore.QRect(10, 40, 241, 21))self.cb_weights.setObjectName("cb_weights")self.cb_weights.currentIndexChanged.connect(self.cb_weights_changed)self.label_3 = QtWidgets.QLabel(self.centralwidget)self.label_3.setGeometry(QtCore.QRect(10, 70, 72, 21))self.label_3.setObjectName("label_3")self.hs_conf = QtWidgets.QSlider(self.centralwidget)self.hs_conf.setGeometry(QtCore.QRect(10, 100, 181, 22))self.hs_conf.setProperty("value", 25)self.hs_conf.setOrientation(QtCore.Qt.Horizontal)self.hs_conf.setObjectName("hs_conf")self.hs_conf.valueChanged.connect(self.conf_change)self.dsb_conf = QtWidgets.QDoubleSpinBox(self.centralwidget)self.dsb_conf.setGeometry(QtCore.QRect(200, 100, 51, 22))self.dsb_conf.setMaximum(1.0)self.dsb_conf.setSingleStep(0.01)self.dsb_conf.setProperty("value", 0.25)self.dsb_conf.setObjectName("dsb_conf")self.dsb_conf.valueChanged.connect(self.dsb_conf_change)self.dsb_iou = QtWidgets.QDoubleSpinBox(self.centralwidget)self.dsb_iou.setGeometry(QtCore.QRect(200, 160, 51, 22))self.dsb_iou.setMaximum(1.0)self.dsb_iou.setSingleStep(0.01)self.dsb_iou.setProperty("value", 0.45)self.dsb_iou.setObjectName("dsb_iou")self.dsb_iou.valueChanged.connect(self.dsb_iou_change)self.hs_iou = QtWidgets.QSlider(self.centralwidget)self.hs_iou.setGeometry(QtCore.QRect(10, 160, 181, 22))self.hs_iou.setProperty("value", 45)self.hs_iou.setOrientation(QtCore.Qt.Horizontal)self.hs_iou.setObjectName("hs_iou")self.hs_iou.valueChanged.connect(self.iou_change)self.label_4 = QtWidgets.QLabel(self.centralwidget)self.label_4.setGeometry(QtCore.QRect(10, 130, 72, 21))self.label_4.setObjectName("label_4")self.label_5 = QtWidgets.QLabel(self.centralwidget)self.label_5.setGeometry(QtCore.QRect(10, 210, 72, 21))self.label_5.setObjectName("label_5")self.le_res = QtWidgets.QTextEdit(self.centralwidget)self.le_res.setGeometry(QtCore.QRect(10, 240, 241, 400))self.le_res.setObjectName("le_res")self.setCentralWidget(self.centralwidget)self.menubar = QtWidgets.QMenuBar(self)self.menubar.setGeometry(QtCore.QRect(0, 0, 1110, 30))self.menubar.setObjectName("menubar")self.setMenuBar(self.menubar)self.statusbar = QtWidgets.QStatusBar(self)self.statusbar.setObjectName("statusbar")self.setStatusBar(self.statusbar)self.toolBar = QtWidgets.QToolBar(self)self.toolBar.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)self.toolBar.setObjectName("toolBar")self.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)self.actionopenpic = QtWidgets.QAction(self)icon = QtGui.QIcon()icon.addPixmap(QtGui.QPixmap(":/images/1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)self.actionopenpic.setIcon(icon)self.actionopenpic.setObjectName("actionopenpic")self.actionopenpic.triggered.connect(self.open_image)self.action = QtWidgets.QAction(self)icon1 = QtGui.QIcon()icon1.addPixmap(QtGui.QPixmap(":/images/2.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)self.action.setIcon(icon1)self.action.setObjectName("action")self.action.triggered.connect(self.open_video)self.action_2 = QtWidgets.QAction(self)icon2 = QtGui.QIcon()icon2.addPixmap(QtGui.QPixmap(":/images/3.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)self.action_2.setIcon(icon2)self.action_2.setObjectName("action_2")self.action_2.triggered.connect(self.open_camera)self.actionexit = QtWidgets.QAction(self)icon3 = QtGui.QIcon()icon3.addPixmap(QtGui.QPixmap(":/images/4.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)self.actionexit.setIcon(icon3)self.actionexit.setObjectName("actionexit")self.actionexit.triggered.connect(self.exit)self.toolBar.addAction(self.actionopenpic)self.toolBar.addAction(self.action)self.toolBar.addAction(self.action_2)self.toolBar.addAction(self.actionexit)self.retranslateUi()QtCore.QMetaObject.connectSlotsByName(self)self.init_all()
【使用步骤】
使用步骤:
(1)首先根据官方框架https://github.com/ultralytics/ultralytics安装教程安装好yolov8环境,并安装好pyqt5
(2)切换到自己安装的yolov8环境后,并切换到源码目录,执行python main.py即可运行启动界面,进行相应的操作即可
【提供文件】
python源码
yolov8n.onnx模型(不提供pytorch模型)
训练的map,P,R曲线图(在weights\results.png)
测试图片(在test_img文件夹下面)
【源码下载地址】
https://download.csdn.net/download/FL1623863129/89831493