This fixes some bugs.
This commit is contained in:
parent
cd9cfd9ee8
commit
4a88c57be2
2 changed files with 15 additions and 7 deletions
|
|
@ -179,20 +179,26 @@ public class OpenSee : MonoBehaviour {
|
|||
}
|
||||
|
||||
void Start () {
|
||||
openSeeDataMap = new Dictionary<int, OpenSeeData>();
|
||||
if (openSeeDataMap == null)
|
||||
openSeeDataMap = new Dictionary<int, OpenSeeData>();
|
||||
buffer = new byte[65535];
|
||||
|
||||
socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
|
||||
IPAddress ip;
|
||||
IPAddress.TryParse(listenAddress, out ip);
|
||||
socket.Bind(new IPEndPoint(ip, listenPort));
|
||||
socket.ReceiveTimeout = 15;
|
||||
if (socket == null) {
|
||||
socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
|
||||
IPAddress ip;
|
||||
IPAddress.TryParse(listenAddress, out ip);
|
||||
socket.Bind(new IPEndPoint(ip, listenPort));
|
||||
socket.ReceiveTimeout = 15;
|
||||
}
|
||||
|
||||
receiveThread = new Thread(() => performReception());
|
||||
receiveThread.Start();
|
||||
}
|
||||
|
||||
void Update () {
|
||||
if (!receiveThread.IsAlive) {
|
||||
Start();
|
||||
}
|
||||
}
|
||||
|
||||
void EndReceiver() {
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ public class OpenSeeExpression : MonoBehaviour
|
|||
private void SelectPoints() {
|
||||
List<int> indexList = new List<int>();
|
||||
for (int i = 0; i < colsBase; i++)
|
||||
if (i < 2 || i > 4) // Translation should not be used for training!
|
||||
if (i > 4) // Translation and (sometimes unavailable) eye open fields should not be used for training!
|
||||
indexList.Add(i);
|
||||
cols = indexList.Count;
|
||||
if (pointSelection.pointsFaceContour)
|
||||
|
|
@ -303,6 +303,8 @@ public class OpenSeeExpression : MonoBehaviour
|
|||
ResetInfo();
|
||||
return false;
|
||||
}
|
||||
modelReady = false;
|
||||
//model = new SVMModel();
|
||||
SelectPoints();
|
||||
List<string> keys = new List<string>();
|
||||
List<string> accuracyWarnings = new List<string>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue