日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程语言 > python >内容正文

python

Py之dlib:Python库之dlib库的简介、安装、使用方法详细攻略

發(fā)布時間:2025/3/21 python 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Py之dlib:Python库之dlib库的简介、安装、使用方法详细攻略 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

Py之dlib:Python庫之dlib庫的簡介、安裝、使用方法詳細(xì)攻略

目錄

dlib庫的簡介

dlib庫的安裝

dlib庫的使用函數(shù)

0、利用dlib.get_frontal_face_detector函數(shù)實現(xiàn)人臉檢測可視化

1、hog提取特征的函數(shù)

2、CNN提取特征的函數(shù)


dlib庫的簡介

? ? 一個機器學(xué)習(xí)的開源庫,包含了機器學(xué)習(xí)的很多算法,使用起來很方便,直接包含頭文件即可,并且不依賴于其他庫(自帶圖像編解碼庫源碼)。Dlib可以幫助您創(chuàng)建很多復(fù)雜的機器學(xué)習(xí)方面的軟件來幫助解決實際問題。目前Dlib已經(jīng)被廣泛的用在行業(yè)和學(xué)術(shù)領(lǐng)域,包括機器人,嵌入式設(shè)備,移動電話和大型高性能計算環(huán)境。

Dlib是一個使用現(xiàn)代C++技術(shù)編寫的跨平臺的通用庫,遵守Boost Software licence. 主要特點如下:?

  • 完善的文檔:每個類每個函數(shù)都有詳細(xì)的文檔,并且提供了大量的示例代碼,如果你發(fā)現(xiàn)文檔描述不清晰或者沒有文檔,告訴作者,作者會立刻添加。?
  • 可移植代碼:代碼符合ISO C++標(biāo)準(zhǔn),不需要第三方庫支持,支持win32、Linux、Mac OS X、Solaris、HPUX、BSDs 和 POSIX 系統(tǒng)?
  • 線程支持:提供簡單的可移植的線程API?
  • 網(wǎng)絡(luò)支持:提供簡單的可移植的Socket API和一個簡單的Http服務(wù)器?
  • 圖形用戶界面:提供線程安全的GUI API?
  • 數(shù)值算法:矩陣、大整數(shù)、隨機數(shù)運算等?
  • 機器學(xué)習(xí)算法:
  • 圖形模型算法:?
  • 圖像處理:支持讀寫Windows BMP文件,不同類型色彩轉(zhuǎn)換?
  • 數(shù)據(jù)壓縮和完整性算法:CRC32、Md5、不同形式的PPM算法?
  • 測試:線程安全的日志類和模塊化的單元測試框架以及各種測試assert支持
  • 一般工具:XML解析、內(nèi)存管理、類型安全的big/little endian轉(zhuǎn)換、序列化支持和容器類
    ?


dlib pypi
dlib庫
dlib c++ library

dlib庫的安裝

dlib壓縮包集合:Index of /files

本博客提供三種方法進(jìn)行安裝

T1方法:pip install dlib

此方法是需要在你安裝cmake、Boost環(huán)境的計算機使用

T2方法:conda install -c menpo dlib=18.18

此方法適合那些已經(jīng)安裝好conda庫的環(huán)境的計算機使用,conda庫的安裝本博客有詳細(xì)攻略,請自行翻看。

T3方法:pip install dlib-19.8.1-cp36-cp36m-win_amd64.whl

dlib庫的whl文件——dlib-19.7.0-cp36-cp36m-win_amd64.rar

dlib-19.3.1-cp35-cp35m-win_amd64.whl

哈哈,大功告成!如有資料或問題需求,請留言!

dlib庫的使用函數(shù)

0、利用dlib.get_frontal_face_detector函數(shù)實現(xiàn)人臉檢測可視化

CV之dlib:利用dlib.get_frontal_face_detector函數(shù)實現(xiàn)人臉檢測

1、hog提取特征的函數(shù)

dlib.get_frontal_face_detector() ? ?#人臉特征提取器,該函數(shù)是在C++里面定義的

