Spaces:
Sleeping
Sleeping
camilleseab
commited on
Commit
•
e785fa3
1
Parent(s):
85f54c1
Fix opencv installation
Browse files- Dockerfile +4 -2
- environment.yml +13 -6
- notebooks/app.ipynb +7 -2
Dockerfile
CHANGED
@@ -12,10 +12,12 @@ ENV HOME=/home/user \
|
|
12 |
WORKDIR $HOME/app
|
13 |
COPY --chown=user . .
|
14 |
|
15 |
-
RUN mamba env create
|
16 |
|
17 |
EXPOSE 7860
|
18 |
WORKDIR $HOME/app
|
19 |
|
20 |
-
CMD mamba run -
|
|
|
|
|
21 |
# CMD python3 -m voila --no-browser notebooks/ --port=7860
|
|
|
12 |
WORKDIR $HOME/app
|
13 |
COPY --chown=user . .
|
14 |
|
15 |
+
RUN mamba env create -n app -f ./environment.yml
|
16 |
|
17 |
EXPOSE 7860
|
18 |
WORKDIR $HOME/app
|
19 |
|
20 |
+
CMD mamba run -n app --no-capture-output voila \
|
21 |
+
--no-browser --port=7860 --show_tracebacks=True \
|
22 |
+
notebooks/app.ipynb
|
23 |
# CMD python3 -m voila --no-browser notebooks/ --port=7860
|
environment.yml
CHANGED
@@ -1,17 +1,24 @@
|
|
1 |
name: voila
|
2 |
channels:
|
3 |
- conda-forge
|
|
|
|
|
|
|
4 |
dependencies:
|
5 |
-
-
|
|
|
|
|
6 |
- ipykernel
|
7 |
- pip
|
8 |
- ultralytics=8.0.186
|
9 |
- pillow
|
10 |
- python-dotenv
|
11 |
-
- opencv
|
12 |
-
- jupyterlab_widgets
|
13 |
- voila
|
14 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
-
- pip:
|
17 |
-
- voila-topbar
|
|
|
1 |
name: voila
|
2 |
channels:
|
3 |
- conda-forge
|
4 |
+
- fastai
|
5 |
+
- pytorch
|
6 |
+
- nvidia
|
7 |
dependencies:
|
8 |
+
# - opencv
|
9 |
+
- opencv-python-headless
|
10 |
+
- ipywidgets
|
11 |
- ipykernel
|
12 |
- pip
|
13 |
- ultralytics=8.0.186
|
14 |
- pillow
|
15 |
- python-dotenv
|
|
|
|
|
16 |
- voila
|
17 |
+
- ca-certificates
|
18 |
+
- certifi
|
19 |
+
- openssl
|
20 |
+
- pytorch
|
21 |
+
- torchvision
|
22 |
+
- pytorch-cuda=12.1
|
23 |
+
- albumentations
|
24 |
|
|
|
|
notebooks/app.ipynb
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
"\n",
|
22 |
"%matplotlib inline\n",
|
23 |
"\n",
|
24 |
-
"os.chdir('
|
25 |
"_ = load_dotenv()\n"
|
26 |
]
|
27 |
},
|
@@ -31,7 +31,12 @@
|
|
31 |
"source": [
|
32 |
"# Re-surveilling surveillance\n",
|
33 |
"\n",
|
34 |
-
"This is a demonstration of using object detection models to locate surveillance cameras in Google Street View imagery.
|
|
|
|
|
|
|
|
|
|
|
35 |
"\n",
|
36 |
"Enter a location to look up and adjust the camera parameters. After clicking the button, any cameras detected by the models will be highlighted."
|
37 |
]
|
|
|
21 |
"\n",
|
22 |
"%matplotlib inline\n",
|
23 |
"\n",
|
24 |
+
"os.chdir('..')\n",
|
25 |
"_ = load_dotenv()\n"
|
26 |
]
|
27 |
},
|
|
|
31 |
"source": [
|
32 |
"# Re-surveilling surveillance\n",
|
33 |
"\n",
|
34 |
+
"This is a demonstration of using object detection models to locate surveillance cameras in Google Street View imagery. \n",
|
35 |
+
"\n",
|
36 |
+
"There are two models:\n",
|
37 |
+
"\n",
|
38 |
+
"- **YOLO**, which runs relatively quickly but is less accurate\n",
|
39 |
+
"- **RT-DETR**, a newer model type that is slower but better at finding cameras\n",
|
40 |
"\n",
|
41 |
"Enter a location to look up and adjust the camera parameters. After clicking the button, any cameras detected by the models will be highlighted."
|
42 |
]
|