Is it necessary to use LLM for emotion recognition?

From: Li rumor Emotion recognition has wide application value in various conversation scenarios. For example, in social media, sentiment analysis of comments can be performed to understand users’ emotional attitudes; in manual customer service, customers’ emotions can be analyzed to better meet their needs. In addition, emotion recognition can also be applied to chatbots to […]

NVIDIA’s Hot Agent Research: AI Really Restores Human Emotions! I will be hungry and lonely, I will run and I will get angry.

Can AI agents reflect real human emotions and the subtle sense of distance in interpersonal relationships? Recently, researchers from NVIDIA, the University of Washington, and the University of Hong Kong released Humanoid Agents. As can be seen from the name, this kind of intelligent agent can reflect the basic needs of human beings. In the […]

Winform simulates robot motion trajectory

Foreword: It feels like a bit of a headline, but it is indeed the case, and the code was indeed planned to be used in this way at the beginning – but it was implemented later. During the process, I found that the situation was simpler than it was now (although it is quite simple […]

The turtle in ros makes a circular motion and subscribes to the turtle’s position information

一.Based on the turtle display node, through topic publishing and coding, the small turtle can be controlled to make circular motion Open Terminal 1 and enter the workspace ros_ws cd ros_ws Start the node (ros server) roscore Open a new terminal2, start the turtle node (turtlesim) rosrun turtlesim turtlesim_node Open Terminal 3 and check the […]

IoT motion sensor light: Integrated W5500-EVB-Pico, Adafruit IO, PIR sensor and IFTTT

Smart lighting system using W5500-EVB-Pico, Adafruit IO and PIR sensors. Using circuit python. The system detects motion to control lighting and records events. Forward: IoT Motion Sensing Lights: Integrating W5500-EVB-Pico, Adafruit IO, PIR Sensor, and IFTTT Project Introduction Introduction Personally, I find it useful to use motion recognition LED sensors. When motion is detected, the […]

Affinity and anti-affinity of k8s promotion

nodeSelector provides a very simple way to limit Pods to nodes containing specific labels. Affinity/anti-affinity properties greatly expand the expression of limitations. The main enhancements are: Expressions are more efficient (not just an “and” relationship of multiple exact matching expressions) The rule can be marked as “soft” / “preference” instead of hard requirement. At this […]

Use Python + OpenCV + Deepface to implement face, emotion and race detection

Click”XiaobaiXueVision“aboveandchoosetoadd”Star“or”Pin“ Heavystuff,deliveredassoonaspossible WeuseOpenCV,thedeepfacelibrary,andthehaarcascade_frontalface_default.xmlfiletodetectfaces,facialexpressions,andraceinimages. Downloadthisimagefromhttps://unsplash.com/photos/vtwjyEelY08 Beforewebegin,itisassumedthatyouknowthebasicsofpythonandhavepythoninstalled Otherrequiredinstallationpackagesare: Opencv-installitusing deepface-installitusing matplotlib-installitusing Downloadhaarcascade_frontalface_default.xmfromhttps://raw.githubusercontent.com/opencv/opencv/master/data/haarcascades/haarcascade_frontalface_default.xmlandsaveitinthesamefolderasyourproject. Whatisthehaarcascade_frontalface_default.xmlfile? Itisafilethatispretrainedtodetectfacesandgivessomepointsfordrawingrectangles,squaresoranyshapeontheface. Nowlet’sgetintothecodingpart(dothisinajupyternotebook). First,let’simporttherequiredlibrariesandloadhappy_boy.jpg(theimagewedownloadedearlier)anddisplayit. #importingcv2andmatplotlid importcv2 importmatplotlib.pyplotasplt #loadingimage img=cv2.imread(“happy_boy.jpg”)#loadingimage #showingimageusingplt plt.imshow(img) Output: EverytimewedisplayanimageitwillbeinBGRandbeforedisplayingweneedtoconvertittoacolorphoto.ForthisweusethecvtColor()functionfromcv2. color_img=cv2.cvtColor(img,cv2.COLOR_BGR2RGB) plt.imshow(color_img) Output: UseDeepfacetopredicttheemotionsandethnicityofpeople/childreninpictures ImportDeepFaceandanalyzeourimages. Itwillanalyzetheimageandsavethedetectedemotionsandracesintothe”prediction”variable. #importingdeepfacelibraryandDeepFace fromdeepfaceimportDeepFace #thisanalyzesthegivenimageandgivesvalues #whenweusethisfor1sttime,itmaygivemanyerrorsandsomegoogledrivelinkstodownloadsome’.h5’andzipfiles,downloadandsavetheminthelocationwhereitshowsthatfilesaremissing. prediction=DeepFace.analyze(color_img) Let’sseewhatitpredicts #letscheckwhatallthethingsDeepFace.analyze()functionhasanalyzed prediction Output: Intheoutput,thepredictedvaluesaredominant_emotionanddominant_race.Whatremainsareallthepointsusedtopredictmoodandrace. Wecanaccessthekeysofdominant_emotionanddominant_racejustlikeanyotherdictionarydatatype. SoDeepFace.analyze()predictedthatchild’semotions-happinessandrace-Asian. Detectfaces ThecodetodetectfacesusingOpenCVisveryshort. Weonlyneedthehaarcascade_frontalface_default.xmlfileandtheOpenCVlibrarytodetectfacesinimages.Hereisthecode. #loadingourxmlfileintofaceCascadeusingcv2.CascadeClassifier faceCascade=cv2.CascadeClassifier(cv2.data.haarcascades+’haarcascade_frontalface_default.xml’) #detectingfaceincolor_imageandgetting4points(x,y,u,v)aroundfacefromtheimage,andassigningthosevaluesto’faces’variable faces=faceCascade.detectMultiScale(color_img,1.1,4) #usingthat4pointstodrawarectanglearoundfaceintheimage for(x,y,u,v)infaces: cv2.rectangle(color_img,(x,y),(x+u,y+v),(0,0,225),2) plt.imshow(color_img) Output: Summary Asyoucansee,wedetectedtheemotion,race,andfaceofthechildintheimage,andnowcomesthefinalpartofbringingeverythingtogether.Thismeansthatnowweareshowingemotionandraceonourimages. […]

Zuo Shen Advanced Promotion Class 5 (Greedy Trying, Ranged Trying Model

Table of Contents [Case 1 Greedy attempt] [Title description] [Analysis of ideas] 【Code】 [Case 2: Trial model in scope] [Title description] [Analysis of ideas] 【Code】 [Case 3: Trial model in scope] [Title description] [Analysis of ideas] 【Code】 [Case 4: Model tried from left to top + model tried in range] [Title description] [Analysis of ideas] […]

Large-scale emotional drama Selenium: 9_selenium cooperates with Pillow to complete partial browser screenshots

Webpage screenshot Last time I mentioned the four screenshot methods of selenium, and finally took a screenshot of the entire web page. But many times, we only need to screenshot part of the content. For example, intercepting certain key information, or taking screenshots of verification codes that are no longer common (now all are clicked […]