Commit c85e0fde authored by 吴升宇's avatar 吴升宇

update demo

parent 1127bdd3
...@@ -64,17 +64,21 @@ def main(): ...@@ -64,17 +64,21 @@ def main():
min_image_size=args.min_image_size, min_image_size=args.min_image_size,
) )
cam = cv2.VideoCapture(0) img = cv2.imread()
while True:
start_time = time.time()
ret_val, img = cam.read()
composite = coco_demo.run_on_opencv_image(img) composite = coco_demo.run_on_opencv_image(img)
print("Time: {:.2f} s / img".format(time.time() - start_time)) cv2.imwrite('abc.jpg', composite)
cv2.imshow("COCO detections", composite) # cam = cv2.VideoCapture(0)
if cv2.waitKey(1) == 27: # while True:
break # esc to quit # start_time = time.time()
cv2.destroyAllWindows() # ret_val, img = cam.read()
# composite = coco_demo.run_on_opencv_image(img)
# print("Time: {:.2f} s / img".format(time.time() - start_time))
# cv2.imshow("COCO detections", composite)
# if cv2.waitKey(1) == 27:
# break # esc to quit
# cv2.destroyAllWindows()
if __name__ == "__main__": if __name__ == "__main__":
main() main()
...@@ -29,11 +29,14 @@ ENV PATH=$CONDA_PREFIX/bin:$PATH ...@@ -29,11 +29,14 @@ ENV PATH=$CONDA_PREFIX/bin:$PATH
ENV CONDA_AUTO_UPDATE_CONDA=false ENV CONDA_AUTO_UPDATE_CONDA=false
RUN conda install -y ipython RUN conda install -y ipython
RUN pip install ninja yacs cython matplotlib opencv-python tqdm RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple ninja yacs cython matplotlib opencv-python tqdm
# Install PyTorch 1.0 Nightly # Install PyTorch 1.0 Nightly
ARG CUDA ARG CUDA
RUN conda install pytorch-nightly cudatoolkit=${CUDA} -c pytorch \ RUN conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/ \
&& conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/ \
&& conda config --set show_channel_urls yes \
&& conda install pytorch-nightly cudatoolkit=${CUDA} -c pytorch \
&& conda clean -ya && conda clean -ya
# Install TorchVision master # Install TorchVision master
......
apiVersion: v1
kind: Pod
metadata:
name: myapp-pod
namespace: fashionbase
labels:
app: myapp
spec:
containers:
- name: myapp-container
image: registry.cn-beijing.aliyuncs.com/gm-ai/fashionbase_test
imagePullPolicy: Always
dnsPolicy: ClusterFirst
imagePullSecrets:
- name: gm-secret
serviceAccount: default
serviceAccountName: default
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment