当前位置:网站首页>Introduction to facial expression recognition system -- offline environment configuration
Introduction to facial expression recognition system -- offline environment configuration
2022-06-13 02:38:00 【Infinite thoughts】
Abstract : This article details how to use the offline method to configure the previous blog post 《 Introduction to facial expression recognition system —— Part 1 (python Realization , contain UI Interface and complete code )》 Code in project Python Environmental Science , It can effectively avoid some possible dependent package installation problems . The software required for this offline package includes PyCharm and Anaconda, Bloggers have packed and shared through Baidu online disk , So that the bloggers who pay attention to the project can download, install and use , The main points of the blog are as follows :
List of articles
Preface
Blog posts written by previous bloggers Introduction to facial expression recognition system —— Part 1 (python Realization , contain UI Interface and complete code ) Shared an expression recognition project , Many fans have sent messages asking about the environment configuration method . Many new friends can't configure Python Environmental Science , Or it is difficult to install some dependent packages due to the computer network environment , So here's what the blogger packed Python Offline environment , For everyone to transplant to their own computers , In order to solve the problem of inconsistent environment versions .
1. Download code and offline environment
1.1 Download code
(1) First of all, of course, is to download the code for facial expression recognition , The download address is as follows , As shown in the figure, we click on the page 2.1 Download link to version , Start downloading and extracting the files :
Download code :https://mianbaoduo.com/o/bread/YpialJ0=

(2) The downloaded and unzipped folder is shown in the figure , Please put it in a familiar folder path without Chinese :

1.2 Download the dependent package file
(1) The blogger is ready to run all the code required for this project Python Dependency package , This step requires you to download the ready offline Python Environment package .
link :https://pan.baidu.com/s/1NJS7ufGkPw_b2lor2lockw
Extraction code :fxrd
(2) First, click the above link to download the offline dependency package , And will download “Pypackage” Folder on top “Emotion Recognition” In the folder , That is, the directory looks like the one shown in the figure below :

Download and place this folder , In this way, the program code and dependent package for facial expression recognition are ready . The next step is just to PyCharm Create a new one in Conda Environment and install these dependencies , Last in PyCharm You can run this program on your own computer by specifying this environment in .
2.PyCharm And Anaconda install
Before we configure the environment and run the code ,PyCharm and Anaconda It must be installed . Even though PyCharm It can also be installed and managed Python Of dependent packages , However, in order to facilitate the configuration and maintenance of offline packages in the future , Please install Anaconda This must-have artifact . The installation steps for these two software are basically one click Next, Simple installation , There are many tutorials on the Internet , You can refer to the installation . Of course, I recommend using the installation tutorial written by the blogger :PyCharm And Anaconda Super detailed installation and configuration tutorial , Each step of the installation process is described in detail . Just click the link and install it , The software installation will not be repeated here .
3. Install the offline dependency package
3.1 newly build Conda Environmental Science
(1) First let's open up PyCharm, Click... In the upper left menu bar “File”, choice “Open”, In the pop-up browse option box, select the folder directory extracted in the previous section ( That is, the folder of our project code ), Click on “OK” You can open the project , As shown in the figure below :

(2) The project interface after opening is shown in the following figure , Click on the bottom left “Terminal” May open PyCharm It comes with terminal tools . Its function and CMD The terminal is the same , It's just that here when we open the project ,PyCharm The directory of the terminal is automatically switched to the folder path where the project is located , It saves us the steps of switching paths .

(3) Let's first create a new one for this project Conda Environmental Science , Enter the following code in the terminal , Create a new one called "emo_rec" Environment , And designate Python The version is 3.7( For this project, please use 3.7 Version of ), As shown in the figure below :
conda create --name emo_rec python=3.7

(4) Press enter , Start creating environment , We will be prompted to confirm the installation , type “y” And return , You can start the installation :

(5) At this time, you can see the following interface without any accident , Show that the environment configuration is complete , And prompt us to activate the environment :

(6) Let's turn off this terminal first , Then restart the terminal , Enter the following code to activate the environment we just created “emo_rec”, And go back to execute :
conda activate emo_rec

(7) completion of enforcement , You can see that the header of the command line has been displayed as “(emo_rec)”, Indicates that you are currently in emo_rec In the environment :

3.2 Start installing dependency packages
(1) You are now ready to install the offline dependency package . First open and find “Pypackage” In folder “setup.txt” file , The installed packages and corresponding versions have been listed in it , Here you need to copy it to “Emotion Recognition” Under the folder .
To ensure that the following steps are carried out correctly, several points need to be confirmed : First of all ,“Pypackage” The folder and “setup.txt” File in Unzipped “Emotion Recognition” Under the folder ; second , The terminal path is in “Emotion Recognitive” Under the path , Third , The terminal is already in the new “emo_rec” In the environment , It is roughly as shown in the figure below :

(2) So we just need to use pip install setup.txt The dependent packages listed in the file are OK , Enter the following code in the current terminal and press enter , Officially start the offline package installation .
pip install -r setup.txt --no-index --find-links=./Pypackage/
The above code means to use pip install setup.txt The packages listed in the file , It also specifies that the directory of the offline installation package is in the... Of the current directory Pypackage Under the folder , As shown in the figure below :

(3) Type the code and press enter to wait for the dependent package to be installed , The general display of successful installation is as follows :

