geezacoleman / OpenWeedLocator

An open-source, low-cost, image-based weed detection device for in-crop and fallow scenarios.
MIT License
352 stars 64 forks source link

Bug: `input_file_or_directory` Field in [System] Config Not Taking Effect #158

Closed bwx0 closed 2 hours ago

bwx0 commented 1 week ago

Description

It seems that OWL is not reading from the video file specified in the input_file_or_directory field under the [System] section of the configuration file.

It looks like this behavior might be due to a missing else statement on line 293 of owl.py.

Steps to Reproduce

  1. Set the input_file_or_directory field e.g. ../videos/example.mp4
  2. Run the OWL script. python owl.py --show-display
  3. Observe that the video file is not being processed as expected. Instead, it is reading from the camera.

Suggested Fix

Add an else: statement on line 293 in owl.py as mentioned above.

geezacoleman commented 1 week ago

Good find! Thanks for working this out - there are a couple of other changes I'm making to make the code more readable/robust/better at catching errors when setting everything up so I should have it updated by early next week.

You can follow the progress on the branch assigned below.

geezacoleman commented 2 hours ago

This should be fixed now - have restructured the media setup generally and made it more robust with clearer errors.

Let me know if you have any further suggestions.