Face Detection | Firebase Documentation - Google
文章推薦指數: 80 %
With face detection, you can get the information you need to perform tasks like embellishing selfies and portraits, or generating avatars from a user's photo. Products Build Release&Monitor Engage UseCases Pricing Docs Overview Fundamentals Build Release&Monitor Engage Reference Samples Community Learn Events Stories Support Language English BahasaIndonesia Deutsch Español–AméricaLatina Français Italiano Polski Português–Brasil TiếngViệt Türkçe Русский עברית العربيّة فارسی हिंदी বাংলা ภาษาไทย 中文–简体 中文–繁體 日本語 한국어 Gotoconsole Signin FirebaseDocumentation Overview Fundamentals AddFirebase-Appleplatforms(iOS+) AddFirebase-Android AddFirebase-Web AddFirebase-Flutter AddFirebase-C++ AddFirebase-Unity AddFirebase-Serverenvironments ManageFirebaseprojects Supportedplatforms&frameworks UseEmulatorSuite Build EmulatorSuite Authentication RealtimeDatabase Firestore Storage ML Hosting CloudFunctions SecurityRules AppCheck Extensions Release&Monitor Crashlytics PerformanceMonitoring TestLab AppDistribution Engage Analytics RemoteConfig A/BTesting CloudMessaging In-AppMessaging DynamicLinks GoogleAdMob GoogleAds AppIndexing Reference Samples Products More UseCases Pricing Docs More Overview Fundamentals More Build More Release&Monitor More Engage More Reference Samples Community More Support Gotoconsole Overview EmulatorSuite Introduction Connectyourappandprototype GetstartedConnecttotheAuthenticationemulatorConnecttotheRealtimeDatabaseemulatorConnecttotheCloudFirestoreemulatorConnecttotheCloudStorageemulatorConnecttotheCloudFunctionsemulatorUsetheExtensionsemulatorInstall,configureandintegrate Authentication IntroductionWheredoIstart?UsersinFirebaseProjects iOS+ Signinwithapre-builtUIGetStartedManageUsersPasswordAuthenticationEmailLinkAuthenticationGoogleFacebookLoginSigninwithAppleTwitterLoginGitHubMicrosoftYahooGameCenterSign-inPhoneNumberUseaCustomAuthSystemAnonymousAuthenticationEnablingcross-appauthenticationwithsharedKeychainLinkMultipleAuthProvidersPassingStateinEmailActionsHandleErrors Android Signinwithapre-builtUIGetStartedManageUsersPasswordAuthenticationEmailLinkAuthenticationGoogleFacebookLoginSigninwithAppleTwitterGitHubMicrosoftYahooPlayGamesSign-inPhoneNumberUseaCustomAuthSystemAnonymousAuthenticationLinkMultipleAuthProvidersPassingStateinEmailActions Flutter GetStartedManageUsersPasswordAuthenticationEmailLinkAuthenticationFederatedIdentity&SocialPhoneNumberUseaCustomAuthSystemAnonymousAuthenticationLinkMultipleAuthProvidersPassingStateinEmailActionsHandleErrors Web Signinwithapre-builtUIGetStartedManageUsersPasswordAuthenticationEmailLinkAuthenticationGoogleFacebookLoginSigninwithAppleTwitterGitHubMicrosoftYahooPhoneNumberUseaCustomAuthSystemAnonymousAuthenticationLinkMultipleAuthProvidersCustomizeDependenciesOAuthSign-InforCordovaAuthStatePersistencePassingStateinEmailActionsServiceWorkerSessions C++ GetStartedManageUsersPasswordAuthenticationGooglePlayGamesSign-inGitHubFacebookLoginSigninwithAppleTwitterLoginMicrosoftYahooPhoneNumberUseaCustomAuthSystemAnonymousAuthenticationLinkMultipleAuthProviders Unity GetStartedManageUsersPasswordAuthenticationGooglePlayGamesSign-inGitHubAuthenticationFacebookLoginSigninwithAppleTwitterLoginMicrosoftYahooPhoneNumberUseaCustomAuthSystemAnonymousAuthenticationLinkMultipleAuthProviders Admin IntroductionManageUsersImportUsersCreateCustomTokensVerifyIDTokensManageUserSessionsManageSessionCookiesControlAccesswithCustomClaimsGeneratingEmailActionLinksErrorsMigrationGuideCustomizetheEmailActionHandlerExtendwithCloudFunctionsEmailCustomDomainsCaseStudiesUsageLimits RealtimeDatabase IntroductionChooseaDatabase iOS+ GetStartedStructureDataReadandWriteDataWorkwithListsofDataEnableOfflineCapabilities Android GetStartedStructureDataReadandWriteDataWorkwithListsofDataEnableOfflineCapabilities Web GetStartedStructureDataReadandWriteDataWorkwithListsofDataEnableOfflineCapabilities Flutter GetStartedStructureDataReadandWriteDataWorkwithListsofDataEnableOfflineCapabilities Admin GetStartedStructureDataSaveDataRetrieveData REST GetStartedStructureDataSaveDataRetrieveDataAuthenticateRESTRequests C++ GetStartedStructureDataSaveDataRetrieveData Unity GetStartedStructureDataSaveDataRetrieveData Security&Rules UnderstandRulesGetStartedStructureSecurityRulesWriteConditionsforSecurityRulesIndexDataManageRulesviaREST UsageandPerformance UnderstandBillingRealtimeDatabaseLimitsMonitorDatabaseUsageMonitorDatabasePerformanceScalewithMultipleDatabasesProfileYourDatabaseOptimizeDatabasePerformanceAutomatedBackupsExtendwithCloudFunctionsVideoseries:FirebaseforSQLDevelopers CloudFirestore IntroductionGetstarted UnderstandCloudFirestore CompareCloudFirestoreandRealtimeDatabaseDatamodelDatatypesSDKsandclientlibrariesIndextypesDatabaselocationsDatabundles Addandmanagedata StructuredataAdddataTransactionsandbatchedwritesDatacontentionintransactionDeletedataManageCloudFirestorewiththeFirebaseConsoleExportandimportdataMovedatabetweenprojects Readdata GetdataonceListenforrealtimeupdatesPerformsimpleandcompoundqueriesOrderandlimitdataPaginatedatawithquerycursorsAccessdataofflineManageindexes Secureandvalidatedata OverviewGetstartedStructureSecurityRulesWritingconditionsforSecurityRulesFixinsecurerulesTestyourSecurityRulesSecurelyquerydataControlaccessperfield Solutions OverviewFirestoreLiteWebSDKAggregationQueriesDistributedcountersFull-textsearchBuildpresenceSecuredataaccessforusersandgroupsDeletedatawithacallableCloudFunctionScheduledataexportsShardedtimestampsGeoqueriesAutomatingdatabasecreationReduceindexcostswithmapfieldsServebundledFirestorecontentfromaCDN Usage,limits,andpricing UsageandlimitsMonitorusageUnderstandCloudFirestorebillingExampleCloudFirestorecostsUnderstandstoragesizecalculationsBestpracticesforCloudFirestore CloudFirestoreintegrations UsetheCloudFirestoreRESTAPIUseCloudFirestoreandRealtimeDatabaseExtendwithCloudFunctionsThird-partylibraryintegrations APIreference AndroidSwiftObjective-CWebFlutterCloudFunctionsNode.jsJavaPythonGoC#PHPRubyC++UnityRESTRPC Samples iOSAndroidWeb Storage Introduction iOS+ GetStartedCreateaReferenceUploadFilesDownloadFilesUseFileMetadataDeleteFilesListFilesHandleErrors Android GetStartedCreateaReferenceUploadFilesDownloadFilesUseFileMetadataDeleteFilesListFilesHandleErrors Web GetStartedCreateaReferenceUploadFilesDownloadFilesUseFileMetadataDeleteFilesListFilesHandleErrors Flutter GetStartedCreateaReferenceUploadFilesDownloadFilesUseFileMetadataDeleteFilesListFilesHandleErrors Admin GetStarted C++ GetStartedCreateaReferenceUploadFilesDownloadFilesUseFileMetadataDeleteFilesHandleErrors Unity GetStartedCreateaReferenceUploadFilesDownloadFilesUseFileMetadataDeleteFilesHandleErrors Security&Rules UnderstandSecurityGetStartedStructureSecurityRulesWriteConditionsforSecurityRulesMonitoractivityExtendwithCloudFunctionsIntegratewithGoogleCloud MachineLearning IntroductionCodelabs CustomModels Useacustommodel OverviewiOS+AndroidFlutterDeploy&managecustommodels MigratefromthelegacyAPI iOS+Android CloudAutoMLVisionEdge OverviewTrainimagelabelingmodels Labelimageswithyourmodels iOS+AndroidTrainobjectdetectionmodels Detectobjectswithyourmodels iOS+AndroidMigratedatasets UseCloudVisionAPIs Recognizetext OverviewiOS+Android Labelimages OverviewiOS+Android Recognizelandmarks OverviewiOS+Android DeprecatedVisionSDKs Recognizetext iOS+Android Labelimages iOS+Android Recognizelandmarks iOS+Android AdvancedTopics A/Btesttwoversionsofamodel iOS+Android PrepareforProduction ProtectyourCloudcredentials iOS+Android LegacyDocumentation MLKitforFirebase Introduction Vision Recognizetext OverviewiOSAndroid Detectfaces OverviewConceptsiOSAndroid Scanbarcodes OverviewiOSAndroid Labelimages OverviewiOSAndroid Detectandtrackobjects OverviewiOSAndroid Recognizelandmarks OverviewiOSAndroid AutoMLVisionEdge OverviewTrainimagelabelingmodels Labelimageswithyourmodels iOSAndroidMigratedatasets NaturalLanguage Identifythelanguageoftext OverviewiOSAndroid Translatetext OverviewiOSAndroidUsageguidelines Generatesmartreplies OverviewiOSAndroid CustomModels Useacustommodel OverviewiOSAndroidManagehostedcustommodels UseacustomTensorFlowLitebuild iOSAndroid AdvancedTopics A/Btesttwoversionsofamodel iOSAndroid PrepareforProduction Reduceapppackagesize Android ProtectyourCloudcredentials iOSAndroid Hosting IntroductionWhatcanyoudowithFirebaseHosting?GetstartedTest,preview,thendeployDeployviaGitHubpullrequestsShareprojectresourcesacrossmultiplesitesConnectacustomdomainConfigurehostingbehaviorConfigurei18nrewritesAddSDKsusingreservedURLs Servedynamiccontentandhostmicroservices OverviewUseCloudFunctionsforFirebaseUseCloudRunManagecachebehaviorManagelive&previewchannels,releases,andversionsMonitorwebrequestdatawithCloudLoggingUsage,quotas,andpricingDeployusingtheRESTAPI CloudFunctions IntroductionWhatcanIdowithCloudFunctions?Getstarted Callfunctionsdirectly CallfunctionsfromyourappCallfunctionsviaHTTPrequestsEnqueuefunctionswithCloudTasksRunfunctionsonaschedule Triggerbackgroundfunctions CloudFirestoretriggersRealtimeDatabasetriggersRemoteConfigtriggersAuthenticationtriggersAnalyticstriggersCloudStoragetriggersPub/SubtriggersTestLabtriggers Writefunctions ManagedeploymentandruntimeoptionsWritefunctionsinTypeScriptSync,async,andpromisesRetryasynchronousfunctionsConfigureyourenvironmentOrganizefunctionsHandlingdependenciesOptimizingnetworkingTips&tricks Testfunctions RunfunctionslocallyUnittestingfunctionsTestfunctionsinteractively Monitorfunctions WriteandviewlogsReporterrorsViewmonitoredmetrics APIReference FirebaseSDKforCloudFunctionsTestSDKProtocolspecificationforhttps.onCall CloudFunctionsv2publicpreview OverviewGetstarted Writefunctions ConfigureyourenvironmentManagedeploymentandruntimeoptionsEnqueuefunctionswithCloudTasksFirebaseAlertstriggersCustomevent/extensiontriggersHTTPtriggersCallablefunctionsPub/SubtriggersRealtimeDatabasetriggersCloudStoragetriggersMonitorfunctionsOrganizefunctions APIreference firebase-functionsVideoSeries:learnCloudFunctionsCloudFunctionsandFirebaseCloudFunctionslocationsQuotasandlimits SecurityRules IntroductionGetstarted UnderstandSecurityRules SecurityRuleslanguageHowSecurityRulesworkSecurityRulesandFirebaseAuthentication WriteSecurityRules BasicSecurityRulesAvoidinsecurerulesDatavalidation TestSecurityRules SetuptheemulatorBuildunittestsGeneratetestreportsQuicklyvalidateSecurityRulesManageanddeploySecurityRules AppCheck Introduction Defaultproviders iOS+(DeviceCheck)iOS+(AppAttest)Android(PlayIntegrity)Android(SafetyNet)Web(reCAPTCHAv3)Web(reCAPTCHAEnterprise)Flutter Customproviders ImplementacustomproviderUseacustomprovideroniOS+UseacustomproviderinAndroidUseacustomproviderinwebapps AppCheckindebugenvironments UsethedebugprovideriniOS+UsethedebugproviderinAndroidUsethedebugproviderinwebappsUsethedebugproviderwithFlutterEnableCloudFunctions Protectnon-Firebaseresources iOS+AndroidWebFlutterVerifytokensfromacustombackend Extensions Introduction Useanextensioninyourproject OverviewInstallanextensionManageinstalledextensionsPermissionsgrantedtoanextensionManageconfigurationswithmanifests ExtensionsbyFirebase TriggerEmail GetstartedUseHandlebarstemplatesManagedeliverystatusResizeImagesExportCollectionstoBigQueryDeleteUserDataTranslateTextDistributedCounterShortenURLsLimitChildNodesSamples Relatedproducts CloudMessaging RemoteConfig Build Release&Monitor Engage Overview Fundamentals Build Release&Monitor Engage Reference Samples Learn Events Stories AddFirebase-Appleplatforms(iOS+) AddFirebase-Android AddFirebase-Web AddFirebase-Flutter AddFirebase-C++ AddFirebase-Unity AddFirebase-Serverenvironments ManageFirebaseprojects Supportedplatforms&frameworks UseEmulatorSuite EmulatorSuite Authentication RealtimeDatabase Firestore Storage ML Hosting CloudFunctions SecurityRules AppCheck Extensions Crashlytics PerformanceMonitoring TestLab AppDistribution Analytics RemoteConfig A/BTesting CloudMessaging In-AppMessaging DynamicLinks GoogleAdMob GoogleAds AppIndexing Firebase FirebaseDocumentation Build Sendfeedback FaceDetection plat_ios plat_android ThispagedescribesanoldversionoftheFaceDetectionAPI,whichwaspart ofMLKitforFirebase.DevelopmentofthisAPIhasbeenmovedtothe standaloneMLKitSDK,whichyoucanusewithorwithoutFirebase. Learnmore. See FaceDetection forthelatestdocumentation. WithMLKit'sfacedetectionAPI,youcandetectfacesinanimage,identify keyfacialfeatures,andgetthecontoursofdetectedfaces. Withfacedetection,youcangettheinformationyouneedtoperformtaskslike embellishingselfiesandportraits,orgeneratingavatarsfromauser'sphoto. BecauseMLKitcanperformfacedetectioninrealtime,youcanuseitin applicationslikevideochatorgamesthatrespondtotheplayer'sexpressions. iOS Android Ifyou'reaFlutterdeveloper,youmightbeinterestedin FlutterFire, whichincludesapluginforFirebase'sMLVisionAPIs. ThisisabetareleaseofMLKitforFirebase.This APImightbechangedinbackward-incompatiblewaysandisnotsubjecttoany SLAordeprecationpolicy. Keycapabilities Recognizeandlocatefacialfeatures Getthecoordinatesoftheeyes,ears,cheeks,nose,andmouthofevery facedetected. Getthecontoursoffacialfeatures Getthecontoursofdetectedfacesandtheireyes,eyebrows,lips,and nose. Recognizefacialexpressions Determinewhetherapersonissmilingorhastheireyesclosed. Trackfacesacrossvideoframes Getanidentifierforeachindividualperson'sfacethatisdetected. Thisidentifierisconsistentacrossinvocations,soyoucan,forexample, performimagemanipulationonaparticularpersoninavideostream. Processvideoframesinrealtime Facedetectionisperformedonthedevice,andisfastenoughtobeused inreal-timeapplications,suchasvideomanipulation. Exampleresults Example1 Foreachfacedetected: Face1of3 Boundingpolygon (884.880004882812,149.546676635742), (1030.77197265625,149.546676635742), (1030.77197265625,329.660278320312), (884.880004882812,329.660278320312) Anglesofrotation Y:-14.054030418395996,Z:-55.007488250732422 TrackingID 2 Faciallandmarks Lefteye (945.869323730469,211.867126464844) Righteye (971.579467773438,247.257247924805) Bottomofmouth (907.756591796875,259.714477539062) ...etc. Featureprobabilities Smiling 0.88979166746139526 Lefteyeopen 0.98635888937860727 Righteyeopen 0.99258323386311531 Example2(facecontourdetection) Whenyouhavefacecontourdetectionenabled,youalsogetalistofpoints foreachfacialfeaturethatwasdetected.Thesepointsrepresenttheshapeof thefeature.Thefollowingimageillustrateshowthesepointsmaptoaface (clicktheimagetoenlarge): Facialfeaturecontours Nosebridge (505.149811,221.201797),(506.987122,313.285919) Lefteye (404.642029,232.854431),(408.527283,231.366623),(413.565796,229.427856),(421.378296,226.967682),(432.598755,225.434143),(442.953064,226.089508),(453.899811,228.594818),(461.516418,232.650467),(465.069580,235.600845),(462.170410,236.316147),(456.233643,236.891602),(446.363922,237.966888),(435.698914,238.149323),(424.320740,237.235168),(416.037720,236.012115),(409.983459,234.870300) Topofupperlip (421.662048,354.520813),(428.103882,349.694061),(440.847595,348.048737),(456.549988,346.295532),(480.526489,346.089294),(503.375702,349.470459),(525.624634,347.352783),(547.371155,349.091980),(560.082031,351.693268),(570.226685,354.210175),(575.305420,359.257751) (etc.) Sendfeedback Exceptasotherwisenoted,thecontentofthispageislicensedundertheCreativeCommonsAttribution4.0License,andcodesamplesarelicensedundertheApache2.0License.Fordetails,seetheGoogleDevelopersSitePolicies.JavaisaregisteredtrademarkofOracleand/oritsaffiliates. Lastupdated2022-07-14UTC. [{ "type":"thumb-down", "id":"missingTheInformationINeed", "label":"MissingtheinformationIneed" },{ "type":"thumb-down", "id":"tooComplicatedTooManySteps", "label":"Toocomplicated/toomanysteps" },{ "type":"thumb-down", "id":"outOfDate", "label":"Outofdate" },{ "type":"thumb-down", "id":"samplesCodeIssue", "label":"Samples/codeissue" },{ "type":"thumb-down", "id":"otherDown", "label":"Other" }] [{ "type":"thumb-up", "id":"easyToUnderstand", "label":"Easytounderstand" },{ "type":"thumb-up", "id":"solvedMyProblem", "label":"Solvedmyproblem" },{ "type":"thumb-up", "id":"otherUp", "label":"Other" }] Needtotellusmore? Learn Guides Reference Samples Libraries GitHub Stayconnected Blog FirebaseSummit Facebook Twitter YouTube Support Contactsupport StackOverflow Slackcommunity Googlegroup Releasenotes FAQs Android Chrome Firebase GoogleCloudPlatform Allproducts Terms Privacy Language English BahasaIndonesia Deutsch Español–AméricaLatina Français Italiano Polski Português–Brasil TiếngViệt Türkçe Русский עברית العربيّة فارسی हिंदी বাংলা ภาษาไทย 中文–简体 中文–繁體 日本語 한국어
延伸文章資訊
- 1MediaPipe Face Detection - Google
MediaPipe Face Detection is an ultrafast face detection solution that comes with 6 landmarks and ...
- 2[Day3] 人臉偵測(Face Detection) - iT 邦幫忙
這部分我會在[Day7] Face Detection - 使用Amazon Rekognition說明更多細節與實作內容。 Microsoft Azure - 臉部識別API. 看名字就知道,...
- 3Face Detection | Papers With Code
Face detection is the task of detecting faces in a photo or video (and distinguishing them from o...
- 4Face Detection | ML Kit - Google Developers
With face detection, you can get the information you need to perform tasks like embellishing self...
- 5人臉偵測Face Detection 算法 - allenlu2007
一但偵測到人臉再做進一步的處理(feature extraction and face recognition)。好處是可以大幅減少computation resource. image. Fa...