Platform: Paperspace and Gradient ✅

I don’t have edit permission on Wikis yet, but the “Tutorial” link is broken - needs changing to https://course.fast.ai/start_gradient.html

Hi,
I am using Paperspace Gradient and for a project I wanted a live camera feed. To this I imported opencv.
But I was unable to access the camera of my laptop. I tried using the VideoCapture, but cap.isOpened() is False everytime even after using cap.open() . I even tried to pass -1 as argument to cv2.VideoCapture(), but it didn’t work too. The code is given below
I think it’s because notebook is not running on my machine but rather a remote server.
So can anyone suggest me how to get an access to live camera feed?
I would like to implement it for the web app as well as Android app.

Thanks! :slightly_smiling_face:

import cv2
cap = cv2.VideoCapture(0)
i=0
cap.open(0)
print(cap.isOpened())
while(cap.isOpened()):
    ret, frame = cap.read()
    
    if ret == False:
        break
    cv2.imwrite('/notebooks/storage/Handwash_project/jang'+str(i)+'.jpg',frame)
    i+=1

cap.release()
cv2.destroyAllWindows()
1 Like

Anyone from outside of the US signed up for Paperspace when I try to upgrade I get a ZIP code error. I cant see on the site how you sign up from outside the US.

Missing course folder in fresh fastai container.

I am able to create and provision a notebook, and pip upgrade fastai following the fastai instructions.
However I cannot ‘cd’ into the course folder because there isn’t one. There is only ‘datasets’ and ‘storage’. Am I missing a step?

I know you need a public IP to do a SCP for large files, but I can’t figure out how to buy the public IP address for $3 a month.

253704820_421454259478339_6819666038852386524_n
I face this problem when starting a new paperspace gradient notebook. Can anyone help me to fix this issue?