So far, we have created and named our own environment by relying on packages offline "emo_rec" The required third-party dependency libraries are installed . Readers can see that the previous steps are basically consistent with our usual configuration environment , Just steps (2) There are conditions to specify the next good installation package , This actually avoids many problems that may occur during online installation .
3.3 stay PyCharm Configure the environment in
(1) Start configuring the environment , Now we just need to PyCharm Specify the newly installed environment as the running environment of the facial expression recognition project . Click on “File” menu , choice “Setting” Options , stay “Project” Find “Python Interpreter”, If it has not been configured before, the environment display should still be empty ;

(2) Click the environment drop-down box ( The picture below is red 2 It's about ), Click... Below the drop-down box “Show All…”, The environment display interface pops up , Click on the bottom left corner “ plus ” Icon , Get into Python Environment selection interface , Choose “Conda Environment”, Choose “Existing environment”( As shown in Figure No 6 Step ), At this time, you can choose 3.2 Section conda Environmental Science , The address is “anaconda The installation directory \envs\ Your environment name \python.exe”, Finally, click “OK”;

Normally, we just installed conda Environmental Science , Above, red 7 The office will automatically help us choose this environment , If it doesn't appear, it can be found in your anaconda Installation directory conda Folder , One of the “envs” Folder , You can find the folder of environment name in it , Choose python.exe That's it .
(3) Click on OK after , At this point, the installed dependency packages can be seen on the environment interface , Here's the picture , Click on “OK” that will do

(4) As a result of later updates Keras The... In this bag saving.py File is incompatible , So we need to download the “Pypackage” In folder “saving.py” File copy to “ Yours anaconda The installation directory \conda\envs\emo_rec\Lib\site-packages\keras\engine\” Under the folder (emo_rec It's the environment name ), Replace the original “saving.py” file :

(5) After some operation , We can open... In the file bar on the left "runMain.py" File code , And right-click in the editor , choice “Run runMain”, You can run the code

(6) At this point, the program can run successfully , The interface is shown in the following illustration :

Conclusion
Because of the limited ability of bloggers , The methods mentioned in the blog post are even tested , There will inevitably be omissions . I hope you can enthusiastically point out the mistakes , So that the next modification can be more perfect and rigorous , In front of you .Python There are also many online tutorials for software installation , The installation steps need not be the same , Due to many factors , Different people may install it differently , Therefore, if the installation fails, it is normal , Keep calm , Problem solving is the most important thing , At the same time, if there is a better implementation method, please don't hesitate to give us your advice .
边栏推荐
- Basic principle of bilateral filtering
- Leetcode 473. Match to square [violence + pruning]
- [Dest0g3 520迎新赛] 拿到WP还整了很久的Dest0g3_heap
- Find the number of permutations
- Detailed explanation of UCI datasets and their data processing (with 148 datasets and processing codes attached)
- Sans certificate generation
- Chapter7-12_ Controllable Chatbot
- Useful websites for writing papers and studying at ordinary times
- Microsoft Pinyin opens U / V input mode
- Matlab: find the inner angle of n-sided concave polygon
猜你喜欢

Flow chart of interrupt process

Mbedtls migration experience

Port mapping between two computers on different LANs (anydesk)
![[reading point paper] deeplobv3 rethinking atlas revolution for semantic image segmentation ASPP](/img/4e/a5c6b1a8880209f89d6bf252ff889a.jpg)
[reading point paper] deeplobv3 rethinking atlas revolution for semantic image segmentation ASPP
![[data analysis and visualization] key points of data drawing 5- the problem of error line](/img/d7/a54129d2c7bdf7caf764f6f8db9fc1.jpg)
[data analysis and visualization] key points of data drawing 5- the problem of error line

How can intelligent safe power distribution devices reduce the occurrence of electrical fire accidents?
![[reading papers] comparison of deeplobv1-v3 series, brief review](/img/80/714b8e5b2ad31b0a1a0b8320a3c714.jpg)
[reading papers] comparison of deeplobv1-v3 series, brief review

Useful websites for writing papers and studying at ordinary times

智能安全配电装置如何减少电气火灾事故的发生?

Paper reading - jukebox: a generic model for music
随机推荐
Introduction to arm Cortex-M learning
Gadgets: color based video and image cutting
[reading papers] deep learning face representation by joint identification verification, deep learning applied to optimization problems, deepid2
[life science] DNA extraction of basic biological experiments
4.11 introduction to firmware image package
Data warehouse notes | 5 factors that need attention for customer dimension modeling
Change the topic of change tax
[reading papers] deepface: closing the gap to human level performance in face verification. Deep learning starts with the face
0- blog notes guide directory (all)
冲刺强基计划数学物理专题一
Leetcode 926. Flip string to monotonically increasing [prefix and]
too old resource version,Code:410
Flow chart of interrupt process
[data analysis and visualization] key points of data drawing 10- construction of legend
Barrykay electronics rushes to the scientific innovation board: it is planned to raise 360million yuan. Mr. and Mrs. Wang Binhua are the major shareholders
Chapter7-10_ Deep Learning for Question Answering (1/2)
03 认识第一个view组件
Automatic differential reference
Paper reading - joint beat and downbeat tracking with recurrent neural networks
How can intelligent safe power distribution devices reduce the occurrence of electrical fire accidents?