help(dlib.get_frontal_face_detector()) Help on fhog_object_detector in module dlib.dlib object:class fhog_object_detector(Boost.Python.instance)| This object represents a sliding window histogram-of-oriented-gradients based object detector.|| Method resolution order:| fhog_object_detector| Boost.Python.instance| builtins.object|| Methods defined here:|| __call__(...)| __call__( (fhog_object_detector)arg1, (object)image [, (int)upsample_num_times=0]) -> rectangles :| requires| - image is a numpy ndarray containing either an 8bit grayscale or RGB| image.| - upsample_num_times >= 0| ensures| - This function runs the object detector on the input image and returns| a list of detections.| - Upsamples the image upsample_num_times before running the basic| detector.|| __getstate__(...)| __getstate__( (fhog_object_detector)arg1) -> tuple|| __init__(...)| __init__( (object)arg1) -> None|| __init__( (object)arg1, (str)arg2) -> object :| Loads an object detector from a file that contains the output of the| train_simple_object_detector() routine or a serialized C++ object of type| object_detector<scan_fhog_pyramid<pyramid_down<6>>>.|| __reduce__ = <unnamed Boost.Python function>(...)|| __setstate__(...)| __setstate__( (fhog_object_detector)arg1, (tuple)arg2) -> None|| run(...)| run( (fhog_object_detector)arg1, (object)image [, (int)upsample_num_times=0 [, (float)adjust_threshold=0.0]]) -> tuple :| requires| - image is a numpy ndarray containing either an 8bit grayscale or RGB| image.| - upsample_num_times >= 0| ensures| - This function runs the object detector on the input image and returns| a tuple of (list of detections, list of scores, list of weight_indices).| - Upsamples the image upsample_num_times before running the basic| detector.|| save(...)| save( (fhog_object_detector)arg1, (str)detector_output_filename) -> None :| Save a simple_object_detector to the provided path.|| ----------------------------------------------------------------------| Static methods defined here:|| run_multiple(...)| run_multiple( (list)detectors, (object)image [, (int)upsample_num_times=0 [, (float)adjust_threshold=0.0]]) -> tuple :| requires| - detectors is a list of detectors.| - image is a numpy ndarray containing either an 8bit grayscale or RGB| image.| - upsample_num_times >= 0| ensures| - This function runs the list of object detectors at once on the input image and returns| a tuple of (list of detections, list of scores, list of weight_indices).| - Upsamples the image upsample_num_times before running the basic| detector.|| ----------------------------------------------------------------------| Data and other attributes defined here:|| __instance_size__ = 160|| __safe_for_unpickling__ = True|| ----------------------------------------------------------------------| Methods inherited from Boost.Python.instance:|| __new__(*args, **kwargs) from Boost.Python.class| Create and return a new object. See help(type) for accurate signature.|| ----------------------------------------------------------------------| Data descriptors inherited from Boost.Python.instance:|| __dict__|| __weakref__

2、CNN提取特征的函數(shù)

cnn_face_detector = dlib.cnn_face_detection_model_v1(cnn_face_detection_model)

help(dlib.cnn_face_detection_model_v1) Help on class cnn_face_detection_model_v1 in module dlib.dlib:class cnn_face_detection_model_v1(Boost.Python.instance)| This object detects human faces in an image. The constructor loads the face detection model from a file. You can download a pre-trained model from http://dlib.net/files/mmod_human_face_detector.dat.bz2.|| Method resolution order:| cnn_face_detection_model_v1| Boost.Python.instance| builtins.object|| Methods defined here:|| __call__(...)| __call__( (cnn_face_detection_model_v1)arg1, (object)img [, (int)upsample_num_times=0]) -> mmod_rectangles :| Find faces in an image using a deep learning model.| - Upsamples the image upsample_num_times before running the face| detector.|| __call__( (cnn_face_detection_model_v1)arg1, (list)imgs [, (int)upsample_num_times=0 [, (int)batch_size=128]]) -> mmod_rectangless :| takes a list of images as input returning a 2d list of mmod rectangles|| __init__(...)| __init__( (object)arg1, (str)arg2) -> None|| __reduce__ = <unnamed Boost.Python function>(...)|| ----------------------------------------------------------------------| Data and other attributes defined here:|| __instance_size__ = 984|| ----------------------------------------------------------------------| Methods inherited from Boost.Python.instance:|| __new__(*args, **kwargs) from Boost.Python.class| Create and return a new object. See help(type) for accurate signature.|| ----------------------------------------------------------------------| Data descriptors inherited from Boost.Python.instance:|| __dict__|| __weakref__

