Skin lesion segmentation MaskRCNN error (bool index does not match) - computer-vision

i have a task of using MaskRCNN to do a skin lesion segmentation. I have my work on my github but i have an error on cell 22 when training the model.
https://github.com/leahcimali/Skin-cancer-segmentation/blob/main/Project%20Mask.ipynb
Knowing that the shape of my image is (128,128,3).
My code is based on this project, but i had to remove json description because we i download them, they get corrupted.
https://github.com/NeyoxDrago/Skin-lesion-detection-with-MRCNN
Thank, in advance for advice.
I tried installing different environment because some people with similar error had wrong environment setup. But everything i tried i got the same error. I even tried with the recommanded docker image on https://github.com/matterport/Mask_RCNN .

Related

Wagtail Images Suddenly Not Rendering on Front End

I have just encountered an odd problem I'm trying to debug but cannot figure out what is wrong.
I have a wagtail site with images that were all working. At one point I refreshed the browser, and the images suddenly all disappeared from every page.
wagtailimages_tags is there
static is all loaded
the images are all in the correct media directory as specified and have been uploaded through the CMS
if i inspect element, the image is in fact coming through in the code perfectly.
But the site itself just does not show the image. I have checked the CSS and nothing has changed there and it is not hiding the image somehow.
My last resort - I actually started the project over completely in a new environment and added each application one by one to see if I could solve the issue ... nope. No images on the new install from scratch either!
No idea why all the images would suddenly just fail to appear in browser. Just seems super strange to me.
Any ideas on debugging appreciated.
Solved. The path to one of the js files had an extra /js in it and was not loading the file the page needed. The console showed and error and said it could not find /img.url - weird but the file in question where the error was found was the js file with the incorrect path.
This mistake caused every path to load perfectly but strategically blocked a few things globally that a little extra reading of the console would have helped me figure out sooner.
Fixed the .js file path and now all is good.

Why does pm4py.view doesn't generate any image

For a business process discovery task, I am trying to generate a process model, following pm4py python library. Here's a sample code:
!pip install pm4py
import pm4py
log = pm4py.read_xes('/content/running-example.xes')
process_model, initial_marking, final_marking = pm4py.discover_petri_net_inductive(log)
pm4py.view_petri_net(process_model, initial_marking, final_marking, format="svg")
However, I get output as:
parsing log, completed traces :: 100%
6/6 [00:00<00:00, 121.77it/s]
But no image as is expected from the website: https://pm4py.fit.fraunhofer.de/getting-started-page#discovery
Being relatively new to the world of python, what I learnt from other coders' suggestions here on SO that always read in depth the source code in case of open source libraries.
Here is pm4py visual links:
https://github.com/pm4py/pm4py-core/blob/afee8b0932283b8f8f02dd2b6cc0968a1f1cc723/pm4py/visualization/process_tree/visualizer.py#L69
and specifically for my example:
https://github.com/pm4py/pm4py-core/blob/afee8b0932283b8f8f02dd2b6cc0968a1f1cc723/pm4py/vis.py#L17
But I am not able to figure out how to manipulate it.
Can someone please point out the problem to me and help me generate the views. Also, if anyone has done business process generations before, maybe if you could suggest me any libraries or techniques to analyse event-logs data it would be really helpful.
to visualize the process models mined in PM4Py, make sure that you have graphviz installed on your computer.
see https://pm4py.fit.fraunhofer.de/install for more information on this.

What could be the cause of "ERROR: Unexpected exception while running model: 31704179198" in pyomo?

I get this error message whenever I try to run code that uses the .dae extension.
I've been getting this error on code for a problem I've been working on. Eventually, I ran code that I found online for a different problem and got the same error. This makes me think that it's some error with how I'm running the solver (ipopt) rather than the code itself
Here's a link to the code from GitHub that I'm getting an error message with: https://github.com/Pyomo/pyomo/blob/master/examples/dae/Optimal_Control.py
I've been evoking the solve with:
pyomo solve --solver=ipopt filename.py
Most of the DAE examples come with a second Python script for running the model. Models formulated with Pyomo.DAE are meant to be run from Python scripts and not using the pyomo solve command line. The optimal control problem you're looking at can be solved by using the command
python run_Optimal_Control.py
If you take a look at this file you'll see the syntax for applying a discretization scheme to the dynamic model, creating a solver object using the SolverFactory, solving the model, and plotting the results.

Why am I getting a blank screen?

I'm following this tutorial on Github to learn how to use SwiftyDropbox, and I've followed the steps to the point where I should be able to run the app, and I log into Dropbox. However, when I run the app on my phone, I just get a blank screen. Can someone help me figure out why?
Here's the code for my AppDelegate
The ViewController
the plist
and the podfile
The tutorial isn't exhaustive of every step you need to take to run the app. If you download the whole project and open TestSwifty > TestSwifty_iOS > TestSwifty_iOS.xcworkspace, you'll see in the Main.storyboard that there are buttons, which are connected to code.

coldfusion imageNew error: Unsupported Image Type

I am trying to use the ImageNew function (coldfusion 8) to create an image object with a image URL link, e.g. <cfset myImage=ImageNew(evaluate( "http://.../../1.jpg" ))>
There are many links there and most of them are good, but for some of the image links, I got an error when I call the ImageNew function: An exception occurred while trying to read the image. javax.imageio.IIOException: Unsupported Image Type
Does it have something to do with the size of images? Does anybody have any idea?
Many thanks
Results: Finally, it's the CMYK/RGB issue. It seems CF8 has trouble in dealing with CMYK and CF8 doesn't support convertion from CMYK to RGB. I use ImageMagic to do the convertion.
To be fair, I have this issue sometimes. I don't think it has anything to do with your code, coldfusion's image processing utilities either cannot process a perfectly valid image, or they choke on an image that is not up to standards. When this happens it is typically a client uploading an image and my system throws an error. They send me the file, I resave it out using photoshop or something like that, and poof, coldfusion likes it.
The only solution I know if this is the problem, is to use a third party image processor instread of coldfusion's built in functions. I used to use cfx_imagecr
http://efflare.com/products/cfx_imagecr/
But that is not the only solution out there.