bughelp wanted
Repository metrics
- Stars
- (4,021 stars)
- PR merge metrics
- (Avg merge 3d 11h) (161 merged PRs in 30d)
Description
Instructions
I tried to check for finding duplicate images on local dataset. However, I am facing the following issue.
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10
- FiftyOne installed from (pip or source): pip3 install fiftyone
- FiftyOne version (run
fiftyone --version): default - Python version: python 3.9
Commands to reproduce
import fiftyone as fo
dataset = fo.Dataset.from_images_dir("D:\\data\\similar\\class1", recursive=True, name="sim-images")
session = fo.launch_app(dataset)
import fiftyone.brain as fob
fob.compute_uniqueness(dataset)
Describe the problem
It looks like there is some problem with model loading.
Loading uniqueness model...
Downloading model from Google Drive ID '1SIO9XreK0w1ja4EuhBWcR10CnWxCOsom'...
100% |██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100.6Mb/100.6Mb [1.4s elapsed, 0s remaining, 85.2Mb/s]
Uncaught exception
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<frozen fiftyone.brain>", line 146, in compute_uniqueness
File "<frozen fiftyone.brain.internal.core.uniqueness>", line 67, in compute_uniqueness
File "<frozen fiftyone.brain.internal.core.uniqueness>", line 88, in _load_model
File "<frozen fiftyone.brain.internal.models>", line 183, in load_model
File "C:\Users\soura\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\fiftyone\core\models.py", line 472, in load_model
return config.build()
File "C:\Users\soura\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\eta\core\learning.py", line 296, in build
return self._model_cls(self.config)
File "C:\Users\soura\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\fiftyone\utils\torch.py", line 535, in __init__
self._model = self._load_model(config)
File "C:\Users\soura\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\fiftyone\utils\torch.py", line 730, in _load_model
self._load_state_dict(model, config)
File "<frozen fiftyone.brain.internal.models.torch>", line 44, in _load_state_dict
File "C:\Users\soura\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\torch\nn\modules\module.py", line 1051, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Network:
Missing key(s) in state_dict: "prep\conv.weight", "prep\bn.weight", "prep\bn.bias", "prep\bn.running_mean", "prep\bn.running_var", "layer1\conv.weight", "layer1\bn.weight", "layer1\bn.bias", "layer1\bn.running_mean", "layer1\bn.running_var", "layer1\residual\res1\conv.weight", "layer1\residual\res1\bn.weight", "layer1\residual\res1\bn.bias", "layer1\residual\res1\bn.running_mean", "layer1\residual\res1\bn.running_var", "layer1\residual\res2\conv.weight", "layer1\residual\res2\bn.weight", "layer1\residual\res2\bn.bias", "layer1\residual\res2\bn.running_mean", "layer1\residual\res2\bn.running_var", "layer2\conv.weight", "layer2\bn.weight", "layer2\bn.bias", "layer2\bn.running_mean", "layer2\bn.running_var", "layer3\conv.weight", "layer3\bn.weight", "layer3\bn.bias", "layer3\bn.running_mean", "layer3\bn.running_var", "layer3\residual\res1\conv.weight", "layer3\residual\res1\bn.weight", "layer3\residual\res1\bn.bias", "layer3\residual\res1\bn.running_mean", "layer3\residual\res1\bn.running_var", "layer3\residual\res2\conv.weight", "layer3\residual\res2\bn.weight", "layer3\residual\res2\bn.bias", "layer3\residual\res2\bn.running_mean", "layer3\residual\res2\bn.running_var".
Unexpected key(s) in state_dict: "prep_conv.weight", "prep_bn.weight", "prep_bn.bias", "prep_bn.running_mean", "prep_bn.running_var", "prep_bn.num_batches_tracked", "layer1_conv.weight", "layer1_bn.weight", "layer1_bn.bias", "layer1_bn.running_mean", "layer1_bn.running_var", "layer1_bn.num_batches_tracked", "layer1_residual_res1_conv.weight", "layer1_residual_res1_bn.weight", "layer1_residual_res1_bn.bias", "layer1_residual_res1_bn.running_mean", "layer1_residual_res1_bn.running_var", "layer1_residual_res1_bn.num_batches_tracked", "layer1_residual_res2_conv.weight", "layer1_residual_res2_bn.weight", "layer1_residual_res2_bn.bias", "layer1_residual_res2_bn.running_mean", "layer1_residual_res2_bn.running_var", "layer1_residual_res2_bn.num_batches_tracked", "layer2_conv.weight", "layer2_bn.weight", "layer2_bn.bias", "layer2_bn.running_mean", "layer2_bn.running_var", "layer2_bn.num_batches_tracked", "layer3_conv.weight", "layer3_bn.weight", "layer3_bn.bias", "layer3_bn.running_mean", "layer3_bn.running_var", "layer3_bn.num_batches_tracked", "layer3_residual_res1_conv.weight", "layer3_residual_res1_bn.weight", "layer3_residual_res1_bn.bias", "layer3_residual_res1_bn.running_mean", "layer3_residual_res1_bn.running_var", "layer3_residual_res1_bn.num_batches_tracked", "layer3_residual_res2_conv.weight", "layer3_residual_res2_bn.weight", "layer3_residual_res2_bn.bias", "layer3_residual_res2_bn.running_mean", "layer3_residual_res2_bn.running_var", "layer3_residual_res2_bn.num_batches_tracked".
What areas of FiftyOne does this bug affect?
-
App: FiftyOne application issue -
Core: CorefiftyonePython library issue -
Server: Fiftyone server issue
Willingness to contribute
The FiftyOne Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the FiftyOne codebase?
- Yes. I can contribute a fix for this bug independently.
- Yes. I would be willing to contribute a fix for this bug with guidance from the FiftyOne community.
- No. I cannot contribute a bug fix at this time.