Closed YangZiz closed 1 week ago
Could you provide more details? such as your file structures, your commands and complete error information.
你能否介绍有关情况?例如您的文件结构、您的命令和完整的错误信息。
The command I am using is:python run.py --img /yy/code/TeethDreamer/test_image/generate/oral_upper_cond_000_000_000_000.png --cpu 4 --dir /yy/code/TeethDreamer/test_image/reconstruction/ --normal --rembg
and the file structure is: oral 0.jpg 1.jpg ... teeth oral_upper 000.png 001.png ... oral_lower generate oral_lower_cond_000_000_000_000.png oral_upper_cond_000_000_000_000.png
And, my complete error message is: (newTeethDreamer) jianjian08:41 下午1999:/yy/code/TeethDreamer/instant-nsr-pl$python run.py --img /yy/code/TeethDreamer/test_image/generate/oral_upper_cond_000_000_000_000.png --cpu 4 --dir /yy/code/TeethDreamer/test_image/reconstruction/ --normal --rembg Downloading data from 'https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx' to file '/home/jianjian/.u2net/u2net.onnx'. Traceback (most recent call last): File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/connectionpool.py", line 803, in urlopen **response_kw, File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/connectionpool.py", line 492, in _make_request raise new_e File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/connectionpool.py", line 468, in _make_request self._validate_conn(conn) File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/connectionpool.py", line 1097, in _validate_conn conn.connect() File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/connection.py", line 658, in connect assert_fingerprint=self.assert_fingerprint, File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/connection.py", line 793, in _ssl_wrap_socket_and_match_hostname tls_in_tls=tls_intls, File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/util/ssl.py", line 471, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, serverhostname) File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/util/ssl.py", line 515, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/ssl.py", line 423, in wrap_socket session=session File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/ssl.py", line 870, in _create self.do_handshake() File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/ssl.py", line 1139, in do_handshake self._sslobj.do_handshake() OSError: [Errno 0] Error
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/requests/adapters.py", line 497, in send chunked=chunked, File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/connectionpool.py", line 846, in urlopen method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2] File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/util/retry.py", line 470, in increment raise reraise(type(error), error, _stacktrace) File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/util/util.py", line 38, in reraise raise value.with_traceback(tb) File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/connectionpool.py", line 803, in urlopen **response_kw, File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/connectionpool.py", line 492, in _make_request raise new_e File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/connectionpool.py", line 468, in _make_request self._validate_conn(conn) File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/connectionpool.py", line 1097, in _validate_conn conn.connect() File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/connection.py", line 658, in connect assert_fingerprint=self.assert_fingerprint, File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/connection.py", line 793, in _ssl_wrap_socket_and_match_hostname tls_in_tls=tls_intls, File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/util/ssl.py", line 471, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, serverhostname) File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/site-packages/urllib3/util/ssl.py", line 515, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/ssl.py", line 423, in wrap_socket session=session File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/ssl.py", line 870, in _create self.do_handshake() File "/home/jianjian/anaconda3/envs/newTeethDreamer/lib/python3.7/ssl.py", line 1139, in do_handshake self._sslobj.do_handshake() urllib3.exceptions.ProtocolError: ('Connection aborted.', OSError(0, 'Error'))
During handling of the above exception, another exception occurred:
Trainer(limit_train_batches=1.0)
was configured so 100% of the batches per epoch will be used..
Trainer(limit_val_batches=1)
was configured so 1 batch will be used.
[rank: 0] Global seed set to 42
Initializing distributed: GLOBAL_RANK: 0, MEMBER: 1/1Traceback (most recent call last):
File "launch.py", line 129, in
Looking forward to your reply, thank you!
In the file run.py, there are two commands for the dataset preparation and teeth reconstruction. In you case, the problem is likely occur in the former. And I think there are some errors in downloading data from 'https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx' to file '/home/jianjian/.u2net/u2net.onnx' during the initialization of rembg package. You can run the command in the line 24 of run.py to prepare the dataset for teeth reconstruction separately and check if rembg package cannot initialize. If you cannot download models online, I recommand you to download offline manually and you can find some instructions in the github page of rembg.
Thank you! My problem has been solved.
I followed your tutorial and did everything except for skipping the fifth step of foreground segmentation (although I don't think the fifth step is related to this error), so where did this file come from? Or is it customized?