Giter VIP home page Giter VIP logo

wimlds-trojmiasto / detect-waste Goto Github PK

View Code? Open in Web Editor NEW
163.0 10.0 42.0 85.21 MB

AI to Combat Environmental Pollution - detecting plastic waste in the environment to combat environmental pollution and promote circular economy (Deep Learning, PyTorch)

Home Page: https://detectwaste.ml

License: MIT License

Jupyter Notebook 30.99% Python 68.78% Shell 0.22%
pytorch deep-learning object-detection python cnn neural-networks efficientdet detr maskrcnn fastrcnn

detect-waste's Introduction

Wowchemy's Research Group Template for Hugo

The Research Group Template empowers your research group to easily create a beautiful website with a stunning homepage, news, academic publications, events, team profiles, and a contact form.

Check out the latest demo of what you'll get in less than 5 minutes, or view the showcase.

Wowchemy makes it easy to create a beautiful website for free. Edit your site in Markdown, Jupyter, or RStudio (via Blogdown), generate it with Hugo, and deploy with GitHub or Netlify. Customize anything on your site with widgets, themes, and language packs.

Crowd-funded open-source software

To help us develop this template and software sustainably under the MIT license, we ask all individuals and businesses that use it to help support its ongoing maintenance and development via sponsorship.

Ecosystem

Screenshot

Demo Credits

Please replace the demo images with your own.

Analytics

detect-waste's People

Contributors

agamiko avatar akwasigroch avatar dependabot[bot] avatar m-kortas avatar majsylw avatar mariaogryczak avatar ver0z avatar zklaw 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  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  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  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

detect-waste's Issues

Upload weights?

Thanks for the great work.

Would you be willing to add trained weights (and possibly a single-file out-of-sample classification demo) to the repo? This way people could directly apply your best classifier to a photo of their choice without having to retrain the whole model themselves.

annotations file?

I dont know about annotations_epi.json
what and where is annotations_epi.json file?
Thank you very much

TACO bboxes

I wish to use TACO Bounding boxes as well for my project. Would you mind sharing the converted annotations?

Path to all images

To run train.py of EfficientDet the path_to_all images means that I have to take the images of each dataset and join in just one folder ?

python3 train.py path_to_all_images
--ann_name ../annotations/binary_mixed --model tf_efficientdet_d2
--batch-size 4 --decay-rate 0.95 --lr .001 --workers 4 --warmup-epochs 5
--model-ema --dataset multi --pretrained --num-classes 1 --color-jitter 0.1
--reprob 0.2 --epochs 20 --device cuda:0

openlittermap_downloader

Thanks for your great projects and Thanks for share the code of your great work!
I run the openlittermap_downloader.py.but I can't download the database.
can you give me some advice?thanks very much!!!

Want to know if detector model is provided

Hello, thank you for the great work. I am new learner of python, I am doing a bootcamp and want to use your project as demo. I installed the related packages and want to run the file make_predictions.py. However, I am not sure what should I provide in the parameter --detector.

For the another similar parameter --classifier, I downloaded the .pth.tar file which you provided in Google Drive. I am not sure if it is correct as well.

Thanks for such a great work again. I learn a lot through your detailed documentation and It would be great if you can provide some helps to me. =)

How to use the data?

Hello. I am building an object detector based on the YOLO family of models, and i would like to know how to use this dataset.
Specifically the TACO box dataset annotations, but I'm confused on how to use it. Could you help me? Thanks!

Suggest to loosen the dependency on funcy

Hi, your project detect-waste requires "funcy==1.15" in its dependency. After analyzing the source code, we found that some other versions of funcy can also be suitable without affecting your project, i.e., funcy 1.16, 1.17. Therefore, we suggest to loosen the dependency on funcy from "funcy==1.15" to "funcy>=1.15,<=1.17" to avoid any possible conflict for importing more packages or for downstream projects that may use detect-waste.

May I pull a request to loosen the dependency on funcy?

