dogeplusplus commited on
Commit
f161731
·
1 Parent(s): 7165e24

Removing model file. Making setup path agnostic

Browse files

Former-commit-id: 85897dba0ca300ba52dd3b5ad43fbd3ed785d77b

Makefile CHANGED
@@ -1,8 +1,13 @@
 
 
1
  model-server: style
2
- docker run --gpus all -p 8500:8500 --mount type=bind,source=/home/albert/github/neural-style/style,target=/models/style -e MODEL_NAME=style -t tensorflow/serving:latest-gpu
3
 
4
  model-server-cpu: style
5
- docker run -p 8500:8500 --mount type=bind,source=/home/albert/github/neural-style/style,target=/models/style -e MODEL_NAME=style -t tensorflow/serving
6
 
7
  app:
8
  exec streamlit run streamlit_app.py
 
 
 
 
1
+ CURRENT_DIR = $(shell pwd)
2
+
3
  model-server: style
4
+ docker run --gpus all -p 8500:8500 --mount type=bind,source=${CURRENT_DIR}/style,target=/models/style -e MODEL_NAME=style -t tensorflow/serving:latest-gpu
5
 
6
  model-server-cpu: style
7
+ docker run -p 8500:8500 --mount type=bind,source=${CURRENT_DIR}/style,target=/models/style -e MODEL_NAME=style -t tensorflow/serving
8
 
9
  app:
10
  exec streamlit run streamlit_app.py
11
+
12
+ webcam:
13
+ exec streamlit run webcam_stream.py
README.md CHANGED
@@ -1,14 +1,16 @@
1
- ## Webcam Demo
2
  - Run `firstTimeSetup.sh`
3
  - Activate virtualenv `source venv/bin/activate`
4
- - Run streamlit webcam application `streamlit run webcam_stream.py`
 
 
 
5
 
6
 
7
  ## Image Demo
8
- - Run `firstTimeSetup.sh`
9
- - Activate virtualenv `source venv/bin/activate`
10
- - Pull tensorflow serving docker image and start tensorflow model server `make model-server`
11
- - In separate terminal call `make app`
12
 
13
 
14
  ## Dependencies
@@ -17,8 +19,4 @@
17
  - Docker
18
  - Nvidia-docker
19
  - tensorflow/serving:latest-gpu image
20
- - Go
21
- - gocv
22
- - tensorflow and tensorflow/serving repositories (for golang protobufs)
23
- - golang protobuf library
24
- - protobuf compiler
 
1
+ ## Setup for both
2
  - Run `firstTimeSetup.sh`
3
  - Activate virtualenv `source venv/bin/activate`
4
+ - Download style transfer model `python download_model.py`
5
+
6
+ ## Webcam Demo
7
+ - Run streamlit webcam application inside virtualenv `make webcam`
8
 
9
 
10
  ## Image Demo
11
+ - Pull tensorflow serving docker image and start tensorflow model server `make model-server-cpu`
12
+ - If you want to use GPU instead and have `nvidia-docker` then call `make model-server`
13
+ - In separate terminal call in virtualenv `make app`
 
14
 
15
 
16
  ## Dependencies
 
19
  - Docker
20
  - Nvidia-docker
21
  - tensorflow/serving:latest-gpu image
22
+ - tensorflow and tensorflow/serving repositories (for golang protobufs)
 
 
 
 
style/1/saved_model.pb DELETED
Binary file (1.78 MB)
 
style/1/variables/variables.data-00000-of-00001.REMOVED.git-id DELETED
@@ -1 +0,0 @@
1
- 32c1044a28bd76fc7aec2d67c9bfb365b351422e
 
 
style/1/variables/variables.index DELETED
Binary file (30.2 kB)
 
webcam_stream.py CHANGED
@@ -80,7 +80,7 @@ def main():
80
  frame_rate = st.text(f'Frames per second: 0')
81
 
82
  if webcam_flag:
83
- video_capture = WebcamVideoStream('http://192.168.0.10:4747/video')
84
  start = time.time()
85
  total_frames = 0
86
  try:
 
80
  frame_rate = st.text(f'Frames per second: 0')
81
 
82
  if webcam_flag:
83
+ video_capture = WebcamVideoStream(0)
84
  start = time.time()
85
  total_frames = 0
86
  try: