cant run detection with nsfwjs
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 303
- PR merge metrics
- No merged PRs in 30d
Description
**hello,
im runing this code : nsfw-predict --saved_model_path models/nsfwjs/model.json --image_source output_frames299
i can run other models with 244 but the result are not even close to good so im trying to use nsfwjs
while everythins is ok and model is fine
the output is
2024-02-06 15:55:41.642960: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2024-02-06 15:55:41.697441: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2024-02-06 15:55:41.697839: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-02-06 15:55:42.595303: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Traceback (most recent call last):
File "/usr/local/bin/nsfw-predict", line 33, in
sys.exit(load_entry_point('nsfw-detector==1.3.0', 'console_scripts', 'nsfw-predict')())
File "/usr/local/lib/python3.8/site-packages/nsfw_detector-1.3.0-py3.8.egg/nsfw_detector/predict.py", line 114, in main
File "/usr/local/lib/python3.8/site-packages/nsfw_detector-1.3.0-py3.8.egg/nsfw_detector/predict.py", line 56, in load_model
File "/usr/local/lib/python3.8/site-packages/keras/src/saving/saving_api.py", line 238, in load_model
return legacy_sm_saving_lib.load_model(
File "/usr/local/lib/python3.8/site-packages/keras/src/utils/traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/usr/local/lib/python3.8/site-packages/h5py/_hl/files.py", line 562, in init
fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr)
File "/usr/local/lib/python3.8/site-packages/h5py/_hl/files.py", line 235, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 102, in h5py.h5f.open
OSError: Unable to synchronously open file (file signature not found)**
can someone help me out plz ? im new
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the nsfw-predict --saved_model_path models/nsfwjs/model.json --image_source output_frames299 command and follow the traceback into nsfw_detector/predict.py, especially load_model. Compare the supplied model path and format with what that entry point expects; done means the command loads the model and processes the image source without the reported file-opening error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- keras, python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100