0

I have been trying to run an openpose model on colab but havent been able to do so because Colab doesn't recognise the directory. Screenshot of code

I have provided the code screenshot in this message, any help or direction will be highly appreciated!

Edit 1: A modification from the first answer

code:

!cd openpose && ./build/examples/openpose/openpose.bin -image_dir /drive/My\ Drive/research_project/Fall\ Detection/$category/testdata/video$video  --render_pose 0 --disable_blending -keypoint_scale 3 --display 0 -write_json /drive/My\ Drive/research_project/Fall\ Detection/$category/jsondata/video$video

output:

    Error:
           Folder /drive/My Drive/research_project/Fall Detection/Coffee_room/testdata/video0/ does not exist.
sv176
  • 49
  • 1
  • 5

2 Answers2

0

I believe you need to remove the '..', as you are already in the '/content' folder from the os.chdir('/content') command

If that's not it, you also have a missing '/research project' after '/My Drive' in the line before the last

CowKeyMan
  • 133
  • 1
  • 8
  • I still dont seem to be getting the correct output .I will add the code for the second last line, and its output for you to have a look at. – sv176 Feb 09 '21 at 21:51
  • As a debugging move, why not try printing the current working directory? Both by doing !ls (Not sure if this works, but worth a shot) and by doing print(os.getcwd()). First of all you can make sure that they are the same, and second you would be able to know of your current working direcrory so you can move from there. Both of these you would need to do right before the command which is giving you the error. Another thing you might want to try is adding /content before /drive – CowKeyMan Feb 10 '21 at 21:21
0

with the %cd operation you already moved yourself to [...]/Coffee_room/testdata, so when you try and os.chdir command, it throws an error. At least I think so, the screenshot doesn't let me copy the code to try and recreate the same situation, so it's a bit hard

Try to put your code in the right format inside the question like this

print('Hello, this is my code')
Caerwin
  • 51
  • 11