Git Product home page Git Product logo

tinyyolo-bnn's People

Contributors

mohdumar avatar mohdumar644 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

Watchers

 avatar  avatar

tinyyolo-bnn's Issues

DoReFaNet Like Networks not working

Hii,

I found your GitHub repo very interesting in implementing Tiny yolo on FPGAs. I tried to understand how the quantization is performed on convolutional layers from files dorefa.py, _darknet.py, and _network_tiny_yolo.py. I execute the same code for the PASCAL VOC dataset but do not get desired results. The mAP on the test set is 0.20% which is very low. How is the DoRefaNet-like network working?

Using Floating point weights and activations, I get good mAP results. i.e. 57.2% on PASCAL VOC.
I have executed the code using 2 versions of Lightnet (0.5.0 and 1.1.1) and brambox (1.1.0, 3.2.0)
The results of quantization are the same with both versions.

Are there any changes I have to make to the files? Or Any version issues (Lightnet and Brambox)

Lightnet Version

Thanks for the repo. but I cannot run "python3 bin/train.py -c -n cfg/tinyyolo.py /path/to/pretrained/weights/if/present.pt" there is error.
can I ask you what version of Lightnet did you use in this project? and other packages version too. Thank you

Error in training file

Hi, I have tried your code of tiny yolo BNN and run the training file as per the instruction given using the command python3 bin/train.py -c -n tinyyolo.py. This results in following error
error

The error shows failed to import the file [tinyyolo.py]. Are you sure it is a valid python file?
It is not importing the python module. How to solve this error.

Please help!

Error in pynq-z2

Hi, I have tried your code in pynq-z2, but every time when running the line
hw_classifier = bnn.CnvClassifier(bnn.NETWORK_CNVW1A1,'tinyyolo',bnn.RUNTIME_HW)
the jupyter would be died.
So I ran the code with bash, and the terminal return some info:
Setting network weights and thresholds in accelerator...
terminate called after throwing an instance of 'char const*'
Aborted
This error may from bnn/src/network/cnvW1A1/main_python.cpp
Or maybe I just did wrong, do you know how to solve this? thanks very much!

Connection Timed Out Error

HI!

I am just trying to run the TinyYOLO_Loop.ipynb but I get the error included below. Could you help me understand what I am doing wrong? Thank you!

Thing I tried (both give same error):
I tried cloning this repo and running the TinyYOLO_Loop.ipynb file from the BNN-PYNQ directory after renaming the bit and tcl file and placing them under a folder called pynqZ1-Z2 in the bitstreams directory.

I also tried pip installing the Xilinx/BNN-PYNQ repository and replacing the bitstream files with the ones included in this repository and recompiling the libraries with make-sw.sh.

ERROR:
`TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/IPython/core/interactiveshell.py", line 2882, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 53, in
hw_classifier = bnn.CnvClassifier(bnn.NETWORK_CNVW1A1,'tinyyolo',bnn.RUNTIME_HW)
File "/home/xilinx/jupyter_notebooks/TinyYOLO-BNN/BNN-PYNQ/bnn/bnn.py", line 192, in init
self.bnn = PynqBNN(runtime, network)
File "/home/xilinx/jupyter_notebooks/TinyYOLO-BNN/BNN-PYNQ/bnn/bnn.py", line 96, in init
Overlay(self.bitstream_path).download()
File "/usr/local/lib/python3.6/dist-packages/pynq/overlay.py", line 315, in init
self.download()
File "/usr/local/lib/python3.6/dist-packages/pynq/overlay.py", line 379, in download
super().download()
File "/usr/local/lib/python3.6/dist-packages/pynq/pl.py", line 1945, in download
fd.write(self.binfile_name)
TimeoutError: [Errno 110] Connection timed out`

GPU training

Hello,

Whenever I train it doesn't seem like it is using my GPU. However, in the code, I see that it is set to cuda since if torch.cuda.is_available() is True. Any ideas?

Thanks!

Tiny yolo bnn with 3 bit activations

Hi, I want to try tiny yolo BNN with a different bit precision i.e. W1A3(1-bit and 3-bit activations). How should I modify the top.cpp file and main_python.cpp file for this bit precision.

In top.cpp file, line63, static ThresholdsActivation<L0_TMEM, L0_PE, 15, ap_fixed<24, 16, AP_RND, AP_SAT>, ap_uint<L0_API>, 0> threshs0. Here, L0_API is set to 15. How you have set this value? This value is particularly for 1-bit weights and 4-bit activations.

Weights

Hi,

I came to your github since someone recommended it from Xilinx/QNN-MO-PYNQ#35. I was wondering how I would export the weights such that I could use them for the QNN-MO-PYNQ tinier yolo. I've followed all the sets on your GitHub but I don't know what to do with the bin files and the .npz files.

It seems like for the deployment you meant we should copy over the bin files and place them under QNN-MO-PYNQ/qnn/params/binparam-dorefanet/ and then use Vivado to recompile it is this correct?

Additionally, do you happen to have the gen-weights file for converting for QNN-MO-PYNQ?

Thanks!

Training using lightnet

Thanks for the great repo. However, I was trying to use the pre-trained file in Weights-packed folder. It gives no detection and when I lower the threshold it gives random ones. I also tried to retrain the network. I have the same issue. I was wondering if there is a dependency on the version. I tested several PyTorch versions. Currently using version 1.1.0 and brambox version is 0.5.0.

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.