Comments (19)
I think I know what is the error and sorry for not making it clear. What I mean is to replace original RawImage.cs with contents of ./Script/RawImage.cs, not to replace PosAgent.cs with the contents of ./Script/RawImage.cs. The reason for such replacement is I modified some content in RawImage.cs where it is the part of the source code of the Unity engine. So I cannot include RawImage.cs in my project directly.
I will try some alternative ways to implement it in the future.
from vehiclex.
Oh many thanks. I have updated this link.
from vehiclex.
I haven't test unity editor in Linux (unity editor just begin to support Linux last year when I write this code). I just rebuild my system in windows it seems works well (by replacing Unity/Hub/Editor/2019.3.0a8/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Rawimages.cs with ./Script/RawImage.cs).
May I ask is this an error during running? it seems there is still something wrong with the RawImage.cs
from vehiclex.
Cool! I have updated the readme.
from vehiclex.
Thank you for your question. Could you please click the 'Clear' button above and see how many error remain?
from vehiclex.
from vehiclex.
It seems weird to me that you have this bug. Could you please check whether PosAgent.cs is removed here?
from vehiclex.
from vehiclex.
Great, that resolved the issue. Thank you so much !
I noticed that linux standalone binary is missing.
Both links on this page point to the windows binary on google drive.
from vehiclex.
Great. Thank you.
I get the same car in all images when I run inference.py using the unity editor by replacing
env = UnityEnvironment(file_name=env_name)
with
env = UnityEnvironment(file_name=None)
car_id is always 0, color_id is always 4 and type_id is always 0.
from vehiclex.
There should be some bugs. Could you please go to the console and check the error?
from vehiclex.
I have not downoaded the background images, so i repeatedly get this error on console:
DirectoryNotFoundException: Could not find a part of the path '/home/urwa/Documents/unsupervised/VehicleX/unity/VehicleX Unity Source/Background_imgs/vdo (37).avi'.
System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) (at :0)
System.IO.FileSystemEnumerableIterator1[TSource].HandleError (System.Int32 hr, System.String path) (at <a8ed250850854b439cedc18931a314fe>:0) System.IO.FileSystemEnumerableIterator
1[TSource].CommonInit () (at :0
Could this be the reason ?
Using Build-linux/VehicleX is also giving me one car.
from vehiclex.
Missing background images was the reason.
IEnumerator Example(float[] vectorAction) function in PosAgent.cs encounters an error if background images are missing. And then rest of function does not execute.
Your inference script has an exception ensuring that BackgroundImages folder exists. I removed it, that is why I wasnt getting exception.
from vehiclex.
Yes, the inference mode requires background images. otherwise, you can have ''python inference.py --train_mode True''
from vehiclex.
Now I am able to run using the linux standalone version.
But using the unity editor I get the following error.
NullReferenceException: Object reference not set to an instance of an object
PosAgent+d__24.MoveNext () (at Assets/Scripts/PosAgent.cs:215)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at /home/builduser/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
PosAgent:AgentAction(Single[], String) (at Assets/Scripts/PosAgent.cs:310)
MLAgents.Agent:AgentAction(Single[], String, CustomAction) (at Assets/Resources/ML-Agents/Scripts/Agent.cs:872)
MLAgents.Agent:AgentStep() (at Assets/Resources/ML-Agents/Scripts/Agent.cs:1069)
MLAgents.Academy:EnvironmentStep() (at Assets/Resources/ML-Agents/Scripts/Academy.cs:562)
MLAgents.Academy:FixedUpdate() (at Assets/Resources/ML-Agents/Scripts/Academy.cs:583)
Errors occur when script tries to access attributes of Background_Img such as: Background_Img.m_Texture
from vehiclex.
following line in start() in POsAgent.cs returns Null.
GameObject.FindGameObjectWithTag("Background_Img").GetComponent<UnityEngine.UI.RawImage>();
from vehiclex.
I think the Unity editor is only available in windows. May I ask do you get the same error in windows system?
from vehiclex.
Do you mean that this repository only supports the linuxx unity editor ?
I am able to perform the inference using linux and unity editor but I get images of the same car over and over again. Because of the error I mentioned above.
Background_Img GameObject has no component of type <UnityEngine.UI.RawImage> and returns null. It doesnt lool like an OS issue.
I will try on windows too and let you know.
from vehiclex.
Ah thank you so much !
I was copying the rawimage in to the wrong place assets/scripts
It is working like a charm now !
I you can put the path "Unity/Hub/Editor/2019.3.0a8/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Rawimages.cs" in the readme instructions it would be very easy for newbies to Unity.
Thanks again !
from vehiclex.
Related Issues (18)
- When will the Engine be released? HOT 1
- Configuration issues HOT 6
- can't access to the drive of backgroud images HOT 1
- some question about the database HOT 8
- Assets\Scripts\LoadRole.cs(11,13): error CS0246 HOT 1
- Car key point extraction HOT 6
- The code of the Unity python interface HOT 6
- about style domain adaptation HOT 4
- UnityEnvironmentException HOT 1
- Use the unity-python HOT 2
- The UNITY-PYTHON
- car keypoint extraction HOT 2
- How to set camera intrinsics? HOT 3
- background images download problem HOT 1
- Blender problem
- how may images are there in the vehicleX dataset HOT 2
- About the release of 3D unity model HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vehiclex.