Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing "voc0712"in demo.py model = SSD300( to 'watercolor_dt_ssd300' #46

Open
Twenkid opened this issue Oct 3, 2024 · 1 comment
Open

Comments

@Twenkid
Copy link

Twenkid commented Oct 3, 2024

In order to run one of the demos I found that a line in demo.py had to be changed from voc0712 to the name of the model I used: watercolor_dt_ssd300.

model = SSD300(
n_fg_class=len(voc_bbox_label_names), pretrained_model='watercolor_dt_ssd300') #voc0712')

It produced a correct box. With the original voc0712 it was failing to load voc0712 (I don't know why it has to since an URL is given), I guess the server is not working anymore:

Downloading ...
From: https://chainercv-models.preferred.jp/ssd300_voc0712_converted_2017_06_06.npz
To: /root/.chainer/dataset/_dl_cache/7580b6888d3f7742a1b531234009c0b0
Traceback (most recent call last):
  File "/usr/lib/python3.10/urllib/request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/usr/lib/python3.10/http/client.py", line 1283, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1329, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
    self.send(msg)
  File "/usr/lib/python3.10/http/client.py", line 976, in send
    self.connect()
  File "/usr/lib/python3.10/http/client.py", line 1448, in connect
    super().connect()
  File "/usr/lib/python3.10/http/client.py", line 942, in connect
    self.sock = self._create_connection(
  File "/usr/lib/python3.10/socket.py", line 824, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

python demo.py input/watercolor_142090457.jpg output.jpg --gpu 0 --load models/watercolor_dt_pl_ssd300

(I actually used it without --gpu on a CPU session in Colab)

However with dt_ssd300:
python demo.py input/watercolor_142090457.jpg output.jpg --gpu 0 --load models/watercolor_dt_ssd300

Now that I read the whole readme.md, I see that pl stands for pseudo labeling, I don't know is it a problem and haven't tried the right way, that could be another session.

https://github.com/Twenkid/cross-domain-detection

@Twenkid
Copy link
Author

Twenkid commented Oct 3, 2024

I created a pull request with a required --load (but not tested for typos)
#47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant