hassiahk commited on
Commit
aa0fcc8
1 Parent(s): 92ffbc0

Change resize factor back to 2

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -18,7 +18,7 @@ with open("config.json") as f:
18
  MODEL_DIR = "models"
19
 
20
  SCENES_LIST = ["Mic", "Chair", "Lego", "Drums", "Ship", "Hotdog"]
21
- random_index = random.randint(0, len(SCENES_LIST) - 1)
22
 
23
 
24
  def select_model(obj_select):
@@ -94,7 +94,7 @@ st.markdown(
94
  )
95
 
96
 
97
- obj_select = st.selectbox("Select a Scene", SCENES_LIST, index=random_index)
98
  DIET_NERF_MODEL_NAME, DIET_NERF_FILE_ID, NERF_MODEL_NAME, NERF_FILE_ID = select_model(obj_select)
99
 
100
 
@@ -150,7 +150,7 @@ with st.spinner("Rendering view..."):
150
  dn_pred_color, _ = render_predict_from_pose(diet_nerf_state, theta, phi, radius)
151
  dn_im = predict_to_image(dn_pred_color)
152
  dn_w, _ = dn_im.size
153
- dn_new_w = int(1.5 * dn_w)
154
  dn_im = dn_im.resize(size=(dn_new_w, dn_new_w))
155
 
156
  # n_pred_color, _ = render_predict_from_pose(nerf_state, theta, phi, radius)
 
18
  MODEL_DIR = "models"
19
 
20
  SCENES_LIST = ["Mic", "Chair", "Lego", "Drums", "Ship", "Hotdog"]
21
+ # random_index = random.randint(0, len(SCENES_LIST) - 1)
22
 
23
 
24
  def select_model(obj_select):
 
94
  )
95
 
96
 
97
+ obj_select = st.selectbox("Select a Scene", SCENES_LIST, index=0)
98
  DIET_NERF_MODEL_NAME, DIET_NERF_FILE_ID, NERF_MODEL_NAME, NERF_FILE_ID = select_model(obj_select)
99
 
100
 
 
150
  dn_pred_color, _ = render_predict_from_pose(diet_nerf_state, theta, phi, radius)
151
  dn_im = predict_to_image(dn_pred_color)
152
  dn_w, _ = dn_im.size
153
+ dn_new_w = int(2 * dn_w)
154
  dn_im = dn_im.resize(size=(dn_new_w, dn_new_w))
155
 
156
  # n_pred_color, _ = render_predict_from_pose(nerf_state, theta, phi, radius)