cwq159 / PyTorch-Spiking-YOLOv3

A PyTorch implementation of Spiking-YOLOv3. Two branches are provided, based on two common PyTorch implementation of YOLOv3(ultralytics/yolov3 & eriklindernoren/PyTorch-YOLOv3), with support for Spiking-YOLOv3-Tiny at present.
GNU General Public License v3.0
207 stars 58 forks source link

Changing batch_size causes error in snn_evaluate #49

Closed rashmi-ar closed 1 year ago

rashmi-ar commented 1 year ago

Hello author,

changing batch_size to default 1 for training and testing is causing error while transforming ann to snn (for yolov3-tiny-mp2conv-mp1none-lk2relu-up2tconv.cfg). The following error occurs in snn_evaluate, File "ann_to_snn.py", line 183, in snn_results, maps, firing_ratios = snn_evaluate(opt, File "/PyTorch-Spiking-YOLOv3/spiking_utils/snn_evaluate.py", line 276, in snn_evaluate output_snn1, output_snn2 = snn(data) # two branches ValueError: too many values to unpack (expected 2)

Please let me know what may have gone wrong here. Thanks in advance.

hanbaobao950123 commented 1 year ago

maybe #4 can help you.

sahenderson10 commented 1 year ago

Hi Rashmi, did you get this code to work? How did you grab the dataset?

rashmi-ar commented 1 year ago

Hi @sahenderson10 ! You can check data/get_coco_dataset.sh file to download images and metadata or download the dataset from https://pjreddie.com/media/files/train2014.zip and https://pjreddie.com/media/files/val2014.zip

sahenderson10 commented 1 year ago

I have downloaded val2014 and train2014 and put them in the data file. How do I create the coco.data file to run the code?

rashmi-ar commented 1 year ago

Hi @sahenderson10 ! This may help - https://github.com/cwq159/PyTorch-Spiking-YOLOv3/issues/50#issuecomment-1279941778

rashmi-ar commented 1 year ago

Downgrading the python and pytorch version, python=3.7 and pytorch=1.3, solved the issue.