-
Notifications
You must be signed in to change notification settings - Fork 747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MATLAB on Mac OS X is unable to find th #1
Comments
Hi monabiyan, The "Landmarks extracted successfully" might actually be a small bug. It is possible that the return status is actually coming from popd, which is much less useful. (Edit: I've fixed this now) The most likely issue, if Torch is installed correctly, is that it isn't in the PATH environment variable. Did you add it to your .bashrc file when the Torch installed asked? You can also try adding something like Hope this helps. |
I am mistaken. The shell environment is not preserved between calls to
and
This will activate torch for each call of |
Hi @AaronJackson
and Here I get:
So it is working. However, I also think it is not added in the path. In order to find the ".bashrc" file i provided the following commands in the terminal to show all the hidden files:
surprisingly there is no ".bashrc" file in the file list appear. |
Possibly a MATLAB Mac quirk ignoring your environment. Please modify |
Thanks, Aaron.
However, I am still getting error = 'Failed to run Torch7 script.' this time in the first part as well. :P |
I will try to reinstall torch again, that may solve the problem. ;) |
Remove the The Start by finding out where you installed Torch to:
Replacing the last part
which you need to use in each call of the system block as in my second comment. i.e.
If you do this, MATLAB will find torch. |
Thank you, Aaron, I think I am getting very close !
So "/bin/bash: th: command not found" is the main issue. Thank you so much Aaron |
You should not be getting that error on line 45. Have you modified the code much? |
yes, sorry, the line numbers changed a little bit since I commented out the previous system calls. My first system call is :
|
You are missing a period and space before the path to
or
That should do it. Make sure you make a similar change to the other call to |
It seems that my previous addressing was correct! Since with this new ones I get more errors:
same error with the 'dot' in the beginning. |
Please be very careful when copying and making changes. You are now missing a space after source. |
Yes, Aaron, that was the space mistake.
So I guess I have to install fb.python as well, But do you have any source for installing it? |
Yes, first you need to install thpp. I recommend installing it from 1adrianb/thpp as it has some fixes for newer versions of Torch. Clone this repo and install with:
Then clone fblualib. Make sure you have glog, boost and python2.7 development packages installed. I haven't used a Mac for a few years but I think you can do this with MacPorts or Brew.
|
Had such a nightmare trying to install thpp and fb.python, so glad I found this! Might I recommend putting a link to it on the README page? It's a mess going through the different posts of different compiler errors. Really excited to try this out, looks super cool! |
@cpdurham Hey thanks! Will do. |
@cpdurham were you able to install fb.python? |
I tried many thing, didn't work. I finally found this : But still running the MATLAB file, I got the same error:
Please share your experience if you suceed. |
Hi @monabiyan, I am beginning to wonder if this whole thing would be much easier if you were to find a Linux machine knocking around. Do you know if there is one available for you to use? Preferably with a GPU, but if not I can give you a CPU only version of the code/model. |
@AaronJackson Yeah, you are right! |
@monabiyan Our group have a Mac which is shared but it has been used quite a bit recently so I haven't been able to get it running. When it becomes free, I will take a proper look and add some details to the readme file if I can get it working. |
@AaronJackson Thank you so much |
@monabiyan I followed this for dlib: https://www.learnopencv.com/install-dlib-on-ubuntu/, running matlab inside the workon environment. I installed fblualib using that special fork of thpp for the compatibility with the current version of torch https://github.com/1adrianb/thpp. I recommend only installing fb-python https://github.com/facebook/fblualib/blob/master/fblualib/python/README.md. Avoid installing the entire library as that will fail with the thpp requirement, also requiring a metric ton of other bullshit (I tried this). I did all of this and got it working on ubuntu 16.04. Also, just in case, octave did not work edit: also some of the python code running through lua gave a seg fault (no message), I recommend just running the python code directly and see what messages crop up. One of them was because my fresh install didnt have python-tk (or matplotlib for that matter, doh), i think i did an apt-get install for python-tk, don't quite remember. |
I'd love to see this evolve into a Docker image. @AaronJackson is there anything particular that MatLab offers, or could it be ported to octave/scipy/numpy? |
I was actually playing with it in Octave today. From what I can tell there is a minor issue with the Edit: and if that happens I'll try and build a docker image. |
I tried to run the project on Mac OS with XCode 8 and gcc 6.2. However, I failed to compile and install
It is quite frustrating. If any of u have successfully run this project on Mac OS. Please help! |
Unfortunately I am unable to offer any suggestions other than to use Linux, which is free. Install it to an external hard drive or something. |
I have figured that out. The solution is to compile
and add this
to file
|
Hello, AaronJackson, thank you for your brilliant work. Could you please send me a CPU only version of code since I don't have a cuda supported GPU. I got the following error when I run the run.sh in Centos7:/home/me/torch/install/bin/luajit: /home/me/torch/install/share/lua/5.1/torch/File.lua:343: unknown Torch class <torch.CudaTensor>
|
There's isn't a CPU only version because the landmark detection network uses nngraph. |
Hi
I am using mac , and have installed torch7 , MATLAB and NVIDIA GPU (CUDA 8.0) . When I run the run.m by MATLAB, I get the following results:
--------------------------------
~/vrn/face-alignment ~/vrn
/bin/bash: th: command not found
~/vrn
Landmarks extracted successfully.
/bin/bash: th: command not found
Error using run (line 70)
Failed to run Torch7 script.
-----------------------------------
Looks like 'th' and CUDA works properly since it responds "Landmarks extracted successfully." but the second system call in the code gives this error. No idea what is this error from.
I greatly appreciate your help in advance!
The text was updated successfully, but these errors were encountered: