Skip to content

Commit 7696211

Browse files
committed
polish some issue: 1. install script; 2. fox; 3. remove useless dep; 4. imp dataset error msg. 5 better setup
1 parent 013df00 commit 7696211

File tree

8 files changed

+52
-30
lines changed

8 files changed

+52
-30
lines changed

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,9 @@ JNeRF is a benchmark toolkit and can be updated frequently, so installing in edi
3232
Thus any modifications made to JNeRF will take effect without reinstallation.
3333

3434
```shell
35-
sudo apt-get install tcl-dev tk-dev python3-tk
3635
git clone https://github.com/Jittor/JNeRF
3736
cd JNeRF
38-
python3.x -m pip install -r requirements.txt
39-
cd python
40-
python3.x -m pip install -e .
37+
python3.x -m pip install --user -e .
4138
```
4239
If you have any installation problems for Jittor, please refer to [Jittor](https://github.com/Jittor/jittor)
4340

@@ -97,6 +94,19 @@ python tools/extract_mesh.py --config-file ./projects/ngp/configs/ngp_base.py --
9794
### Running other models
9895

9996
Instructions of how to running other models are put in the contrib folder.
97+
```
98+
contrib/
99+
|---mipnerf/
100+
|---pixelnerf/
101+
|---plenoxel/
102+
```
103+
104+
### Running fox dataset
105+
106+
run builtin fox dataset:
107+
```
108+
python3.x ./tools/run_net.py --config ./projects/ngp/configs/ngp_fox.py
109+
```
100110

101111
## Performance
102112

python/jnerf/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
from . import utils
77

88
# version must use ' instead of "
9-
__version__ = '0.1.0.0'
10-
9+
__version__ = '0.1.1.0'
10+
from jittor_utils import LOG
11+
LOG.i("JNeRF version ", __version__)

python/jnerf/dataset/dataset.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ def load_data(self,root_dir=None):
8484
else:
8585
json_data['frames']+=data['frames']
8686

87+
assert json_data is not None, f"dataset is not found at {root_dir}"
8788
## init set scale & offset
8889
if 'h' in json_data:
8990
self.H=int(json_data['h'])

python/jnerf/dataset/neus_dataset.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import numpy as np
55
import os
66
from glob import glob
7-
from icecream import ic
87
from scipy.spatial.transform import Rotation as Rot
98
from scipy.spatial.transform import Slerp
109

python/jnerf/models/samplers/neus_render/renderer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import numpy as np
55
import logging
66
import mcubes
7-
from icecream import ic
87

98
from jnerf.utils.config import get_cfg
109
from jnerf.utils.registry import SAMPLERS

python/jnerf/runner/neus_runner.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
import trimesh
88

99
from shutil import copyfile
10-
from icecream import ic
1110
from tqdm import tqdm
12-
from pyhocon import ConfigFactory
1311
from jnerf.dataset.neus_dataset import NeuSDataset
1412
from jnerf.models.networks.neus_network import NeuS
1513
from jnerf.models.samplers.neus_render.renderer import NeuSRenderer

python/setup.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

setup.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
from setuptools import find_packages, setup
2+
import os
3+
import sys
4+
5+
path = os.path.dirname(__file__)
6+
os.chdir(path)
7+
with open("./python/jnerf/__init__.py", "r") as f:
8+
src = f.read()
9+
version = src.split("__version__")[1].split("'")[1]
10+
print("setup jnerf version", version)
11+
12+
setup(
13+
name="jnerf",
14+
version=version,
15+
description="NeRF benchmark based on Jittor",
16+
author="jnerf",
17+
url="https://github.com/Jittor/JNeRF",
18+
packages=["jnerf"],
19+
package_dir={'': 'python'},
20+
package_data={'': [ "*"+"/*"*i for i in range(20)]},
21+
install_requires=[
22+
"jittor>=1.3.5.25",
23+
"numpy",
24+
"tqdm",
25+
"opencv-python",
26+
"Pillow",
27+
"imageio",
28+
"pyyaml",
29+
"PyMCubes",
30+
"trimesh",
31+
"open3d"
32+
]
33+
)
34+

0 commit comments

Comments
 (0)