inline frontal_face_detector get_frontal_face_detector()
?


?

總結(jié)

以上是生活随笔為你收集整理的Py之dlib:Python库之dlib库的简介、安装、使用方法详细攻略的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 国产精品久久久久久99 | 激情www | 日本精品在线观看 | 午夜理伦三级理论 | 潘金莲一级淫片aaaaaa播放 | 麻豆精品 | 操操日 | 中文字幕 欧美日韩 | 亚洲免费专区 | 日本在线小视频 | 凹凸视频一区二区 | 玖玖在线免费视频 | 日本一区二区免费视频 | 色屁屁影院www国产高清麻豆 | 成人亚洲 | av一区免费 | 久久中文字幕人妻 | av基地网 | 夜间福利在线观看 | 国产精品swag| 久久精品免费观看 | 欧美精品久久久久久久自慰 | 雪花飘电影在线观看免费高清 | 国产欧美一区二区三区鸳鸯浴 | 一区二区视频免费在线观看 | 国产高清在线观看 | 人人干在线视频 | 亚洲AV不卡无码一区二区三区 | 成人国产精品免费观看视频 | 日本精品在线播放 | 精品国产乱码久久久久久闺蜜 | 99视频在线看 | 在线视频天堂 | 爱爱视频网站免费 | 51吃瓜网今日 | 不卡精品 | 日韩欧洲亚洲 | 国产精品日日夜夜 | 神马福利视频 | 91蝌蚪少妇偷拍 | 国产精品系列在线观看 | 欧美日韩在线一区二区三区 | 国产男男一区二区三区 | 久久久久人妻精品色欧美 | 张柏芝亚洲一区二区三区 | 国产精品久久久久av | 不用播放器的av网站 | 日本黄色免费在线观看 | 玖玖爱这里只有精品 | 亚洲一区二区自拍 | 国产乱码精品一区二区三 | 欧美无吗 | 91视频在线观看网站 | 欧美日韩国产在线观看 | 欧美xxxxx少妇| 久久久亚洲av波多野结衣 | 91精品国产91久久久久久 | 三男一女吃奶添下面 | 国产九九九精品 | 国产精品黄色 | 小视频黄色 | 永久久久久久 | www.四虎在线| 羞羞软件| 91免费福利视频 | 精品人妻码一区二区三区红楼视频 | jzzijzzij亚洲成熟少妇在线观看 久久久精品人妻一区二区三区 | 久久久久香蕉 | 神马久久久久久久久久久 | www.黄色国产 | 麻豆精品| 国产在线视视频有精品 | 国产精品丝袜黑色高跟鞋 | 免费三片在线播放 | 黑人巨大精品欧美一区二区蜜桃 | 日韩精品电影一区二区三区 | 第一次破处视频 | 国产成人精品久久 | 黑帮大佬和我的三百六十五天 | 国产欧美一区二区三区在线老狼 | 波多野结衣 久久 | 久久精品免费一区二区 | 一区二区三区爱爱 | 日韩有码第一页 | 日本丰满少妇一区二区三区 | 欧美丰满少妇人妻精品 | 大肉大捧一进一出好爽mba | 99干99| 天天插伊人| 蜜色影院| 精品乱子伦 | 日韩三级免费看 | 亚洲激情短视频 | 午夜第一页 | 日韩国产欧美在线观看 | xxxx久久 | 无码国产69精品久久久久同性 | 自拍偷拍导航 | 美女洗澡隐私免费网站 |