GithubHelp home page GithubHelp logo

bartzi / loans Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 4.0 3.11 MB

Code for the Paper "LoANs: Weakly Supervised Object Detection with Localizer Assessor Networks"

License: GNU General Public License v3.0

Python 98.83% Dockerfile 1.17%
chainer computer-vision convolutional-neural-networks deep-learning weakly-supervised-learning

loans's Issues

Error while training

Hi ,

I have created the dataset as per the readme and when I run train_sheep_localizer.py as in following command :

python /home/rahul/ActiveShuttle/WSOL/LOANS/loans-master/train_sheep_localizer.py /home/rahul/ActiveShuttle/WSOL/LOANS/Dataset/Localizer/pics_extracted/gt.csv /home/rahul/ActiveShuttle/WSOL/LOANS/figure_skating/evaluation_dataset/gt.json /home/rahul/ActiveShuttle/WSOL/LOANS/Dataset/Assessor/dataset/images.csv --target-size 75 100 --batch-size 64 --gpu 0 --learning-rate 1e4 --log-name figure_skating_person --use-resnet-18

I get following error

Traceback (most recent call last):
  File "/home/rahul/ActiveShuttle/WSOL/LOANS/loans-master/train_sheep_localizer.py", line 259, in <module>
    main()
  File "/home/rahul/ActiveShuttle/WSOL/LOANS/loans-master/train_sheep_localizer.py", line 155, in main
    **updater_args
  File "/home/rahul/ActiveShuttle/WSOL/LOANS/loans-master/sheep/sheep_updater.py", line 12, in __init__
    self.n_dis = kwargs.pop('n_dis')
KeyError: 'n_dis'

Can anyone please help to find the problem ?
@Bartzi

predict bounding boxes on a new image ?

Hi ,
I read the paper and it is really an interesting work.
I have a doubt regarding it. Will the network be able to predict bounding box on a new image (lets say a random image of figure skater downloaded from internet ) ?
If it is possible , is there any test script available which can use trained weights on your figure-skating dataset ?
Also can you share the details of how the input data to assessor and localizer looks like ?
Thanks
Rahul

Actual training data for Assessor ?

Hi,

What is actual training data for Assessor ?

  • Is it only the images created using Background and template image
    or
  • Images + ratio (inside images.csv file)

I have observed that inside the images.csv file , ratios are generated only if I am using
--zoom-mode

For example,

Assessor_dataset

In the created dataset (Templates are industry workers and Backgrounds are production plant)

  • in Figure B the ratio represents correctly

  • but in Figure A and C, the ratio do not seem to correct representation of the IoU between Template and Background image ( In figure C, 0.85 means 85% of the image is covered by target object. Is that correct ?)

Could you please help me to identify, what exactly is the ground truth for Assessor ?

Thanks
Rahul

Provide tutorial video

A detailed tutorial screen-capture video of how to use this for labeling/segmentation would help. I know it's a lot to ask for.

Fix spelling mistakes in readme

s/on wich/on which
s/the scipt/the script
s/fileholding/file holding

I would look over the entire readme, and maybe have a collaborator look over it as well.

Fix typo in readme

Thanks for providing the code. Here is a minor typo in the readme:

s/you object/your object

RuntimeError: cannot join current thread

I have followed the instructions given in the page and have tried to visualize the results using following code
### with video_sheeping.py

python video_sheeping.py figure_skating/models/resnet_50_augmentation_no_noise_75_100/Resnet50SheepLocalizer_97305.npz \log \-i videos/validation_data/video.mp4 \ -g 0 \ -o validation_data/analyzed_video.mp4

And I get the following error

0%| | 0/5 [00:00<?, ?it/s]
Could not find encoder for codec id 27: Encoder not found
Traceback (most recent call last): | 0/11985 [00:00<?, ?it/s]
File "video_sheeping.py", line 107, in
sheep(args, localizer, video)
File "video_sheeping.py", line 67, in sheep
render_scores=args.discriminator is not None
AttributeError: 'Namespace' object has no attribute 'discriminator'

Exception ignored in: <bound method tqdm.del of 0%| | 0/11985 [00:17<?, ?it/s]>
Traceback (most recent call last):
File "/home/rahul/.virtualenvs/loans/lib/python3.6/site-packages/tqdm/_tqdm.py", line 931, in del
self.close()
File "/home/rahul/.virtualenvs/loans/lib/python3.6/site-packages/tqdm/_tqdm.py", line 1133, in close
self._decr_instances(self)
File "/home/rahul/.virtualenvs/loans/lib/python3.6/site-packages/tqdm/_tqdm.py", line 496, in _decr_instances
cls.monitor.exit()
File "/home/rahul/.virtualenvs/loans/lib/python3.6/site-packages/tqdm/_monitor.py", line 52, in exit
self.join()
File "/usr/lib/python3.6/threading.py", line 1053, in join
raise RuntimeError("cannot join current thread")
RuntimeError: cannot join current thread

with image_sheeping.py

command used as following

python image_sheeping.py figure_skating/models/resnet_50_augmentation_no_noise_75_100/Resnet50SheepLocalizer_97305.npz \log \-i figure_skating/evaluation_dataset/test_images/*.png \ -g 0 \ -o validation_data/images/analyzed
Output/error

0%| | 0/6 [00:00<?, ?it/s]Traceback (most recent call last):
File "image_sheeping.py", line 44, in
bboxes, scores = localizer.localize(processed_image)
ValueError: too many values to unpack (expected 2)
Exception ignored in: <bound method tqdm.del of 0%| | 0/6 [00:15<?, ?it/s]>
Traceback (most recent call last):
File "/home/rahul/.virtualenvs/loans/lib/python3.6/site-packages/tqdm/_tqdm.py", line 931, in del
self.close()
File "/home/rahul/.virtualenvs/loans/lib/python3.6/site-packages/tqdm/_tqdm.py", line 1133, in close
self._decr_instances(self)
File "/home/rahul/.virtualenvs/loans/lib/python3.6/site-packages/tqdm/_tqdm.py", line 496, in _decr_instances
cls.monitor.exit()
File "/home/rahul/.virtualenvs/loans/lib/python3.6/site-packages/tqdm/_monitor.py", line 52, in exit
self.join()
File "/usr/lib/python3.6/threading.py", line 1053, in join
raise RuntimeError("cannot join current thread")
RuntimeError: cannot join current thread

Can anyone suggest a possible solution ?

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.