By the way, could you please tell us whether such dependency analysis may be potentially helpful for maintaining dependencies easier during your development?



For your reference, here are details in our analysis.

Your project detect-waste(commit id: 6113385) directly uses 3 APIs from package funcy.

funcy.seqs.lfilter, funcy.seqs.lremove, funcy.seqs.lmap

From which, 14 functions are then indirectly called, including 9 funcy's internal APIs and 5 outsider APIs, as follows (neglecting some repeated function occurrences).

[/wimlds-trojmiasto/detect-waste]
+--funcy.seqs.lfilter
|      +--funcy.compat.lfilter
|      |      +--itertools.ifilter
|      +--funcy.funcmakers.make_pred
|      |      +--funcy.funcmakers.make_func
|      |      |      +--funcy.strings.re_tester
|      |      |      |      +--re.compile
|      |      |      +--funcy.strings.re_finder
|      |      |      |      +--funcy.strings._prepare
|      |      |      |      |      +--re.compile
|      |      |      |      |      +--funcy.strings._make_getter
|      |      |      |      |      |      +--operator.methodcaller
|      |      |      +--operator.itemgetter
+--funcy.seqs.lremove
|      +--funcy.seqs.remove
|      |      +--funcy.funcmakers.make_pred
+--funcy.seqs.lmap
|      +--funcy.compat.lmap
|      |      +--itertools.imap
|      +--funcy.funcmakers.make_func

We scan funcy's versions among [1.16, 1.17] and 1.15, the changing functions (diffs being listed below) have none intersection with any function or API we mentioned above (either directly or indirectly called by this project).

diff: 1.15(original) 1.16
['funcy.colls.has_path', 'funcy.calc.CacheMemory.__setitem__', 'funcy.decorators.has_1pos_and_kwonly', 'funcy.calc.CacheMemory.expire', 'funcy.calc.memoize', 'funcy.calc.SkipMemoization', 'funcy.flow.throttle', 'funcy.calc.CacheMemory', 'funcy._inspect.get_spec', 'funcy.decorators.decorator', 'funcy.calc.CacheMemory.clear', 'funcy.flow._ensure_exceptable', 'funcy.flow.reraise', 'funcy.funcs.curry', 'funcy.decorators.has_single_arg', 'funcy.calc.CacheMemory.__init__', 'funcy.calc._memory_decorator', 'funcy.funcs.autocurry', 'funcy.calc.SkipMemory', 'funcy.calc.CacheMemory.__getitem__', 'funcy.calc.cache', 'funcy.flow._is_exception_type', 'funcy.funcs.rcurry']

diff: 1.15(original) 1.17
['funcy.colls.has_path', 'funcy.calc.CacheMemory.__setitem__', 'funcy.colls.zip_values', 'funcy.decorators.Call.__str__', 'funcy.colls.zip_dicts', 'funcy.decorators.has_1pos_and_kwonly', 'funcy.calc.CacheMemory.expire', 'funcy.calc.memoize', 'funcy.calc.SkipMemoization', 'funcy.flow.throttle', 'funcy.calc.CacheMemory', 'funcy._inspect.get_spec', 'funcy._inspect._sig_to_spec', 'funcy.decorators.decorator', 'funcy.calc.CacheMemory.clear', 'funcy.flow._ensure_exceptable', 'funcy.flow.reraise', 'funcy.funcs.curry', 'funcy.decorators.has_single_arg', 'funcy.calc.CacheMemory.__init__', 'funcy.flow.limit_error_rate', 'funcy.calc._memory_decorator', 'funcy.funcs.autocurry', 'funcy.decorators.Call', 'funcy.calc.SkipMemory', 'funcy.calc.CacheMemory.__getitem__', 'funcy.colls.del_in', 'funcy.decorators.Call.__repr__', 'funcy.calc.cache', 'funcy.flow._is_exception_type', 'funcy.funcs.rcurry']

