google-research / multinerf

A Code Release for Mip-NeRF 360, Ref-NeRF, and RawNeRF
Apache License 2.0
3.57k stars 338 forks source link

Project dependencies may have API risk issues #68

Open PyDeps opened 1 year ago

PyDeps commented 1 year ago

Hi, In multinerf, inappropriate dependency versioning constraints can cause risks.

Below are the dependencies and version constraints that the project is using

numpy
jax
jaxlib
flax
opencv-python
Pillow
tensorboard
tensorflow
gin-config
dm_pix
rawpy
mediapy

The version constraint == will introduce the risk of dependency conflicts because the scope of dependencies is too strict. The version constraint No Upper Bound and * will introduce the risk of the missing API Error because the latest version of the dependencies may remove some APIs.

After further analysis, in this project, The version constraint of dependency numpy can be changed to >=1.8.0,<=1.23.0rc3. The version constraint of dependency flax can be changed to >=0.3.4,<=0.6.0. The version constraint of dependency Pillow can be changed to ==9.2.0. The version constraint of dependency Pillow can be changed to >=2.0.0,<=9.1.1. The version constraint of dependency gin-config can be changed to >=0.2.1,<=0.5.0.

The above modification suggestions can reduce the dependency conflicts as much as possible, and introduce the latest version as much as possible without calling Error in the projects.

The invocation of the current project includes all the following methods.

