GithubHelp home page GithubHelp logo

nacayu / crfnet_tensorflow2.4.1 Goto Github PK

View Code? Open in Web Editor NEW
32.0 32.0 4.0 6.34 MB

Reproduce CRFNet official implementation on windows10, tensorflow2.4.1

License: Other

Python 99.54% Cython 0.46%
deep-learning keras neural-network object-detection tensorflow

crfnet_tensorflow2.4.1's Introduction

Dusai's GitHub stats

crfnet_tensorflow2.4.1's People

Contributors

nacayu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

crfnet_tensorflow2.4.1's Issues

numpy error

NotImplementedError: Cannot convert a symbolic Tensor (anchors_0/meshgrid/Size_1:0) to a numpy array. My attempts to reduce or increase the numpy version have not solved the problem. What's the reason, please.

Hello, i use tensorflow-gpu==2.4.1, keras==2.2.4 ,but have the following error in load_model:

Traceback (most recent call last):
File "data_visualization.py", line 65, in
model = keras.models.load_model(args.model, custom_objects=backbone.custom_objects)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/engine/saving.py", line 419, in load_model
model = _deserialize_model(f, custom_objects, compile)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/engine/saving.py", line 225, in _deserialize_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/engine/saving.py", line 458, in model_from_config
return deserialize(config, custom_objects=custom_objects)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/layers/init.py", line 55, in deserialize
printable_module_name='layer')
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 145, in deserialize_keras_object
list(custom_objects.items())))
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/engine/network.py", line 1022, in from_config
process_layer(layer_data)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/engine/network.py", line 1008, in process_layer
custom_objects=custom_objects)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/layers/init.py", line 55, in deserialize
printable_module_name='layer')
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 147, in deserialize_keras_object
return cls.from_config(config['config'])
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/engine/base_layer.py", line 1109, in from_config
return cls(**config)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/engine/input_layer.py", line 87, in init
name=self.name)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 517, in placeholder
x = tf.placeholder(dtype, shape=shape, name=name)
AttributeError: module 'tensorflow' has no attribute 'placeholder'

A question of "SystemError: unknown opcode"

@nacayu
Hi, I have another problem. When I run "python test_crfnet.py --model saved_models/crf_net.h5 --config configs/crf_net.cfg --st 0.5" in the bash, it raised an error "SystemError: unknown opcode". Following are the details that the shell displayed:

Using TensorFlow backend.
2022-04-25 15:12:17.268306: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
WARNING:tensorflow:From /home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/tensorflow/python/compat/v2_compat.py:96: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term
======
Loading NuScenes tables for version v1.0-mini...
23 category,
8 attribute,
4 visibility,
911 instance,
12 sensor,
120 calibrated_sensor,
31206 ego_pose,
8 log,
10 scene,
404 sample,
31206 sample_data,
18538 sample_annotation,
4 map,
Done loading in 0.7 seconds.
======
Reverse indexing ...
Done reverse indexing in 0.1 seconds.
======
Initializing data generator: / |#                     | 0 Elapsed Time: 0:00:00XXX lineno: 75, opcode: 0
Traceback (most recent call last):
  File "/home/dat/Documents/code/crfnet/test_crfnet.py", line 145, in <module>
    model = keras.models.load_model(args.model, custom_objects=backbone.custom_objects)
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/engine/saving.py", line 419, in load_model
    model = _deserialize_model(f, custom_objects, compile)
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/engine/saving.py", line 225, in _deserialize_model
    model = model_from_config(model_config, custom_objects=custom_objects)
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/engine/saving.py", line 458, in model_from_config
    return deserialize(config, custom_objects=custom_objects)
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/layers/__init__.py", line 55, in deserialize
    printable_module_name='layer')
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 145, in deserialize_keras_object
    list(custom_objects.items())))
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/engine/network.py", line 1032, in from_config
    process_node(layer, node_data)
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/engine/network.py", line 991, in process_node
    layer(unpack_singleton(input_tensors), **kwargs)
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/engine/base_layer.py", line 457, in __call__
    output = self.call(inputs, **kwargs)
  File "/home/dat/anaconda3/envs/crf-net@py3613/lib/python3.6/site-packages/keras/layers/core.py", line 687, in call
    return self.function(inputs, **arguments)
  File "../ssnn/model/architectures/vggmax.py", line 75, in func
SystemError: unknown opcode

Process finished with exit code 1

And following are some packages version:

h5py                                  2.10.0
Keras                                 2.2.4
Keras-Applications            1.0.8
Keras-Preprocessing          1.1.2
keras-resnet                        0.2.0
numpy                                1.19.5
opencv-python                   3.4.17.63
scikit-learn                          0.24.2
scipy                                   1.5.4
tensorboard                        2.8.0
tensorboard-data-server     0.6.1
tensorboard-plugin-wit      1.8.1
tensorflow-estimator          2.4.0
tensorflow-gpu                   2.4.1
tensorflow-serving-api-gpu    2.4.1
termcolor                            1.1.0
terminado                           0.13.0
testpath                               0.6.0