As for other packages, the APIs of @outside_package_name are called by funcy in the call graph and the dependencies on these packages also stay the same in our suggested versions, thus avoiding any outside conflict.

Therefore, we believe that it is quite safe to loose your dependency on funcy from "funcy==1.15" to "funcy>=1.15,<=1.17". This will improve the applicability of detect-waste and reduce the possibility of any further dependency conflict with other projects/packages.

classify-waste and Detect-waste

Hi,
Thanks for your wonderful work in the domain. I have worked in underwater waste detection and now i want to use your dataset(waste-classify and waste detect)for my model. Can you guide me how and where to get these datasets.

Thanks again

bugs when transfer the data

TrashCan/dataset/material_version/instances_train_trashcan.json file 1 of 8
0_instances_train_trashcan
Traceback (most recent call last):
  File "annotations_preprocessing_multi.py", line 48, in <module>
    train, test = split_coco_dataset([data_file],
  File "detect-waste/utils/split_coco_dataset.py", line 122, in split_coco_dataset
    x, y = MultiStratifiedShuffleSplit(images, annotations, test_size)
  File "detect-waste/utils/split_coco_dataset.py", line 81, in MultiStratifiedShuffleSplit
    strat_split = MultilabelStratifiedShuffleSplit(n_splits=1,
  File "python3.8/site-packages/iterstrat/ml_stratifiers.py", line 322, in __init__
    super(MultilabelStratifiedShuffleSplit, self).__init__(
TypeError: __init__() takes from 1 to 2 positional arguments but 5 were given

Data Processing

Hi @AgaMiko, It would be really kind if you could help me through steps mentioned in the readme file, under Data Processing - Multiclass training; when I try to run python3 annotations_preprocessing.py I am facing this error:
FileNotFoundError: [Errno 2] No such file or directory: '/dih4/dih4_2/wimlds/TACO-master/data/annotations.json'

Waste detection model loading error

Dear wimlds,
First of all, thanks for the great works,

I trained EfficientNet model for waste detection with "tf_efficientdet_d2" (multiclass training)

But when i evaluate the model with demo.py, An error occurred during the model loading.

The error is as below,

$> python3 demo.py --save ./results/image.png --checkpoint /home/jupyter/detect-waste/efficientdet/output/train/20220415-025926-tf_efficientdet_d2/checkpoint-0.pth.tar

Traceback (most recent call last):
File "demo.py", line 268, in
main(args)
File "demo.py", line 235, in main
model = set_model("tf_efficientdet_d2", num_classes, args.checkpoint, args.device)
File "demo.py", line 221, in set_model
checkpoint_path=checkpoint_path
File "/home/jupyter/detect-waste/efficientdet/effdet/factory.py", line 14, in create_model
checkpoint_path=checkpoint_path, checkpoint_ema=checkpoint_ema, **kwargs)
File "/home/jupyter/detect-waste/efficientdet/effdet/factory.py", line 47, in create_model_from_config
load_checkpoint(model, checkpoint_path, use_ema=checkpoint_ema)
File "/opt/conda/lib/python3.7/site-packages/timm/models/helpers.py", line 64, in load_checkpoint
model.load_state_dict(state_dict, strict=strict)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1498, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for EfficientDet:
size mismatch for class_net.predict.conv_pw.weight: copying a param with shape torch.Size([63, 112, 1, 1]) from checkpoint, the shape in current model is torch.Size([9, 112, 1, 1]).
size mismatch for class_net.predict.conv_pw.bias: copying a param with shape torch.Size([63]) from checkpoint, the shape in current model is torch.Size([9]).

Can you give some advices to solve this error.

Thanks.
Jong Wuk Son

About clasifiy-waste dataset

Dear wimlds,
Thanks for your greate effort

I try the source code, but how to create classify-waste dataset.
I cant preproduce it now. Can you share me your classify-waste dataset for training

Thanks,
Xuan Tran

want guiding

can any one post an video tutorial about this project how to install and run

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.