The calling methods from the numpy
numpy.linalg.inv
numpy.linalg.lstsq
numpy.linalg.eig
numpy.linalg.norm
numpy.linalg.det
The calling methods from the flax
flax.traverse_util.flatten_dict
flax.training.checkpoints.save_checkpoint
flax.core.FrozenDict
flax.training.train_state.TrainState.create
flax.linen.sigmoid
flax.training.checkpoints.restore_checkpoint
flax.linen.Embed
The calling methods from the Pillow
PIL.Image.open
PIL.Image.fromarray
The calling methods from the gin-config
gin.config_str
gin.add_config_file_search_path
The calling methods from the all methods
Model
numpy.copy
numpy.maximum
self.generate_ray_batch
PropMLP
internal.models.render_image
resample
image_pil._getexif.items
optax.adam
gin.config_str
numpy.linalg.norm
losses.values
tesselate_geodesic
rendering.items
jax.numpy.imag
numpy.loadtxt
internal.render.volumetric_rendering
xnp.stack.reshape
viewmatrix
internal.utils.load_img.flatten
numpy.cos
internal.utils.BatchingMethod
raws.np.stack.astype
any
numpy.median
internal.configs.load_config.render_dist_curve_fn
vis_alpha.jnp.zeros_like.vis_alpha.jnp.concatenate.reshape
internal.math.matmul
sample
fn
jax.numpy.clip.reshape
numpy.mean
f
compute_data_loss
numpy.any.append
numpy.diag.astype.append
flax.metrics.tensorboard.SummaryWriter
jax.numpy.stack
NerfMLP
pmean.update
jax.lax.psum
bilinear_upsample
jax.config.parse_flags_with_absl
collections.defaultdict
numpy.exp
numpy.min
numpy.unique
jax.lax.stop_gradient.reshape
safe_exp
internal.datasets.load_dataset
enumerate
internal.camera_utils.cast_spherical_rays
idx.str.zfill
jax.numpy.isfinite
stats_split.items
internal.utils.open_file
flax.jax_utils.unreplicate
numpy.stack
pix_to_dir
f.write
numpy.linalg.inv
numpy.log10
os.path.splitext
NeRFSceneManager
generate_ide_fn
rgb_gt.rgb_pred.mean
self._make_ray_batch
numpy.max
tree.items
predicted_normal_loss
internal.image.downsample
Model.init
distortion_loss
ValueError
float
x.reshape
random_split
jax.numpy.eye
flax.training.checkpoints.save_checkpoint
internal.stepfun.sample_intervals
internal.render.compute_alpha_weights
list
predict_density
internal.coord.integrated_pos_enc
internal.utils.dummy_rays
jax.numpy.argsort
flax.jax_utils.replicate
xnp.linspace
get_img
sph_harm_coeff
internal.models.construct_model
gin.config.external_configurable
generate_interpolated_path
weights.sum
jax.numpy.interp.jnp.vectorize
time.time
internal.render.compute_alpha_weights.reshape
xnp.sqrt
internal.coord.track_linearize
postprocess_fn
n_dot_v.jnp.minimum.w.sum
path_fn
colormap
internal.coord.construct_ray_warps
intrinsic_matrix
jax.lax.stop_gradient
bounds.min
internal.train_utils.setup_model
isinstance
jax.process_count
flax.traverse_util.flatten_dict.keys
y.x.mean
internal.coord.pos_enc
processing_fn
os.path.isdir
self.density_activation
internal.camera_utils.cast_ray_batch
open_file
lift_gaussian
jax.device_put
cc_fun
internal.ref_utils.reflect
jax.numpy.exp
internal.models.render_image.items
internal.ref_utils.generate_ide_fn
names.append
dense_layer
jax.numpy.stack.append
create_videos
jax.device_count
focus_point_fn
internal.vis.visualize_suite.items
normal_images.append
process_exif.reshape
self.net_width.dense_layer
it
print
gather_exif_value
jax.numpy.sort
ray_history.append
jax.numpy.interp.jax.vmap
load_files
compute_tesselation_weights
fn_inv
internal.utils.load_exif
config.checkpoint_dir.split
x.x.mean
numpy.load
internal.utils.listdir
mediapy.VideoWriter
bounds.max
xnp.square
xnp.arange
jax.numpy.sum
get_lr_fn
writer.add_image
time.sleep
numpy.concatenate
rgbs.weights.sum
v.weights.sum
jax.value_and_grad
absl.flags.DEFINE_multi_string
upsample_green
internal.utils.shard
convert_to_ndc
points_to_poses
xnp.minimum
interp_fn
means.reshape
numpy.arange
jax.tree_util.tree_map.type
internal.raw_utils.pixels_to_bayer_mask
flax.training.train_state.TrainState.create
concurrent.futures.ThreadPoolExecutor
internal.camera_utils.ProjectionType
pad_poses
jax.numpy.arange
xnp.diag
inner_outer
numpy.isnan
batch.disps.disp.mean
matplotlib.cm.get_cmap
os.path.basename
absl.app.run
jax.tree_util.tree_reduce
internal.stepfun.resample
key.x.split
average_pose
jax.numpy.vectorize
internal.stepfun.lossfun_outer
numpy.ceil
expected_sin
internal.utils.makedirs
z.reshape
numpy.fromiter
jax.numpy.abs
flax.metrics.tensorboard.SummaryWriter.scalar
jax.tree_util.tree_map.items
config.factor.config.factor.np.diag.astype
internal.image.mse_to_psnr
self.net_activation
numpy.diag.astype
internal.utils.Pixels
b.g.r.np.stack.astype
self._next_fn
numpy.transpose.mean
internal.stepfun.max_dilate_weights
numpy.argsort
vis_ws.append
flax.linen.Embed
fn_fwd
create_render_fn
jax.numpy.linalg.norm
jax.device_get
numpy.random.randint
jax.numpy.linspace
unpad_poses
interlevel_loss
xnp.linalg.norm
fp.read
jax.numpy.zeros
gin.configurable
batch_index
internal.utils.DataSplit
showcases.append
scipy.interpolate.splrep
xnp.array
numpy.any
jax.numpy.concatenate
extras.items
raw_density_flat.reshape
data_fn
numpy.percentile
lin_fn.jax.vmap
internal.configs.define_common_flags
internal.camera_utils.create_render_spline_path
numpy.zeros
rep.vis_rgb.jnp.tile.reshape
expectation
key.startswith
sys.path.insert
img.np.nan_to_num.np.clip.astype
metric_harness
jax.pmap
weighted_percentile
numpy.cross
os.listdir
numpy.prod
ref.reshape
jax.numpy.finfo
searchsorted
n_pred.n.jnp.sum.w.sum
img.mean.mean
getattr
numpy.linspace.mean
x.weights.sum
xnp.clip
jax.jit
flax.linen.sigmoid
xnp.sum
jax.nn.initializers.glorot_uniform
orientation_loss
numpy.array.min
y.mean
xnp.cos
jax.numpy.broadcast_to
summ_fn
metric_harness.items
numpy.linspace
internal.geopoly.generate_basis
jax.process_index
jax.nn.initializers.glorot_normal
exposures.items
jax.numpy.minimum
load_blender_posedata
jax.numpy.prod
absl.flags.DEFINE_string
jax.numpy.where
jax.numpy.sin
internal.utils.file_exists
jax.numpy.copy
get_ml_array
jax.numpy.interp
numpy.argmax
self._load_renderings
json.load.split
curve_fn
max_dilate
concurrent.futures.ThreadPoolExecutor.submit
numpy.squeeze
numpy.matmul.append
data_loss.lossmult.sum
jax.numpy.diff
len
process_exif
numpy.transpose
numpy.set_printoptions
_compute_residual_and_jacobian
exposure_scaling_offsets
loss_grad_fn
safe_trig_helper
fn.jax.vmap.reshape
os.path.join.startswith
x.mean
numpy.reshape
jax.numpy.full_like
self.roughness_activation
rep.vis_alpha.jnp.tile.reshape
pmean.append
self._queue.get
xnp.stack
numpy.linalg.eig
internal.configs.load_config
glob.glob
render_fn
mat_vec_mul
next
internal.utils.save_img_u8
internal.camera_utils.intrinsic_matrix
xnp.where
jax.numpy.reshape
numpy.array.append
get_positions
dict
get_pixtocam
weight_to_pdf
numpy.zeros_like
numpy.linalg.det
rot_mat.transpose
batch.disps.disparity.mean
jax.numpy.cumsum
vis_rgb.jnp.zeros_like.vis_rgb.jnp.concatenate.reshape
x.jax.lax.psum.jax.pmap
tree_sum
numpy.sin
copy.copy
load_raw_images
v.n.sum
metrics.append
avg_stats.items.items
broadcast_scalar
gc.collect
repr
args_flat.jnp.interp.jax.vmap.reshape
numpy.uint8.img.np.nan_to_num.np.clip.astype.Image.fromarray.save
r.reshape
rescale_poses
compute_sq_dist
xnp.percentile
internal.utils.Rays
numpy.sum
rawpy.imread
gaussian_fn
open_fn
visualize_cmap
matmul
visualize_rays
jax.numpy.mod
gc.disable
jax.numpy.max
itertools.product
clip_gradients
xnp.diff
_radial_and_tangential_undistort
jax.numpy.mean.items
PIL.Image.fromarray
type
xnp.maximum
internal.raw_utils.load_raw_dataset
self.start
depthmap.np.nan_to_num.astype
pixel_coordinates
im.tvec.reshape
pmean
flax.training.checkpoints.restore_checkpoint
internal.math.safe_sin
jax.numpy.log
xnp.meshgrid
numpy.log
numpy.linalg.lstsq
lr_fn
disp_images.append
rgb2camwb.sum
frame.split
jax.tree_util.tree_map
jax.lax.pmean
jax.numpy.min
os.makedirs
internal.stepfun.lossfun_distortion
numpy.random.seed
stats_buffer.append
integrate_weights
self.ssim_fn
fp.read.decode
internal.utils.load_img
jax.nn.initializers.he_normal
jax.numpy.pad
interpolate_1d
internal.ref_utils.l2_normalize
integrate_weights.reshape
self.net_width_viewdirs.dense_layer
vis_rgb.jnp.zeros_like.vis_rgb.jnp.concatenate.reshape.reshape
xnp.broadcast_to
tree_norm
queue.Queue
json.load.get
mlp
int
save_fn
t.reshape
self.dir_enc_fn
xnp.moveaxis
jax.numpy.iinfo
self.num_rgb_channels.dense_layer
xnp.roll
numpy.clip
find_interval
create_train_step
internal.image.linear_to_srgb
renderings.append
flax.metrics.tensorboard.SummaryWriter.text
xnp.transpose
internal.camera_utils.pad_poses
jax.numpy.concatenate.append
vis_rgb.jnp.zeros_like.vis_rgb.jnp.concatenate.reshape.append
pad_poses.mean
img.mean.reshape
os.path.exists
numpy.round
flax.metrics.tensorboard.SummaryWriter.histogram
max
self.weight_init.jax.nn.initializers.getattr
chunks.append
jax.numpy.tanh
origins.mt_m.mean
internal.camera_utils.generate_ellipse_path
covs.reshape
matte
jax.local_device_count
load_fn
mse_to_psnr
glo_vecs
jax.random.normal
jax.numpy.real
train_pstep
integrated_dir_enc_fn
metrics_cc.append
idx_to_str
jax.linearize
gin.config_scope
xnp.sin
mlp.items
async_futures.append
testraw.astype.astype
internal.camera_utils.transform_poses_pca
internal.camera_utils.pixel_coordinates
tree_norm_sq
name_fn
ml_list.append
visualize_coord_mod
jax.nn.initializers.he_uniform
jax.lax.all_gather
numpy.minimum
super.__init__
k.startswith
mats.reshape.reshape
internal.camera_utils.generate_spiral_path
bias
Rays
PIL.Image.open._getexif
jax.numpy.array.append
self._queue.put
jax.numpy.ones
generalized_binomial_coeff
jax.host_id
jax.vmap
bilinear_demosaic_jax
numpy.array
str
internal.stepfun.sample
min
gin.parse_config_files_and_bindings
normalize
jax.random.PRNGKey
poses_to_points
jax.numpy.ones_like.sum
numpy.abs
pdf_to_weight
one_eps.one_eps.normals_gt.normals.sum.jnp.clip.jnp.arccos.weights.sum
pixels_to_rays
jax.numpy.zeros_like
numpy.float32.depthmap.np.nan_to_num.astype.Image.fromarray.save
jax.numpy.sqrt
range
file_exists
assoc_legendre_coeff
super
internal.utils.unshard
jax.numpy.mean
hasattr
interp
numpy.nan_to_num
sorted
jax.nn.softmax
round
state.apply_gradients
best_fit_affine
numpy.stack.append
internal.utils.save_img_f32
PIL.Image.open
jax.numpy.tile
xnp.linalg.inv
jax.random.permutation
jax.numpy.zeros.astype
numpy.eye
postprocess_raw
crop_fn
tuple
self.load_cameras
jax.numpy.clip
fn.jax.vmap
vis_rs.append
zip
flax.jax_utils.prefetch_to_device
numpy.math.factorial
self.rgb_activation
concurrent.futures.ThreadPoolExecutor.shutdown
self.load_images
scipy.interpolate.splprep
jax.nn.initializers.he_normal.items
internal.utils.Batch
jax.numpy.logical_xor
internal.vis.visualize_suite
colmap_dir.NeRFSceneManager.process
generate_interpolated_path.append
jax.random.PRNGKey.startswith
internal.ref_utils.compute_weighted_mae
flax.metrics.tensorboard.SummaryWriter.image
jax.numpy.stack.items
jax.random.uniform
future.result
jax.numpy.isnan
zup.reshape.reshape
open
w.reshape.reshape
xnp.zeros_like
numpy.broadcast_to
internal.datasets.load_dataset.generate_ray_batch
create_optimizer
numpy.triu
x.reshape.reshape
numpy.tan
invert_cdf
Config
load_raw_exif
model.apply
internal.camera_utils.recenter_poses
resid_sq.lossmult.sum
os.path.join
json.load
jax.numpy.matmul
cv2.decomposeProjectionMatrix
numpy.sqrt
fp.read.decode.splitlines
np_to_jax
im.R
config.dataset_loader.dataset_dict
jax.numpy.array
jax.random.split
raw_grad_density_flat.reshape
bilinear_demosaic
jax.numpy.max.items
functools.partial
is_unclipped
jax.numpy.nan_to_num
vis_alpha.jnp.zeros_like.vis_alpha.jnp.concatenate.reshape.reshape
internal.image.MetricHarness
jax.numpy.all
scipy.interpolate.splev
internal.camera_utils.get_pixtocam
self.bottleneck_width.dense_layer
self.pixtocams.reshape
render_times.append
cams.append
numpy.diag
flax.traverse_util.flatten_dict
join
log_lerp
numpy.sort
flax.core.FrozenDict
xnp.ones_like
numpy.argwhere
jax.numpy.ones_like
internal.render.cast_rays
internal.stepfun.weighted_percentile
xnp.copy
numpy.diag.mean
summarize_tree
gin.add_config_file_search_path
numpy.matmul
numpy.sign
x_flat.reshape
s_to_t
jax.numpy.maximum
jax.numpy.arccos
normals_gt.normals.sum
reshape_quads
xnp.abs
numpy.array.reshape
internal.coord.lift_and_diagonalize
xnp.finfo
vis_alpha.jnp.zeros_like.vis_alpha.jnp.concatenate.reshape.append
internal.utils.isdir
predict_density_and_grad_fn
jax.numpy.take_along_axis

@developer Could please help me check this issue? May I pull a request to fix it? Thank you very much.