PageSourceSearch

https://py-feat.org/pages/faqs/

html py-feat.org collected 2026-09-26 01:35:38 UTC 50,055 bytes, 2,267 lines download raw bytes

1
2<!doctype html>
3<html lang="en" class="no-js">
4  <head>
5    
6      <meta charset="utf-8">
7      <meta name="viewport" content="width=device-width,initial-scale=1">
8      
9        <meta name="description" content="Python Facial Expression Analysis Toolbox — detect and analyze facial action units, emotions, landmarks, identity, and head pose from images and videos.
10">
11      
12      
13      
14        <link rel="canonical" href="https://py-feat.org/pages/faqs/">
15      
16      
17        <link rel="prev" href="../au_reference/">
18      
19      
20        <link rel="next" href="../../basic_tutorials/Detecting_Images/">
21      
22      
23        
24      
25      
26      <link rel="icon" href="../../images/logo/favicon.ico">
27      <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.7.7">
28    
29    
30      
31        <title>Faqs - Py-Feat</title>
32      
33    
34    
35      <link rel="stylesheet" href="../../assets/stylesheets/main.ec1eaa64.min.css">
36      
37        
38        <link rel="stylesheet" href="../../assets/stylesheets/palette.ab4e12ef.min.css">
39      
40      
41
42
43    
44    
45      
46    
47    
48      
49        
50        
51        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
52        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
53        <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
54      
55    
56    
57      <link rel="stylesheet" href="../../assets/_mkdocstrings.css">
58    
59      <link rel="stylesheet" href="../../stylesheets/extra.css?v=0.1.26">
60    
61      <link rel="stylesheet" href="../../stylesheets/logo_sidebar.css?v=0.1.26">
62    
63    
63<script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
63
64    
65      
66
67    
68    
69  </head>
70  
71  
72    
73    
74      
75    
76    
77    
78    
79    <body dir="ltr" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo">
80  
81    
82    <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
83    <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
84    <label class="md-overlay" for="__drawer"></label>
85    <div data-md-component="skip">
86      
87        
88        <a href="#faqs-tips-known-issues" class="md-skip">
89          Skip to content
90        </a>
91      
92    </div>
93    <div data-md-component="announce">
94      
95    </div>
96    
97    
98      
99
100  
101
102<header class="md-header md-header--shadow" data-md-component="header">
103  <nav class="md-header__inner md-grid" aria-label="Header">
104    <a href="../.." title="Py-Feat" class="md-header__button md-logo" aria-label="Py-Feat" data-md-component="logo">
105      
106  <img src="../../images/logo/pyfeat_logo_green.svg" alt="logo">
107
108    </a>
109    <label class="md-header__button md-icon" for="__drawer">
110      
111      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
112    </label>
113    <div class="md-header__title" data-md-component="header-title">
114      <div class="md-header__ellipsis">
115        <div class="md-header__topic">
116          <span class="md-ellipsis">
117            Py-Feat
118          </span>
119        </div>
120        <div class="md-header__topic" data-md-component="header-topic">
121          <span class="md-ellipsis">
122            
123              Faqs
124            
125          </span>
126        </div>
127      </div>
128    </div>
129    
130      
131        <form class="md-header__option" data-md-component="palette">
132  
133    
134    
135    
136    <input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo"  aria-label="Switch to dark mode"  type="radio" name="__palette" id="__palette_0">
137    
138      <label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_1" hidden>
139        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3m0-7 2.39 3.42C13.65 5.15 12.84 5 12 5s-1.65.15-2.39.42zM3.34 7l4.16-.35A7.2 7.2 0 0 0 5.94 8.5c-.44.74-.69 1.5-.83 2.29zm.02 10 1.76-3.77a7.131 7.131 0 0 0 2.38 4.14zM20.65 7l-1.77 3.79a7.02 7.02 0 0 0-2.38-4.15zm-.01 10-4.14.36c.59-.51 1.12-1.14 1.54-1.86.42-.73.69-1.5.83-2.29zM12 22l-2.41-3.44c.74.27 1.55.44 2.41.44.82 0 1.63-.17 2.37-.44z"/></svg>
140      </label>
141    
142  
143    
144    
145    
146    <input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="indigo" data-md-color-accent="indigo"  aria-label="Switch to light mode"  type="radio" name="__palette" id="__palette_1">
147    
148      <label class="md-header__button md-icon" title="Switch to light mode" for="__palette_0" hidden>
149        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m17.75 4.09-2.53 1.94.91 3.06-2.63-1.81-2.63 1.81.91-3.06-2.53-1.94L12.44 4l1.06-3 1.06 3zm3.5 6.91-1.64 1.25.59 1.98-1.7-1.17-1.7 1.17.59-1.98L15.75 11l2.06-.05L18.5 9l.69 1.95zm-2.28 4.95c.83-.08 1.72 1.1 1.19 1.85-.32.45-.66.87-1.08 1.27C15.17 23 8.84 23 4.94 19.07c-3.91-3.9-3.91-10.24 0-14.14.4-.4.82-.76 1.27-1.08.75-.53 1.93.36 1.85 1.19-.27 2.86.69 5.83 2.89 8.02a9.96 9.96 0 0 0 8.02 2.89m-1.64 2.02a12.08 12.08 0 0 1-7.8-3.47c-2.17-2.19-3.33-5-3.49-7.82-2.81 3.14-2.7 7.96.31 10.98 3.02 3.01 7.84 3.12 10.98.31"/></svg>
150      </label>
151    
152  
153</form>
154      
155    
156    
157      
157<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
157
158    
159    
160    
161      
162      
163        <label class="md-header__button md-icon" for="__search">
164          
165          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
166        </label>
167        <div class="md-search" data-md-component="search" role="dialog">
168  <label class="md-search__overlay" for="__search"></label>
169  <div class="md-search__inner" role="search">
170    <form class="md-search__form" name="search">
171      <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
172      <label class="md-search__icon md-icon" for="__search">
173        
174        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
175        
176        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
177      </label>
178      <nav class="md-search__options" aria-label="Search">
179        
180          <a href="javascript:void(0)" class="md-search__icon md-icon" title="Share" aria-label="Share" data-clipboard data-clipboard-text="" data-md-component="search-share" tabindex="-1">
181            
182            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9a3 3 0 0 0-3 3 3 3 0 0 0 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.15c-.05.21-.08.43-.08.66 0 1.61 1.31 2.91 2.92 2.91s2.92-1.3 2.92-2.91A2.92 2.92 0 0 0 18 16.08"/></svg>
183          </a>
184        
185        <button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
186          
187          <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
188        </button>
189      </nav>
190      
191        <div class="md-search__suggest" data-md-component="search-suggest"></div>
192      
193    </form>
194    <div class="md-search__output">
195      <div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
196        <div class="md-search-result" data-md-component="search-result">
197          <div class="md-search-result__meta">
198            Initializing search
199          </div>
200          <ol class="md-search-result__list" role="presentation"></ol>
201        </div>
202      </div>
203    </div>
204  </div>
205</div>
206      
207    
208    
209      <div class="md-header__source">
210        <a href="https://github.com/cosanlab/py-feat" title="Go to repository" class="md-source" data-md-component="source">
211  <div class="md-source__icon md-icon">
212    
213    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M439.6 236.1 244 40.5c-5.4-5.5-12.8-8.5-20.4-8.5s-15 3-20.4 8.4L162.5 81l51.5 51.5c27.1-9.1 52.7 16.8 43.4 43.7l49.7 49.7c34.2-11.8 61.2 31 35.5 56.7-26.5 26.5-70.2-2.9-56-37.3L240.3 199v121.9c25.3 12.5 22.3 41.8 9.1 55-6.4 6.4-15.2 10.1-24.3 10.1s-17.8-3.6-24.3-10.1c-17.6-17.6-11.1-46.9 11.2-56v-123c-20.8-8.5-24.6-30.7-18.6-45L142.6 101 8.5 235.1C3 240.6 0 247.9 0 255.5s3 15 8.5 20.4l195.6 195.7c5.4 5.4 12.7 8.4 20.4 8.4s15-3 20.4-8.4l194.7-194.7c5.4-5.4 8.4-12.8 8.4-20.4s-3-15-8.4-20.4"/></svg>
214  </div>
215  <div class="md-source__repository">
216    GitHub
217  </div>
218</a>
219      </div>
220    
221  </nav>
222  
223</header>
224    
225    <div class="md-container" data-md-component="container">
226      
227      
228        
229          
230        
231      
232      <main class="md-main" data-md-component="main">
233        <div class="md-main__inner md-grid">
234          
235            
236              
237              <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
238                <div class="md-sidebar__scrollwrap">
239                  <div class="md-sidebar__inner">
240                    
241
242
243
244<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
245  <label class="md-nav__title" for="__drawer">
246    <a href="../.." title="Py-Feat" class="md-nav__button md-logo" aria-label="Py-Feat" data-md-component="logo">
247      
248  <img src="../../images/logo/pyfeat_logo_green.svg" alt="logo">
249
250    </a>
251    Py-Feat
252  </label>
253  
254    <div class="md-nav__source">
255      <a href="https://github.com/cosanlab/py-feat" title="Go to repository" class="md-source" data-md-component="source">
256  <div class="md-source__icon md-icon">
257    
258    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M439.6 236.1 244 40.5c-5.4-5.5-12.8-8.5-20.4-8.5s-15 3-20.4 8.4L162.5 81l51.5 51.5c27.1-9.1 52.7 16.8 43.4 43.7l49.7 49.7c34.2-11.8 61.2 31 35.5 56.7-26.5 26.5-70.2-2.9-56-37.3L240.3 199v121.9c25.3 12.5 22.3 41.8 9.1 55-6.4 6.4-15.2 10.1-24.3 10.1s-17.8-3.6-24.3-10.1c-17.6-17.6-11.1-46.9 11.2-56v-123c-20.8-8.5-24.6-30.7-18.6-45L142.6 101 8.5 235.1C3 240.6 0 247.9 0 255.5s3 15 8.5 20.4l195.6 195.7c5.4 5.4 12.7 8.4 20.4 8.4s15-3 20.4-8.4l194.7-194.7c5.4-5.4 8.4-12.8 8.4-20.4s-3-15-8.4-20.4"/></svg>
259  </div>
260  <div class="md-source__repository">
261    GitHub
262  </div>
263</a>
264    </div>
265  
266  <ul class="md-nav__list" data-md-scrollfix>
267    
268      
269      
270  
271  
272  
273  
274    <li class="md-nav__item">
275      <a href="../.." class="md-nav__link">
276        
277  
278  
279  <span class="md-ellipsis">
280    
281  
282    Home
283  
284
285    
286  </span>
287  
288  
289
290      </a>
291    </li>
292  
293
294    
295      
296      
297  
298  
299    
300  
301  
302  
303    
304    
305      
306        
307      
308        
309      
310        
311      
312        
313      
314    
315    
316    
317      
318        
319        
320      
321    
322    
323    <li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
324      
325        
326        
327        <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" checked>
328        
329          
330          <label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="">
331            
332  
333  
334  <span class="md-ellipsis">
335    
336  
337    Getting Started
338  
339
340    
341  </span>
342  
343  
344
345            <span class="md-nav__icon md-icon"></span>
346          </label>
347        
348        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="true">
349          <label class="md-nav__title" for="__nav_2">
350            <span class="md-nav__icon md-icon"></span>
351            
352  
353    Getting Started
354  
355
356          </label>
357          <ul class="md-nav__list" data-md-scrollfix>
358            
359              
360                
361  
362  
363  
364  
365    <li class="md-nav__item">
366      <a href="../installation/" class="md-nav__link">
367        
368  
369  
370  <span class="md-ellipsis">
371    
372  
373    Installation
374  
375
376    
377  </span>
378  
379  
380
381      </a>
382    </li>
383  
384
385              
386            
387              
388                
389  
390  
391  
392  
393    <li class="md-nav__item">
394      <a href="../models/" class="md-nav__link">
395        
396  
397  
398  <span class="md-ellipsis">
399    
400  
401    Models
402  
403
404    
405  </span>
406  
407  
408
409      </a>
410    </li>
411  
412
413              
414            
415              
416                
417  
418  
419  
420  
421    <li class="md-nav__item">
422      <a href="../au_reference/" class="md-nav__link">
423        
424  
425  
426  <span class="md-ellipsis">
427    
428  
429    AU Reference
430  
431
432    
433  </span>
434  
435  
436
437      </a>
438    </li>
439  
440
441              
442            
443              
444                
445  
446  
447    
448  
449  
450  
451    <li class="md-nav__item md-nav__item--active">
452      
453      <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
454      
455      
456        
457      
458      
459        <label class="md-nav__link md-nav__link--active" for="__toc">
460          
461  
462  
463  <span class="md-ellipsis">
464    
465  
466    Faqs
467  
468
469    
470  </span>
471  
472  
473
474          <span class="md-nav__icon md-icon"></span>
475        </label>
476      
477      <a href="./" class="md-nav__link md-nav__link--active">
478        
479  
480  
481  <span class="md-ellipsis">
482    
483  
484    Faqs
485  
486
487    
488  </span>
489  
490  
491
492      </a>
493      
494        
495
496<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
497  
498  
499  
500    
501  
502  
503    <label class="md-nav__title" for="__toc">
504      <span class="md-nav__icon md-icon"></span>
505      Table of contents
506    </label>
507    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
508      
509        <li class="md-nav__item">
510  <a href="#common-questions" class="md-nav__link">
511    <span class="md-ellipsis">
512      
513        Common questions
514      
515    </span>
516  </a>
517  
518    <nav class="md-nav" aria-label="Common questions">
519      <ul class="md-nav__list">
520        
521          <li class="md-nav__item">
522  <a href="#py-feat-is-detecting-multiple-faces-in-an-image-with-a-single-face" class="md-nav__link">
523    <span class="md-ellipsis">
524      
525        Py-feat is detecting multiple faces in an image with a single face
526      
527    </span>
528  </a>
529  
530</li>
531        
532          <li class="md-nav__item">
533  <a href="#in-what-order-are-detected-faces-returned" class="md-nav__link">
534    <span class="md-ellipsis">
535      
536        In what order are detected faces returned?
537      
538    </span>
539  </a>
540  
541</li>
542        
543          <li class="md-nav__item">
544  <a href="#py-feat-is-treating-the-same-person-as-multiple-identities-or-treating-different-people-as-the-same-identity" class="md-nav__link">
545    <span class="md-ellipsis">
546      
547        Py-feat is treating the same person as multiple identities or treating different people as the same identity
548      
549    </span>
550  </a>
551  
552</li>
553        
554          <li class="md-nav__item">
555  <a href="#how-can-i-speed-things-up-and-control-memory-usage" class="md-nav__link">
556    <span class="md-ellipsis">
557      
558        How can I speed things up and control memory usage?
559      
560    </span>
561  </a>
562  
563</li>
564        
565          <li class="md-nav__item">
566  <a href="#how-fast-is-video-processing" class="md-nav__link">
567    <span class="md-ellipsis">
568      
569        How fast is video processing?
570      
571    </span>
572  </a>
573  
574</li>
575        
576      </ul>
577    </nav>
578  
579</li>
580      
581        <li class="md-nav__item">
582  <a href="#known-issues" class="md-nav__link">
583    <span class="md-ellipsis">
584      
585        Known issues
586      
587    </span>
588  </a>
589  
590</li>
591      
592        <li class="md-nav__item">
593  <a href="#community-getting-help" class="md-nav__link">
594    <span class="md-ellipsis">
595      
596        Community &amp; getting help
597      
598    </span>
599  </a>
600  
601</li>
602      
603    </ul>
604  
605</nav>
606      
607    </li>
608  
609
610              
611            
612          </ul>
613        </nav>
614      
615    </li>
616  
617
618    
619      
620      
621  
622  
623  
624  
625    
626    
627      
628        
629      
630        
631      
632        
633      
634        
635      
636        
637      
638    
639    
640    
641      
642        
643        
644      
645    
646    
647    <li class="md-nav__item md-nav__item--section md-nav__item--nested">
648      
649        
650        
651          
652        
653        <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_3" >
654        
655          
656          <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
657            
658  
659  
660  <span class="md-ellipsis">
661    
662  
663    Tutorials
664  
665
666    
667  </span>
668  
669  
670
671            <span class="md-nav__icon md-icon"></span>
672          </label>
673        
674        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
675          <label class="md-nav__title" for="__nav_3">
676            <span class="md-nav__icon md-icon"></span>
677            
678  
679    Tutorials
680  
681
682          </label>
683          <ul class="md-nav__list" data-md-scrollfix>
684            
685              
686                
687  
688  
689  
690  
691    <li class="md-nav__item">
692      <a href="../../basic_tutorials/Detecting_Images/" class="md-nav__link">
693        
694  
695  
696  <span class="md-ellipsis">
697    
698  
699    Detecting Images
700  
701
702    
703  </span>
704  
705  
706
707      </a>
708    </li>
709  
710
711              
712            
713              
714                
715  
716  
717  
718  
719    <li class="md-nav__item">
720      <a href="../../basic_tutorials/Detecting_Videos/" class="md-nav__link">
721        
722  
723  
724  <span class="md-ellipsis">
725    
726  
727    Detecting Videos
728  
729
730    
731  </span>
732  
733  
734
735      </a>
736    </li>
737  
738
739              
740            
741              
742                
743  
744  
745  
746  
747    <li class="md-nav__item">
748      <a href="../../basic_tutorials/Plotting/" class="md-nav__link">
749        
750  
751  
752  <span class="md-ellipsis">
753    
754  
755    Plotting
756  
757
758    
759  </span>
760  
761  
762
763      </a>
764    </li>
765  
766
767              
768            
769              
770                
771  
772  
773  
774  
775    <li class="md-nav__item">
776      <a href="../../basic_tutorials/Analysis/" class="md-nav__link">
777        
778  
779  
780  <span class="md-ellipsis">
781    
782  
783    Analysis
784  
785
786    
787  </span>
788  
789  
790
791      </a>
792    </li>
793  
794
795              
796            
797              
798                
799  
800  
801  
802  
803    <li class="md-nav__item">
804      <a href="../../basic_tutorials/Performance/" class="md-nav__link">
805        
806  
807  
808  <span class="md-ellipsis">
809    
810  
811    Performance
812  
813
814    
815  </span>
816  
817  
818
819      </a>
820    </li>
821  
822
823              
824            
825          </ul>
826        </nav>
827      
828    </li>
829  
830
831    
832      
833      
834  
835  
836  
837  
838    
839    
840      
841        
842      
843        
844      
845    
846    
847    
848      
849        
850        
851      
852    
853    
854    <li class="md-nav__item md-nav__item--section md-nav__item--nested">
855      
856        
857        
858          
859        
860        <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_4" >
861        
862          
863          <label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="">
864            
865  
866  
867  <span class="md-ellipsis">
868    
869  
870    Py-feat Live
871  
872
873    
874  </span>
875  
876  
877
878            <span class="md-nav__icon md-icon"></span>
879          </label>
880        
881        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
882          <label class="md-nav__title" for="__nav_4">
883            <span class="md-nav__icon md-icon"></span>
884            
885  
886    Py-feat Live
887  
888
889          </label>
890          <ul class="md-nav__list" data-md-scrollfix>
891            
892              
893                
894  
895  
896  
897  
898    <li class="md-nav__item">
899      <a href="../pyfeat_live/" class="md-nav__link">
900        
901  
902  
903  <span class="md-ellipsis">
904    
905  
906    Pyfeat live
907  
908
909    
910  </span>
911  
912  
913
914      </a>
915    </li>
916  
917
918              
919            
920              
921                
922  
923  
924  
925  
926    <li class="md-nav__item">
927      <a href="../pyfeatlive_changelog/" class="md-nav__link">
928        
929  
930  
931  <span class="md-ellipsis">
932    
933  
934    Pyfeatlive changelog
935  
936
937    
938  </span>
939  
940  
941
942      </a>
943    </li>
944  
945
946              
947            
948          </ul>
949        </nav>
950      
951    </li>
952  
953
954    
955      
956      
957  
958  
959  
960  
961    
962    
963      
964        
965      
966        
967      
968    
969    
970    
971      
972        
973        
974      
975    
976    
977    <li class="md-nav__item md-nav__item--section md-nav__item--nested">
978      
979        
980        
981          
982        
983        <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_5" >
984        
985          
986          <label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="">
987            
988  
989  
990  <span class="md-ellipsis">
991    
992  
993    Benchmarks
994  
995
996    
997  </span>
998  
999  
1000
1001            <span class="md-nav__icon md-icon"></span>
1002          </label>
1003        
1004        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
1005          <label class="md-nav__title" for="__nav_5">
1006            <span class="md-nav__icon md-icon"></span>
1007            
1008  
1009    Benchmarks
1010  
1011
1012          </label>
1013          <ul class="md-nav__list" data-md-scrollfix>
1014            
1015              
1016                
1017  
1018  
1019  
1020  
1021    <li class="md-nav__item">
1022      <a href="../../benchmarks/Speed/" class="md-nav__link">
1023        
1024  
1025  
1026  <span class="md-ellipsis">
1027    
1028  
1029    Speed
1030  
1031
1032    
1033  </span>
1034  
1035  
1036
1037      </a>
1038    </li>
1039  
1040
1041              
1042            
1043              
1044                
1045  
1046  
1047  
1048  
1049    <li class="md-nav__item">
1050      <a href="../../benchmarks/accuracy/" class="md-nav__link">
1051        
1052  
1053  
1054  <span class="md-ellipsis">
1055    
1056  
1057    Accuracy
1058  
1059
1060    
1061  </span>
1062  
1063  
1064
1065      </a>
1066    </li>
1067  
1068
1069              
1070            
1071          </ul>
1072        </nav>
1073      
1074    </li>
1075  
1076
1077    
1078      
1079      
1080  
1081  
1082  
1083  
1084    
1085    
1086      
1087        
1088      
1089        
1090      
1091        
1092      
1093        
1094      
1095    
1096    
1097    
1098      
1099        
1100        
1101      
1102    
1103    
1104    <li class="md-nav__item md-nav__item--section md-nav__item--nested">
1105      
1106        
1107        
1108          
1109        
1110        <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_6" >
1111        
1112          
1113          <label class="md-nav__link" for="__nav_6" id="__nav_6_label" tabindex="">
1114            
1115  
1116  
1117  <span class="md-ellipsis">
1118    
1119  
1120    Contributing
1121  
1122
1123    
1124  </span>
1125  
1126  
1127
1128            <span class="md-nav__icon md-icon"></span>
1129          </label>
1130        
1131        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_6_label" aria-expanded="false">
1132          <label class="md-nav__title" for="__nav_6">
1133            <span class="md-nav__icon md-icon"></span>
1134            
1135  
1136    Contributing
1137  
1138
1139          </label>
1140          <ul class="md-nav__list" data-md-scrollfix>
1141            
1142              
1143                
1144  
1145  
1146  
1147  
1148    <li class="md-nav__item">
1149      <a href="../contribute/" class="md-nav__link">
1150        
1151  
1152  
1153  <span class="md-ellipsis">
1154    
1155  
1156    Contribute
1157  
1158
1159    
1160  </span>
1161  
1162  
1163
1164      </a>
1165    </li>
1166  
1167
1168              
1169            
1170              
1171                
1172  
1173  
1174  
1175  
1176    <li class="md-nav__item">
1177      <a href="../modelContribution/" class="md-nav__link">
1178        
1179  
1180  
1181  <span class="md-ellipsis">
1182    
1183  
1184    modelContribution
1185  
1186
1187    
1188  </span>
1189  
1190  
1191
1192      </a>
1193    </li>
1194  
1195
1196              
1197            
1198              
1199                
1200  
1201  
1202  
1203  
1204    <li class="md-nav__item">
1205      <a href="../changelog/" class="md-nav__link">
1206        
1207  
1208  
1209  <span class="md-ellipsis">
1210    
1211  
1212    Changelog
1213  
1214
1215    
1216  </span>
1217  
1218  
1219
1220      </a>
1221    </li>
1222  
1223
1224              
1225            
1226              
1227                
1228  
1229  
1230  
1231  
1232    <li class="md-nav__item">
1233      <a href="https://github.com/cosanlab/py-feat" class="md-nav__link">
1234        
1235  
1236  
1237  <span class="md-ellipsis">
1238    
1239  
1240    GitHub Repository
1241  
1242
1243    
1244  </span>
1245  
1246  
1247
1248      </a>
1249    </li>
1250  
1251
1252              
1253            
1254          </ul>
1255        </nav>
1256      
1257    </li>
1258  
1259
1260    
1261      
1262      
1263  
1264  
1265  
1266  
1267    
1268    
1269      
1270        
1271      
1272        
1273      
1274        
1275      
1276        
1277      
1278        
1279      
1280        
1281      
1282        
1283      
1284    
1285    
1286    
1287      
1288        
1289        
1290      
1291    
1292    
1293    <li class="md-nav__item md-nav__item--section md-nav__item--nested">
1294      
1295        
1296        
1297          
1298        
1299        <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_7" >
1300        
1301          
1302          <label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="">
1303            
1304  
1305  
1306  <span class="md-ellipsis">
1307    
1308  
1309    API Reference
1310  
1311
1312    
1313  </span>
1314  
1315  
1316
1317            <span class="md-nav__icon md-icon"></span>
1318          </label>
1319        
1320        <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="false">
1321          <label class="md-nav__title" for="__nav_7">
1322            <span class="md-nav__icon md-icon"></span>
1323            
1324  
1325    API Reference
1326  
1327
1328          </label>
1329          <ul class="md-nav__list" data-md-scrollfix>
1330            
1331              
1332                
1333  
1334  
1335  
1336  
1337    <li class="md-nav__item">
1338      <a href="../../api/feat/detector/" class="md-nav__link">
1339        
1340  
1341  
1342  <span class="md-ellipsis">
1343    
1344  
1345    feat.detector
1346  
1347
1348    
1349  </span>
1350  
1351  
1352
1353      </a>
1354    </li>
1355  
1356
1357              
1358            
1359              
1360                
1361  
1362  
1363  
1364  
1365    <li class="md-nav__item">
1366      <a href="../../api/feat/detector_v2/" class="md-nav__link">
1367        
1368  
1369  
1370  <span class="md-ellipsis">
1371    
1372  
1373    feat.detector_v2
1374  
1375
1376    
1377  </span>
1378  
1379  
1380
1381      </a>
1382    </li>
1383  
1384
1385              
1386            
1387              
1388                
1389  
1390  
1391  
1392  
1393    <li class="md-nav__item">
1394      <a href="../../api/feat/data/" class="md-nav__link">
1395        
1396  
1397  
1398  <span class="md-ellipsis">
1399    
1400  
1401    feat.data
1402  
1403
1404    
1405  </span>
1406  
1407  
1408
1409      </a>
1410    </li>
1411  
1412
1413              
1414            
1415              
1416                
1417  
1418  
1419  
1420  
1421    <li class="md-nav__item">
1422      <a href="../../api/feat/plotting/" class="md-nav__link">
1423        
1424  
1425  
1426  <span class="md-ellipsis">
1427    
1428  
1429    feat.plotting
1430  
1431
1432    
1433  </span>
1434  
1435  
1436
1437      </a>
1438    </li>
1439  
1440
1441              
1442            
1443              
1444                
1445  
1446  
1447  
1448  
1449    <li class="md-nav__item">
1450      <a href="../../api/feat/pretrained/" class="md-nav__link">
1451        
1452  
1453  
1454  <span class="md-ellipsis">
1455    
1456  
1457    feat.pretrained
1458  
1459
1460    
1461  </span>
1462  
1463  
1464
1465      </a>
1466    </li>
1467  
1468
1469              
1470            
1471              
1472                
1473  
1474  
1475  
1476  
1477    
1478    
1479      
1480        
1481          
1482        
1483      
1484        
1485      
1486        
1487      
1488        
1489      
1490        
1491      
1492        
1493      
1494        
1495      
1496        
1497      
1498        
1499      
1500        
1501      
1502        
1503      
1504        
1505      
1506        
1507      
1508    
1509    
1510    
1511      
1512    
1513    
1514    <li class="md-nav__item md-nav__item--nested">
1515      
1516        
1517        
1518          
1519        
1520        <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_7_6" >
1521        
1522          
1523          <div class="md-nav__link md-nav__container">
1524            <a href="../../api/feat/utils/" class="md-nav__link ">
1525              
1526  
1527  
1528  <span class="md-ellipsis">
1529    
1530  
1531    feat.utils
1532  
1533
1534    
1535  </span>
1536  
1537  
1538
1539            </a>
1540            
1541              
1542              <label class="md-nav__link " for="__nav_7_6" id="__nav_7_6_label" tabindex="0">
1543                <span class="md-nav__icon md-icon"></span>
1544              </label>
1545            
1546          </div>
1547        
1548        <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_7_6_label" aria-expanded="false">
1549          <label class="md-nav__title" for="__nav_7_6">
1550            <span class="md-nav__icon md-icon"></span>
1551            
1552  
1553    feat.utils
1554  
1555
1556          </label>
1557          <ul class="md-nav__list" data-md-scrollfix>
1558            
1559              
1560            
1561              
1562                
1563  
1564  
1565  
1566  
1567    <li class="md-nav__item">
1568      <a href="../../api/feat/utils/blendshape_to_au/" class="md-nav__link">
1569        
1570  
1571  
1572  <span class="md-ellipsis">
1573    
1574  
1575    blendshape_to_au
1576  
1577
1578    
1579  </span>
1580  
1581  
1582
1583      </a>
1584    </li>
1585  
1586
1587              
1588            
1589              
1590                
1591  
1592  
1593  
1594  
1595    <li class="md-nav__item">
1596      <a href="../../api/feat/utils/face_gaze/" class="md-nav__link">
1597        
1598  
1599  
1600  <span class="md-ellipsis">
1601    
1602  
1603    face_gaze
1604  
1605
1606    
1607  </span>
1608  
1609  
1610
1611      </a>
1612    </li>
1613  
1614
1615              
1616            
1617              
1618                
1619  
1620  
1621  
1622  
1623    <li class="md-nav__item">
1624      <a href="../../api/feat/utils/face_mask/" class="md-nav__link">
1625        
1626  
1627  
1628  <span class="md-ellipsis">
1629    
1630  
1631    face_mask
1632  
1633
1634    
1635  </span>
1636  
1637  
1638
1639      </a>
1640    </li>
1641  
1642
1643              
1644            
1645              
1646                
1647  
1648  
1649  
1650  
1651    <li class="md-nav__item">
1652      <a href="../../api/feat/utils/face_pose/" class="md-nav__link">
1653        
1654  
1655  
1656  <span class="md-ellipsis">
1657    
1658  
1659    face_pose
1660  
1661
1662    
1663  </span>
1664  
1665  
1666
1667      </a>
1668    </li>
1669  
1670
1671              
1672            
1673              
1674                
1675  
1676  
1677  
1678  
1679    <li class="md-nav__item">
1680      <a href="../../api/feat/utils/face_pose_mlp/" class="md-nav__link">
1681        
1682  
1683  
1684  <span class="md-ellipsis">
1685    
1686  
1687    face_pose_mlp
1688  
1689
1690    
1691  </span>
1692  
1693  
1694
1695      </a>
1696    </li>
1697  
1698
1699              
1700            
1701              
1702                
1703  
1704  
1705  
1706  
1707    <li class="md-nav__item">
1708      <a href="../../api/feat/utils/geometry/" class="md-nav__link">
1709        
1710  
1711  
1712  <span class="md-ellipsis">
1713    
1714  
1715    geometry
1716  
1717
1718    
1719  </span>
1720  
1721  
1722
1723      </a>
1724    </li>
1725  
1726
1727              
1728            
1729              
1730                
1731  
1732  
1733  
1734  
1735    <li class="md-nav__item">
1736      <a href="../../api/feat/utils/image_operations/" class="md-nav__link">
1737        
1738  
1739  
1740  <span class="md-ellipsis">
1741    
1742  
1743    image_operations
1744  
1745
1746    
1747  </span>
1748  
1749  
1750
1751      </a>
1752    </li>
1753  
1754
1755              
1756            
1757              
1758                
1759  
1760  
1761  
1762  
1763    <li class="md-nav__item">
1764      <a href="../../api/feat/utils/io/" class="md-nav__link">
1765        
1766  
1767  
1768  <span class="md-ellipsis">
1769    
1770  
1771    io
1772  
1773
1774    
1775  </span>
1776  
1777  
1778
1779      </a>
1780    </li>
1781  
1782
1783              
1784            
1785              
1786                
1787  
1788  
1789  
1790  
1791    <li class="md-nav__item">
1792      <a href="../../api/feat/utils/mp_plotting/" class="md-nav__link">
1793        
1794  
1795  
1796  <span class="md-ellipsis">
1797    
1798  
1799    mp_plotting
1800  
1801
1802    
1803  </span>
1804  
1805  
1806
1807      </a>
1808    </li>
1809  
1810
1811              
1812            
1813              
1814                
1815  
1816  
1817  
1818  
1819    <li class="md-nav__item">
1820      <a href="../../api/feat/utils/muscle_to_landmark/" class="md-nav__link">
1821        
1822  
1823  
1824  <span class="md-ellipsis">
1825    
1826  
1827    muscle_to_landmark
1828  
1829
1830    
1831  </span>
1832  
1833  
1834
1835      </a>
1836    </li>
1837  
1838
1839              
1840            
1841              
1842                
1843  
1844  
1845  
1846  
1847    <li class="md-nav__item">
1848      <a href="../../api/feat/utils/region_maps/" class="md-nav__link">
1849        
1850  
1851  
1852  <span class="md-ellipsis">
1853    
1854  
1855    region_maps
1856  
1857
1858    
1859  </span>
1860  
1861  
1862
1863      </a>
1864    </li>
1865  
1866
1867              
1868            
1869              
1870                
1871  
1872  
1873  
1874  
1875    <li class="md-nav__item">
1876      <a href="../../api/feat/utils/stats/" class="md-nav__link">
1877        
1878  
1879  
1880  <span class="md-ellipsis">
1881    
1882  
1883    stats
1884  
1885
1886    
1887  </span>
1888  
1889  
1890
1891      </a>
1892    </li>
1893  
1894
1895              
1896            
1897          </ul>
1898        </nav>
1899      
1900    </li>
1901  
1902
1903              
1904            
1905              
1906                
1907  
1908  
1909  
1910  
1911    <li class="md-nav__item">
1912      <a href="../../api/feat/transforms/" class="md-nav__link">
1913        
1914  
1915  
1916  <span class="md-ellipsis">
1917    
1918  
1919    feat.transforms
1920  
1921
1922    
1923  </span>
1924  
1925  
1926
1927      </a>
1928    </li>
1929  
1930
1931              
1932            
1933          </ul>
1934        </nav>
1935      
1936    </li>
1937  
1938
1939    
1940  </ul>
1941</nav>
1942                  </div>
1943                </div>
1944              </div>
1945            
1946            
1947              
1948              <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
1949                <div class="md-sidebar__scrollwrap">
1950                  <div class="md-sidebar__inner">
1951                    
1952
1953<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
1954  
1955  
1956  
1957    
1958  
1959  
1960    <label class="md-nav__title" for="__toc">
1961      <span class="md-nav__icon md-icon"></span>
1962      Table of contents
1963    </label>
1964    <ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
1965      
1966        <li class="md-nav__item">
1967  <a href="#common-questions" class="md-nav__link">
1968    <span class="md-ellipsis">
1969      
1970        Common questions
1971      
1972    </span>
1973  </a>
1974  
1975    <nav class="md-nav" aria-label="Common questions">
1976      <ul class="md-nav__list">
1977        
1978          <li class="md-nav__item">
1979  <a href="#py-feat-is-detecting-multiple-faces-in-an-image-with-a-single-face" class="md-nav__link">
1980    <span class="md-ellipsis">
1981      
1982        Py-feat is detecting multiple faces in an image with a single face
1983      
1984    </span>
1985  </a>
1986  
1987</li>
1988        
1989          <li class="md-nav__item">
1990  <a href="#in-what-order-are-detected-faces-returned" class="md-nav__link">
1991    <span class="md-ellipsis">
1992      
1993        In what order are detected faces returned?
1994      
1995    </span>
1996  </a>
1997  
1998</li>
1999        
2000          <li class="md-nav__item">
2001  <a href="#py-feat-is-treating-the-same-person-as-multiple-identities-or-treating-different-people-as-the-same-identity" class="md-nav__link">
2002    <span class="md-ellipsis">
2003      
2004        Py-feat is treating the same person as multiple identities or treating different people as the same identity
2005      
2006    </span>
2007  </a>
2008  
2009</li>
2010        
2011          <li class="md-nav__item">
2012  <a href="#how-can-i-speed-things-up-and-control-memory-usage" class="md-nav__link">
2013    <span class="md-ellipsis">
2014      
2015        How can I speed things up and control memory usage?
2016      
2017    </span>
2018  </a>
2019  
2020</li>
2021        
2022          <li class="md-nav__item">
2023  <a href="#how-fast-is-video-processing" class="md-nav__link">
2024    <span class="md-ellipsis">
2025      
2026        How fast is video processing?
2027      
2028    </span>
2029  </a>
2030  
2031</li>
2032        
2033      </ul>
2034    </nav>
2035  
2036</li>
2037      
2038        <li class="md-nav__item">
2039  <a href="#known-issues" class="md-nav__link">
2040    <span class="md-ellipsis">
2041      
2042        Known issues
2043      
2044    </span>
2045  </a>
2046  
2047</li>
2048      
2049        <li class="md-nav__item">
2050  <a href="#community-getting-help" class="md-nav__link">
2051    <span class="md-ellipsis">
2052      
2053        Community &amp; getting help
2054      
2055    </span>
2056  </a>
2057  
2058</li>
2059      
2060    </ul>
2061  
2062</nav>
2063                  </div>
2064                </div>
2065              </div>
2066            
2067          
2068          
2069            <div class="md-content" data-md-component="content">
2070              
2071                
2072
2073
2074
2075  
2076
2077
2078  <nav class="md-path" aria-label="Navigation" >
2079    <ol class="md-path__list">
2080      
2081        
2082  
2083  
2084    <li class="md-path__item">
2085      <a href="../.." class="md-path__link">
2086        
2087  <span class="md-ellipsis">
2088    Home
2089  </span>
2090
2091      </a>
2092    </li>
2093  
2094
2095      
2096      
2097        
2098  
2099  
2100    
2101    
2102      <li class="md-path__item">
2103        <a href="../installation/" class="md-path__link">
2104          
2105  <span class="md-ellipsis">
2106    Getting Started
2107  </span>
2108
2109        </a>
2110      </li>
2111    
2112  
2113
2114      
2115    </ol>
2116  </nav>
2117
2118              
2119              <article class="md-content__inner md-typeset">
2120                
2121                  
2122
2123
2124  
2125  
2126
2127
2128<div class="marimo-book-buttons" data-placement="header">
2129<a class="marimo-book-button marimo-book-button-github" href="https://github.com/cosanlab/py-feat/blob/main/docs/pages/faqs.md" target="_blank" rel="noopener" aria-label="View the source on GitHub" title="View the source on GitHub"><svg class="marimo-book-button-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M12 .3a12 12 0 0 0-3.79 23.4c.6.11.82-.26.82-.58v-2.05c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.08-.73.08-.73 1.2.09 1.83 1.24 1.83 1.24 1.07 1.84 2.81 1.31 3.5 1 .11-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.46-2.38 1.24-3.22-.13-.31-.54-1.53.11-3.18 0 0 1.01-.32 3.31 1.23a11.5 11.5 0 0 1 6 0c2.31-1.55 3.31-1.23 3.31-1.23.66 1.65.25 2.87.13 3.18.77.84 1.24 1.91 1.24 3.22 0 4.61-2.81 5.62-5.49 5.92.42.36.81 1.1.81 2.22v3.29c0 .32.21.69.83.58A12 12 0 0 0 12 .3"/></svg><span class="marimo-book-button-label">View on GitHub</span></a>
2130</div>
2131
2132<h1 id="faqs-tips-known-issues">FAQs, Tips &amp; Known Issues<a class="headerlink" href="#faqs-tips-known-issues" title="Permanent link">&para;</a></h1>
2133<p>Here are a few general guidelines and common questions when using <code>py-feat</code>. We are always actively trying to improve the toolbox and make it easier to use — please help us out by contributing on GitHub!</p>
2134<div class="admonition note">
2135<p class="admonition-title">Note</p>
2136<p><strong>Always spot-check your detections!</strong> While we've done our best to thoroughly test, benchmark, and document all the <a href="../models/">pre-trained models</a> included in Py-Feat, it's always possible that real-world images and videos reveal a quirk or limitation of an otherwise high-performing detector.</p>
2137</div>
2138<h2 id="common-questions">Common questions<a class="headerlink" href="#common-questions" title="Permanent link">&para;</a></h2>
2139<h3 id="py-feat-is-detecting-multiple-faces-in-an-image-with-a-single-face">Py-feat is detecting multiple faces in an image with a single face<a class="headerlink" href="#py-feat-is-detecting-multiple-faces-in-an-image-with-a-single-face" title="Permanent link">&para;</a></h3>
2140<p>This can happen sometimes, particularly for videos, as our current models don't use information from one frame to inform predictions for another frame. Try increasing the <code>face_detection_threshold</code> argument to <code>Detectorv1.detect()</code> from the default of <code>0.5</code> to something like <code>0.8</code> or <code>0.9</code>. This will make the detector more conservative in what it considers a face. You can also switch to the more accurate detector with <code>Detectorv1(face_model='retinaface')</code> (88.9% vs 55.5% WIDERFACE-Hard AP), or use <code>Detectorv2</code>, which also uses RetinaFace.</p>
2141<h3 id="in-what-order-are-detected-faces-returned">In what order are detected faces returned?<a class="headerlink" href="#in-what-order-are-detected-faces-returned" title="Permanent link">&para;</a></h3>
2142<p>Within a frame, faces are returned in the order the face detector emits them — this order is <strong>not</strong> guaranteed to be stable across frames, and a given person will not necessarily occupy the same row position from frame to frame. To group detections by person across a video, use the identity labels (<code>Fex.identities</code>, computed via <code>Fex.compute_identities()</code>) rather than row position. If you need a deterministic per-frame order, sort each frame's rows yourself (e.g. by <code>FaceRectX</code>).</p>
2143<h3 id="py-feat-is-treating-the-same-person-as-multiple-identities-or-treating-different-people-as-the-same-identity">Py-feat is treating the same person as multiple identities or treating different people as the same identity<a class="headerlink" href="#py-feat-is-treating-the-same-person-as-multiple-identities-or-treating-different-people-as-the-same-identity" title="Permanent link">&para;</a></h3>
2144<p>Similar to the previous issue, you can control the sensitivity of how confidently identity embeddings are retreated as different using the <code>face_identity_threshold</code> argument to <code>Detectorv1.detect()</code> from the default of <code>0.8</code> to something higher or lower. This will make the detector more conservative or liberal respectively, in how distinct identity embeddings have to be to be considered different people.</p>
2145<h3 id="how-can-i-speed-things-up-and-control-memory-usage">How can I speed things up and control memory usage?<a class="headerlink" href="#how-can-i-speed-things-up-and-control-memory-usage" title="Permanent link">&para;</a></h3>
2146<p>By default all images or video frames are processed independently in batches of size 1 using your CPU. If you have a GPU, use the <code>device</code> argument when initializing a detector to make use of it — <code>Detectorv1(device='cuda')</code> for NVIDIA GPUs or <code>Detectorv1(device='mps')</code> for Apple Silicon. Both <code>Detectorv1</code> and <code>Detectorv2</code> support CUDA and MPS. To perform detections in parallel, increase the <code>batch_size</code> argument to <code>Detectorv1.detect()</code> from the default of 1. The largest batch size you can use without crashing your kernel is limited by the amount of VRAM available to your GPU (or RAM if you're using CPU).</p>
2147<p>In order to use batching you must either:
2148- use a video - where frames are all assumed to have the same dimensions
2149- use a list of images - where each image has the same dimensions
2150- use a list of images and set <code>output_size=(width, height)</code> in <code>.detect()</code> to resize all images to the same dimensions before processing</p>
2151<p>You can control parallelization of data loading using the <code>num_workers</code> argument to <code>.detect()</code>, which gets directly passed to pytorch's <a href="https://pytorch.org/tutorials/beginner/basics/data_tutorial.html">DataLoader</a>. Note that on Apple Silicon <code>num_workers &gt; 0</code> is frequently <em>slower</em> than the default of <code>0</code>, so we recommend leaving it at <code>0</code> unless you've benchmarked a speedup on your own hardware.</p>
2152<h3 id="how-fast-is-video-processing">
2152How fast is video processing?<a class="headerlink" href="#how-fast-is-video-processing" title="Permanent link">&para;</a></h3>
2153<p>Py-Feat's original release prioritized correctness and a seamless out-of-the-box experience over raw speed, and was quite slow (roughly 1–3 fps). That is no longer the case: <strong><code>Detectorv1</code> (v1) is now much faster, supports batching, and runs on the GPU (CUDA and MPS)</strong>, and <strong><code>Detectorv2</code> is faster still</strong> — it computes its whole multi-task output in a single forward pass. For current speed and accuracy numbers, see the <a href="../../benchmarks/accuracy/">accuracy</a> and <a href="../../benchmarks/Speed/">speed</a> benchmarks.</p>
2154<p>To get the most throughput, run on a GPU (<code>device='cuda'</code> or <code>device='mps'</code>) and increase <code>batch_size</code> in <code>.detect()</code> (see the question above).</p>
2155<p>By default, Py-feat avoids loading an entire video into memory, only loading frames as-needed, similar to Pytorch's <a href="https://pytorch.org/vision/main/auto_examples/others/plot_video_api.html#building-a-sample-read-video-function">unofficial video API</a>. This means you don't need to worry about your computer crashing if you're processing a video that doesn't fit into memory; the tradeoff is a small per-frame seek latency that grows with video length (later frames take slightly longer to load as the video is "seeked" to the correct time-point).</p>
2156<p>If you already know you have enough system memory to load the entire video at once, you can instead manually call <code>video_to_tensor('videofile.mp4')</code> from <code>feat.utils.io</code> and process the resulting tensor by passing <code>data_type='tensor'</code> to <code>Detectorv1.detect()</code>, batching as usual.</p>
2157<h2 id="known-issues">Known issues<a class="headerlink" href="#known-issues" title="Permanent link">&para;</a></h2>
2158<ul>
2159<li>Detectors can be sensitive to differences in image sizes, such that very large or very small images result in very different predictions. This is largely due to differences in the hyper-parameters and image sizes used to train the underlying pre-trained models. To partially help with this issue, since <code>0.5.0</code> Py-Feat supports passing keyword arguments to underlying models during initialization or detection, e.g. <code>detector = Detectorv1(facepose_model_kwargs={'keep_top_k': 500})</code>. You can follow <a href="https://github.com/cosanlab/py-feat/issues/135">this issue</a> for more details.</li>
2160</ul>
2161<h2 id="community-getting-help">Community &amp; getting help<a class="headerlink" href="#community-getting-help" title="Permanent link">&para;</a></h2>
2162<ul>
2163<li><a href="https://www.askpbs.org/c/py-feat/26">Discourse Community</a>: a Stack Overflow-like forum where you can view, contribute, and vote on questions regarding <code>py-feat</code> usage. Please ask questions here first so other users can benefit from the answers!</li>
2164<li><a href="https://github.com/cosanlab/py-feat/issues">Open a GitHub issue</a>
2164 for all code-related problems. You can also do so by clicking the GitHub icon at the top of any page.</li>
2165</ul>
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178                
2179              </article>
2180            </div>
2181          
2182          
2183<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
2183
2184        </div>
2185        
2186      </main>
2187      
2188        <footer class="md-footer">
2189  
2190    
2191      
2192      <nav class="md-footer__inner md-grid" aria-label="Footer" >
2193        
2194          
2195          <a href="../au_reference/" class="md-footer__link md-footer__link--prev" aria-label="Previous: AU Reference">
2196            <div class="md-footer__button md-icon">
2197              
2198              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
2199            </div>
2200            <div class="md-footer__title">
2201              <span class="md-footer__direction">
2202                Previous
2203              </span>
2204              <div class="md-ellipsis">
2205                AU Reference
2206              </div>
2207            </div>
2208          </a>
2209        
2210        
2211          
2212          <a href="../../basic_tutorials/Detecting_Images/" class="md-footer__link md-footer__link--next" aria-label="Next: Detecting Images">
2213            <div class="md-footer__title">
2214              <span class="md-footer__direction">
2215                Next
2216              </span>
2217              <div class="md-ellipsis">
2218                Detecting Images
2219              </div>
2220            </div>
2221            <div class="md-footer__button md-icon">
2222              
2223              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11z"/></svg>
2224            </div>
2225          </a>
2226        
2227      </nav>
2228    
2229  
2230  <div class="md-footer-meta md-typeset">
2231    <div class="md-footer-meta__inner md-grid">
2232      <div class="md-copyright">
2233  
2234    <div class="md-copyright__highlight">
2235      2022 · Made with <a href="https://marimobook.org" target="_blank" rel="noopener">Marimo-Book</a>
2236    </div>
2237  
2238  
2239</div>
2240      
2241    </div>
2242  </div>
2243</footer>
2244      
2245    </div>
2246    <div class="md-dialog" data-md-component="dialog">
2247      <div class="md-dialog__inner md-typeset"></div>
2248    </div>
2249    
2250    
2251    
2252      
2253      
2254      
2254<script id="__config" type="application/json">{"annotate": null, "base": "../..", "features": ["navigation.sections", "navigation.expand", "navigation.path", "navigation.footer", "navigation.instant", "navigation.tracking", "search.suggest", "search.highlight", "search.share", "content.code.copy", "content.code.annotate", "toc.follow", "navigation.indexes"], "search": "../../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
2254
2255    
2256    
2257      
2257<script src="../../assets/javascripts/bundle.d7400e89.min.js"></script>
2257
2258      
2259        
2259<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
2259
2260      
2261        
2261<script src="../../javascripts/mathjax.js?v=0.1.26"></script>
2261
2262      
2263        
2263<script src="../../javascripts/marimo_book.js?v=0.1.26" defer></script>
2263
2264      
2265    
2266  </body>
2267</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.