AttributeError: module 'tensorflow._api.v2.train' has no attribute 'Optimizer'

Hi! I got this error while running eval code after done your step.
can you help me sovle this problem?

(```
crfnet_2) young@young-hislab:~/disk/code/study_master/crfnet$ python evaluate_crfnet.py --config configs/default.cfg --model saved_models/crf_net.h5 --st 0.5
Using TensorFlow backend.
2023-04-22 17:10:23.334967: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
WARNING:tensorflow:From /home/young/anaconda3/envs/crfnet_2/lib/python3.6/site-packages/tensorflow/python/compat/v2_compat.py:96: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
Instructions for updating:
non-resource variables are not supported in the long term

Loading NuScenes tables for version v1.0-mini...
23 category,
8 attribute,
4 visibility,
911 instance,
12 sensor,
120 calibrated_sensor,
31206 ego_pose,
8 log,
10 scene,
404 sample,
31206 sample_data,
18538 sample_annotation,
4 map,
Done loading in 0.3 seconds.

Reverse indexing ...
Done reverse indexing in 0.0 seconds.

Initializing data generator: / |# | 0 Elapsed Time: 0:00:00XXX lineno: 75, opcode: 0
An error occurred: unknown opcode

map is too low.

Hi,I trained on the nuscenes-mini dataset for 200 epochs, and only modified the dataset path on the default configuration file, but the accuracy is still only 0.0001, which is the same as the training accuracy shown in the picture you sent. Do you know what's going on?

TypeError: An op outside of the function building code is being passed a "Graph" tensor.

my problem:
TypeError: An op outside of the function building code is being passed
a "Graph" tensor. It is possible to have Graph tensors
leak out of the function building context by including a
tf.init_scope in your function building code.
For example, the following function will fail:
@tf.function
def has_init_scope():
my_constant = tf.constant(1.)
with tf.init_scope():
added = my_constant * 2
The graph tensor has name: block1_conv1/kernel:0

TypeError: ' RadarPointCloud ' object is not iterable

When the training starts,i met this problem:

radar_sample = [radar.enrich_radar_data(pc.points) for pc in pcs]
TypeError: 'RadarPointCloud' object is not iterable

RadarPointCloud:
pcs, times = RadarPointCloud.from_file_multisweep(self.nusc, sample, sensor_channel,
sensor_channel, nsweeps=required_sweep_count,
min_distance=0.0)

About the time it takes to train

I'm wondering if you've trained on full dataset? How much time does it take for one epoch? I trained on a Tesla v100 with a batch size of 16 and it shows that it is expected to take 3 hours for one epoch, which is far more than the time mentioned by the authors in the original paper, I don't know what is wrong. Can you give me some advice? Thanks a lot!

run evaluate_crfnet.py error

When I run evaluate_crfnet.py, it has not been resolved except for the following error, and I would like to ask what causes it

Use fn_output_signature instead
Running network on 0 workers: 100% (39 of 39) |########################################################################################################################################| Elapsed Time: 0:00:37 Time:  0:00:37
Parsing annotations: 100% (39 of 39) |#################################################################################################################################################| Elapsed Time: 0:00:00 Time:  0:00:00
No  object of label category 5 was detected in the dataset
No  object of label category 7 was detected in the dataset
recalls length <class 'numpy.ndarray'> 78
recalls length <class 'numpy.ndarray'> 12
Traceback (most recent call last):
  File "evaluate_crfnet.py", line 244, in <module>
    print('recalls length', type(recalls[label]), len(recalls[label]))
TypeError: object of type 'int' has no len()

Question about starting to run your code

When I try to run the train.py file, it says 'No module named 'crfnet.utils.compute_overlap'. I notice that this file does exist, but it's not a .py file. Could you please tell me how to solve this problem? Thanks a lot!

ModuleNotFoundError: No module named 'crfnet'

I have installed all of the packages needed, but when I run "python test_crfnet.py --model saved_models/crf_net.h5 --config configs/crf_net.cfg --st 0.5" in the bash, it raised an error "ModuleNotFoundError: No module found named crfnet". Here are the details that the shell displayed:

Using TensorFlow backend.
2022-04-24 20:13:05.213696: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
Traceback (most recent call last):
  File "~/Documents/code/CRFNet_ReproduceOn_Tensorflow2.4.1/test_crfnet.py", line 42, in <module>
    import crfnet  # noqa: F401
ModuleNotFoundError: No module named 'crfnet'

Process finished with exit code  1

@nacayu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.