mmmmmm44 / VTuber-Python-Unity

An Implementation of VTuber (Both 3D and Live2D) using Python and Unity. Providing face movement tracking, eye blinking detection, iris detection and tracking and mouth movement tracking using CPU only.
MIT License
492 stars 84 forks source link

TCP connnect can not connected, unity is runing #7

Open lucasjinreal opened 2 years ago

lucasjinreal commented 2 years ago

INFO: Created TensorFlow Lite XNNPACK delegate for CPU. Traceback (most recent call last): File ".\main.py", line 239, in main() File ".\main.py", line 92, in main socket = init_TCP() File ".\main.py", line 37, in init_TCP s.connect(address) ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it [ WARN:0@4.732] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (539) `anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback

image
mmmmmm44 commented 2 years ago

Is the TCP port in the unity program and the python program the same?

Also, ensure that the TCP connection function is being called when running the program.

Also, ensure that you run the unity program first before running the python program.

I think mainly these are the reasons that caused the error.

Bruce-yu199 commented 2 years ago

I had the same problem with you,and I solved it. I only modified the ip address in the main.py file at first, and then the same situation as you occurred. Later, I found that there is also an ip address in the HiyoriController.cs file. The result is that I changed the ip address in the HiyoriController.cs file. After successfully running! As shown in the picture, I hope this will help you!

lucasjinreal commented 2 years ago

@mmmmmm44 I am using the default port without changing, it should be same.

lucasjinreal commented 2 years ago

@Bruce-yu199 I don't understand, doesn't they all using 127.0.01? it was local TCP IP

Bruce-yu199 commented 2 years ago

@jinfagang no, I mean every computer's local TCP IP may be different. you should find your own ip and modify the ip in both .py and .cs file with your own ip. for example, i modify the ip with my computer's ip"192.168.xxx.xxx"

lucasjinreal commented 2 years ago

@Bruce-yu199 I can 1000% sure that your problem wasn't solved by changing IP address.... 127.0.0.1 is just your local IP, it was same thing...

Bruce-yu199 commented 2 years ago

@jinfagang sorry, I just reacted suddenly ,you are right. But I truly solve it by changing the ip with "192.168.xxx", maybe you can have a try or see if the port is occupied by another application ...

lucasjinreal commented 2 years ago

@Bruce-yu199 I fonud it was due to c# scripts acutally not fully up:

imag

@mmmmmm44 Can u give me a hand? I droped the cs to unitychan obejct already.. and it can be seen here:

image

why give me this error?

mmmmmm44 commented 2 years ago

Late reply, but I think you may have already figured it out.

The usage of UI stuff (the Canvas and remaining stuff) is only available and can be figured them out only when you import the sample package downloaded from the dropbox.

There is an App Controller object holding the UI System.cs, which controls the max/min value of the detection from Python and clip them.

There is also an Cavas object which holds the UI stuff (the buttons and sliders).

I don't include them in the tutorial videos as they are unfinished stuff to me (although they work), and also they are developed after I make the complete series.

Anyway, thank you for using my project. Hope you are having fun. ><